On Tue, Oct 20, 2020 at 2:14 PM Ben Clayton <
headles...@gmail.com> wrote:
>
> > Does it crash with the same failure?
>
> With the TSAN fiber annotations removed, it typically crashes with something like:
>
> ThreadSanitizer:DEADLYSIGNAL
> ==480860==ERROR: ThreadSanitizer: SEGV on unknown address 0x0000000007f0 (pc 0x0000004d5546 bp 0x000000000020 sp 0x7bc402517530 T480860)
> ==480860==The signal is caused by a READ memory access.
> ==480860==Hint: address points to the zero page.
> #0 __tsan::TraceSwitch(__tsan::ThreadState*) /home/brian/src/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:638 (marl-unittests+0x4d5546)
> #1 ObtainCurrentStack<__sanitizer::BufferedStackTrace> /home/brian/src/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:656 (marl-unittests+0x4d5546)
> #2 TraceSwitch /home/brian/src/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:572 (marl-unittests+0x4d5546)
> #3 __tsan_trace_switch_thunk /home/brian/src/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S:53 (marl-unittests+0x4e9c99)
> #4 __tsan_read1 /home/brian/src/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:862 (marl-unittests+0x4d7db3)
> #5 MemoryAccess /home/brian/src/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:874 (marl-unittests+0x4d7db3)
> #6 MemoryRead /home/brian/src/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:742 (marl-unittests+0x4d7db3)
> #7 __tsan_read1 /home/brian/src/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h:21 (marl-unittests+0x4d7db3)
> #8 (anonymous namespace)::DefaultAllocator::allocate(marl::Allocation::Request const&) /home/ben/src/marl/build/../src/memory.cpp:209 (marl-unittests+0x5ff473)
> #9 marl::TrackedAllocator::allocate(marl::Allocation::Request const&) /home/ben/src/marl/build/../include/marl/memory.h:307 (marl-unittests+0x516024)
> #10 std::unique_ptr<marl::OSFiber, marl::Allocator::Deleter> marl::Allocator::make_unique_n<marl::OSFiber, marl::Allocator*&>(unsigned long, marl::Allocator*&) /home/ben/src/marl/build/../include/marl/memory.h:215 (marl-unittests+0x601f6e)
> #11 std::unique_ptr<marl::OSFiber, marl::Allocator::Deleter> marl::Allocator::make_unique<marl::OSFiber, marl::Allocator*&>(marl::Allocator*&) /home/ben/src/marl/build/../include/marl/memory.h:201 (marl-unittests+0x601f6e)
> #12 marl::OSFiber::createFiber(marl::Allocator*, unsigned long, std::function<void ()> const&) /home/ben/src/marl/build/../src/osfiber_asm.h:168 (marl-unittests+0x601f6e)
>
>
> However, the number of mmaps might have something to do with all those stacks=24344[245044], right?
> ==480860==ERROR: ThreadSanitizer: SEGV on unknown address 0x0000000007f0 (pc 0x0000004d5546 bp 0x000000000020 sp 0x7bc402517530 T480860)
stack, this will create lots of VMA regions. Perhaps you are already