Skip to content

[tsan] Multiple TSAN assertions in tests with COMPILER_RT_DEBUG=ON #46204

Open
@arichardson

Description

@arichardson
Bugzilla Link 46860
Version unspecified
OS All

Extended Description

I am seeing the following test failures on Linux x86_64 (Ubuntu 18.04) with commit 1956cf1 from earlier today.

SanitizerCommon-tsan-x86_64-Linux :: Linux/allow_user_segv.cpp
SanitizerCommon-tsan-x86_64-Linux :: Linux/signal_line.cpp
SanitizerCommon-tsan-x86_64-Linux :: Posix/dedup_token_length_test.cpp
SanitizerCommon-tsan-x86_64-Linux :: Posix/illegal_read_test.cpp
SanitizerCommon-tsan-x86_64-Linux :: Posix/illegal_write_test.cpp
SanitizerCommon-tsan-x86_64-Linux :: Posix/sanitizer_set_report_fd_test.cpp

The backtraces are all similar:

SanitizerCommon-tsan-x86_64-Linux :: Linux/allow_user_segv.cpp
User sigaction installed
FATAL: ThreadSanitizer CHECK failed: /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798 "((IsAppMem(x))) != (0)" (0x0, 0x0)
#​0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp:47:25 (allow_user_segv.cpp.tmp+0x515b25)
#​1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:78:5 (allow_user_segv.cpp.tmp+0x437fd3)
#​2 unsigned long __tsan::MemToShadowImpl<__tsan::Mapping>(unsigned long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798:3 (allow_user_segv.cpp.tmp+0x4a475d)
#​3 __tsan::MemToShadow(unsigned long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:832:10 (allow_user_segv.cpp.tmp+0x4f433e)
#​4 __tsan::MemoryAccess(__tsan::ThreadState*, unsigned long, unsigned long, int, bool, bool) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:830 (allow_user_segv.cpp.tmp+0x4f433e)
#​5 __tsan::MemoryRead(__tsan::ThreadState*, unsigned long, unsigned long, int) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:742 (allow_user_segv.cpp.tmp+0x4f433e)
#​6 __tsan_read4 /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h:29 (allow_user_segv.cpp.tmp+0x4f433e)
#​7 DoSEGV() /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/allow_user_segv.cpp:51:10 (allow_user_segv.cpp.tmp+0x5253cb)
#​8 main /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/allow_user_segv.cpp:72:10 (allow_user_segv.cpp.tmp+0x525581)
#​9 __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310 (libc.so.6+0x21b96)
#​10 _start (allow_user_segv.cpp.tmp+0x41d479)

SanitizerCommon-tsan-x86_64-Linux :: Linux/signal_line.cpp
FATAL: ThreadSanitizer CHECK failed: /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798 "((IsAppMem(x))) != (0)" (0x0, 0x0)
#​0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp:47:25 (signal_line.cpp.tmp+0x515a05)
#​1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:78:5 (signal_line.cpp.tmp+0x437eb3)
#​2 unsigned long __tsan::MemToShadowImpl<__tsan::Mapping>(unsigned long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798:3 (signal_line.cpp.tmp+0x4a463d)
#​3 __tsan::MemToShadow(unsigned long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:832:10 (signal_line.cpp.tmp+0x4fadde)
#​4 __tsan::MemoryAccess(__tsan::ThreadState*, unsigned long, unsigned long, int, bool, bool) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:830 (signal_line.cpp.tmp+0x4fadde)
#​5 __tsan::MemoryWrite(__tsan::ThreadState*, unsigned long, unsigned long, int) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:747 (signal_line.cpp.tmp+0x4fadde)
#​6 __tsan_write4 /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h:45 (signal_line.cpp.tmp+0x4fadde)
#​7 main /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/signal_line.cpp:16:28 (signal_line.cpp.tmp+0x52515c)
#​8 __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310 (libc.so.6+0x21b96)
#​9 _start (signal_line.cpp.tmp+0x41d359)

SanitizerCommon-tsan-x86_64-Linux :: Posix/dedup_token_length_test.cpp
env 'TSAN_OPTIONS=abort_on_error=0, dedup_token_length=1' /local/scratch/alr48/cheri/build/upstream-llvm-project-build/projects/compiler-rt/test/sanitizer_common/tsan-x86_64-Linux/Posix/Output/dedup_token_length_test.cpp.tmp
FATAL: ThreadSanitizer CHECK failed: /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798 "((IsAppMem(x))) != (0)" (0x0, 0x0)
#​0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp:47:25 (dedup_token_length_test.cpp.tmp+0x515a85)
#​1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:78:5 (dedup_token_length_test.cpp.tmp+0x437f33)
#​2 unsigned long __tsan::MemToShadowImpl<__tsan::Mapping>(unsigned long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798:3 (dedup_token_length_test.cpp.tmp+0x4a46bd)
#​3 __tsan::MemToShadow(unsigned long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:832:10 (dedup_token_length_test.cpp.tmp+0x4fae5e)
#​4 __tsan::MemoryAccess(__tsan::ThreadState*, unsigned long, unsigned long, int, bool, bool) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:830 (dedup_token_length_test.cpp.tmp+0x4fae5e)
#​5 __tsan::MemoryWrite(__tsan::ThreadState*, unsigned long, unsigned long, int) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:747 (dedup_token_length_test.cpp.tmp+0x4fae5e)
#​6 __tsan_write4 /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h:45 (dedup_token_length_test.cpp.tmp+0x4fae5e)
#​7 void Xyz::Abc<int, int>() /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cpp:17:11 (dedup_token_length_test.cpp.tmp+0x525279)
#​8 bar /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cpp:22:3 (dedup_token_length_test.cpp.tmp+0x525181)
#​9 FOO() /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cpp:26:3 (dedup_token_length_test.cpp.tmp+0x5251a5)
#​10 main /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cpp:30:3 (dedup_token_length_test.cpp.tmp+0x5251fd)
#​11 __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310 (libc.so.6+0x21b96)
#​12 _start (dedup_token_length_test.cpp.tmp+0x41d3d9)

