[compiler-rt] r229678 - tsan: fix signal handling during stop-the-world

Hans Wennborg hans at chromium.org
Sat Feb 28 14:21:03 PST 2015


On Wed, Feb 18, 2015 at 7:13 AM, Dmitry Vyukov <dvyukov at google.com> wrote:
> Author: dvyukov
> Date: Wed Feb 18 09:13:29 2015
> New Revision: 229678
>
> URL: http://llvm.org/viewvc/llvm-project?rev=229678&view=rev
> Log:
> tsan: fix signal handling during stop-the-world
>
> Long story short: stop-the-world briefly resets SIGSEGV handler to SIG_DFL.
> This breaks programs that handle and continue after SIGSEGV (namely JVM).
> See the test and comments for details.

I've reverted this in r230874 since it was causing Chromium's
browser_tests to crash.

Sorry for not providing a better test case, but this is how I've been
reproducing the crash locally:

1) Build at LLVM r230631 (or in any case have r230631 cherry-picked in
as it fixes deadlock issue)

2) Configure Chromium: (adjust make_clang_dir to point to llvm build)

$ GYP_DEFINES="asan=1 clang=1 component=static_library
dcheck_always_on=1 fastbuild=1 lsan=1 target_arch=x64
test_isolation_mode=prepare use_allocator=none
make_clang_dir=/work/llvm.combined/build.release/
clang_use_chrome_plugins=0" build/gyp_chromium

3) Build as usual:

$ ninja -C /work/chromium/src/out/Release browser_tests

4) Edit Chromium's tools/lsan/suppression.txt (I needed this on my
machine, bots don't seem to need it)

leak:clone
leak:g_main_context_iteration

5) Run the test repeatedly, it can take 10 minutes before it crashes:

 $ for i in `seq 1 100` ; do G_SLICE=always-malloc
CHROME_DEVEL_SANDBOX="/usr/local/sbin/chrome-devel-sandbox"
ASAN_OPTIONS="symbolize=1
external_symbolizer_path=/work/llvm.combined/build.release/bin/llvm-symbolizer
detect_leaks=1 fast_unwind_on_malloc=0"
LSAN_OPTIONS="suppressions=/work/chromium/src/tools/lsan/suppressions.txt
print_suppressions=1"  /work/chromium/src/out/Release/browser_tests
--no-sandbox --single_process
--gtest_filter=PolicyTest.ExtensionAllowedTypes || break ; echo Run $i
OK ; done



More information about the llvm-commits mailing list