On Linux, a number of unit tests, including is_debug=true base_unittests, hang when run with RUNNING_ON_VALGRIND=1 or when actually running under Valgrind or DynamoRIO.
Xref https://github.com/DynamoRIO/dynamorio/issues/2262
To reproduce:
$ RUNNING_ON_VALGRIND=1 out/Debug/base_unittests --single-process-tests --gtest_filter=ThreadHeapUsageShimTest.HooksIntoMallocWhenShimAvailable
Note: Google Test filter = ThreadHeapUsageShimTest.HooksIntoMallocWhenShimAvailable
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from ThreadHeapUsageShimTest
[ RUN ] ThreadHeapUsageShimTest.HooksIntoMallocWhenShimAvailable
The test just sits there in the middle, hung. The callstacks show some kind of recursive lock issue involving pthread_once, but how that's related to RUNNING_ON_VALGRIND is unclear.
This is a regression, as in the past this code was run under DynamoRIO (for Dr. Memory, drcov code coverage, and other purposes) and under Valgrind in the more distant past.
Comment 1 by benhenry@google.com
, Jan 10