SanitizerCommon-tsan-x86_64-Linux :: Posix/illegal_read_test.cpp
FATAL: ThreadSanitizer CHECK failed: /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798 "((IsAppMem(x))) != (0)" (0x0, 0x0)
#​0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp:47:25 (illegal_read_test.cpp.tmp+0x5159b5)
#​1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:78:5 (illegal_read_test.cpp.tmp+0x437e63)
#​2 unsigned long __tsan::MemToShadowImpl<__tsan::Mapping>(unsigned long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798:3 (illegal_read_test.cpp.tmp+0x4a45ed)
#​3 __tsan::MemToShadow(unsigned long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:832:10 (illegal_read_test.cpp.tmp+0x4f41ce)
#​4 __tsan::MemoryAccess(__tsan::ThreadState*, unsigned long, unsigned long, int, bool, bool) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:830 (illegal_read_test.cpp.tmp+0x4f41ce)
#​5 __tsan::MemoryRead(__tsan::ThreadState*, unsigned long, unsigned long, int) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:742 (illegal_read_test.cpp.tmp+0x4f41ce)
#​6 __tsan_read4 /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h:29 (illegal_read_test.cpp.tmp+0x4f41ce)
#​7 main /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/illegal_read_test.cpp:11:7 (illegal_read_test.cpp.tmp+0x5250f8)
#​8 __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310 (libc.so.6+0x21b96)
#​9 _start (illegal_read_test.cpp.tmp+0x41d309)

SanitizerCommon-tsan-x86_64-Linux :: Posix/illegal_write_test.cpp
FATAL: ThreadSanitizer CHECK failed: /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798 "((IsAppMem(x))) != (0)" (0x0, 0x0)
#​0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp:47:25 (illegal_write_test.cpp.tmp+0x5159b5)
#​1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:78:5 (illegal_write_test.cpp.tmp+0x437e63)
#​2 unsigned long __tsan::MemToShadowImpl<__tsan::Mapping>(unsigned long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798:3 (illegal_write_test.cpp.tmp+0x4a45ed)
#​3 __tsan::MemToShadow(unsigned long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:832:10 (illegal_write_test.cpp.tmp+0x4fad8e)
#​4 __tsan::MemoryAccess(__tsan::ThreadState*, unsigned long, unsigned long, int, bool, bool) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:830 (illegal_write_test.cpp.tmp+0x4fad8e)
#​5 __tsan::MemoryWrite(__tsan::ThreadState*, unsigned long, unsigned long, int) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:747 (illegal_write_test.cpp.tmp+0x4fad8e)
#​6 __tsan_write4 /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h:45 (illegal_write_test.cpp.tmp+0x4fad8e)
#​7 main /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/illegal_write_test.cpp:10:9 (illegal_write_test.cpp.tmp+0x5250f8)
#​8 __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310 (libc.so.6+0x21b96)
#​9 _start (illegal_write_test.cpp.tmp+0x41d309)

SanitizerCommon-tsan-x86_64-Linux :: Posix/sanitizer_set_report_fd_test.cpp
FATAL: ThreadSanitizer CHECK failed: /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798 "((IsAppMem(x))) != (0)" (0x0, 0x0)
#​0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp:47:25 (sanitizer_set_report_fd_test.cpp.tmp+0x515ad5)
#​1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:78:5 (sanitizer_set_report_fd_test.cpp.tmp+0x437f83)
#​2 unsigned long __tsan::MemToShadowImpl<__tsan::Mapping>(unsigned long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798:3 (sanitizer_set_report_fd_test.cpp.tmp+0x4a470d)
#​3 __tsan::MemToShadow(unsigned long) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:832:10 (sanitizer_set_report_fd_test.cpp.tmp+0x4faeae)
#​4 __tsan::MemoryAccess(__tsan::ThreadState*, unsigned long, unsigned long, int, bool, bool) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:830 (sanitizer_set_report_fd_test.cpp.tmp+0x4faeae)
#​5 __tsan::MemoryWrite(__tsan::ThreadState*, unsigned long, unsigned long, int) /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:747 (sanitizer_set_report_fd_test.cpp.tmp+0x4faeae)
#​6 __tsan_write4 /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h:45 (sanitizer_set_report_fd_test.cpp.tmp+0x4faeae)
#​7 main /local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cpp:31:9 (sanitizer_set_report_fd_test.cpp.tmp+0x525238)
#​8 __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310 (libc.so.6+0x21b96)
#​9 _start (sanitizer_set_report_fd_test.cpp.tmp+0x41d429)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions