This is an archive of the discontinued LLVM Phabricator instance.

tsan: fork runtime
ClosedPublic

Authored by dvyukov on Dec 7 2021, 1:06 AM.

Details

Summary

Fork the current version of tsan runtime before commiting
rewrite of the runtime (D112603). The old runtime can be
enabled with TSAN_USE_OLD_RUNTIME option.
This is a temporal measure for emergencies and is required
for Chromium rollout (for context see http://crbug.com/1275581).
The old runtime is supposed to be deleted soon.

Diff Detail

Event Timeline

dvyukov created this revision.Dec 7 2021, 1:06 AM
dvyukov requested review of this revision.Dec 7 2021, 1:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 7 2021, 1:06 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript

Nico, how will we understand when Chromium does not need this anymore? Do you have any approx estimation of how long will it take (week, month)?

thakis added a comment.Dec 7 2021, 5:37 AM

Thanks!

From a Chromium PoV, we can remove this once we manage to update to a version where everything (clang, llvm, tools -- not just compiler-rt) works with TSAN_USE_OLD_RUNTIME=ON(so we can roll to that version) and with TSAN_USE_OLD_RUNTIME=OFF (so we can switch to the new runtime at that revision).

If everything just works, that's doable in a week. If something's broken, it'll take longer, depending on what is broken.

compiler-rt/lib/tsan/CMakeLists.txt
19–24

(very nit: s/temporal/temporary/ i think. not a native speaker, but i think "temporaly" means "time-related" while "temporary" means "for a short time")

thakis accepted this revision.Dec 7 2021, 5:39 AM

(And, as said on our upstream bug, I think much of the benefit is for other projects out there using tsan. Chromium's problems are likely all figured out by now. For other projects, it might be polite to keep this in for a while unless it's a lot of work to maintain and/or you're very confident that the new runtime has no regressions.)

This revision is now accepted and ready to land.Dec 7 2021, 5:39 AM
jrtc27 added a comment.Dec 7 2021, 6:46 AM

Can't people just use 13 whilst they work on updating to supporting 14git's runtime?

This revision was landed with ongoing or failed builds.Dec 8 2021, 10:28 PM
Closed by commit rG8e93d4c996c0: tsan: fork runtime (authored by dvyukov). · Explain Why
This revision was automatically updated to reflect the committed changes.

Can't people just use 13 whilst they work on updating to supporting 14git's runtime?

I will leave this to Nico.

compiler-rt/lib/tsan/rtl-old/tsan_interceptors_mach_vm.cpp