Open kulkrohit opened 3 years ago
Interesting. It seems we call real_clock_gettime before interceptor initialization. Wonder why it never fired before... Shouldn't COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED check in real_clock_gettime help?... Does setting allocator_release_to_os_interval_ms=0 help?
allocator_release_to_os_interval_ms=0 does not help either. Same trace as above.
Weird, MonotonicNanoTime should not even be called with allocator_release_to_os_interval_ms=0: https://github.com/llvm/llvm-project/blob/84e8257937ec6a332aa0b688f4dce57016516ffd/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h#L714 But maybe gcc9 has some other version of the code...
Actually slightly different trace with allocator_release_to_os_interval_ms=0
at ../../../../libsanitizer/sanitizer_common/sanitizer_allocator_primary64.h:133
at ../../../../libsanitizer/sanitizer_common/sanitizer_common.h:385
Here is the trace:
0 0x0000000000000000 in ?? ()
1 0x00007ffff6e63d17 in __sanitizer::MonotonicNanoTime () at ../../../../libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:794
2 0x00007ffff6e3ffa4 in sanitizer::SizeClassAllocator64<tsan::AP64>::PopulateFreeArray (this=this@entry=0x7ffff70d4940 <__tsan::allocator_placeholder>, stat=stat@entry=0x7ffff5a0db70,
3 0x00007ffff6e401ba in sanitizer::SizeClassAllocator64<tsan::AP64>::GetFromAllocator (this=this@entry=0x7ffff70d4940 <__tsan::allocator_placeholder>, stat=stat@entry=0x7ffff5a0db70,
4 0x00007ffff6e4022e in sanitizer::SizeClassAllocator64LocalCache<sanitizer::SizeClassAllocator64<__tsan::AP64> >::Refill (this=this@entry=0x7ffff5a00010, c=c@entry=0x7ffff5a00830,
5 0x00007ffff6e3eaaf in sanitizer::SizeClassAllocator64LocalCache<sanitizer::SizeClassAllocator64<__tsan::AP64> >::Allocate (class_id=2,
6 sanitizer::CombinedAllocator<sanitizer::SizeClassAllocator64<__tsan::AP64>, sanitizer::SizeClassAllocatorLocalCache<sanitizer::SizeClassAllocator64<__tsan::AP64> >, sanitizer::LargeMmapAllocator<tsan::MapUnmapCallback, __sanitizer::LargeMmapAllocatorPtrArrayDynamic> >::Allocate (alignment=16, size=, cache=,
7 __tsan::user_alloc_internal (signal=, align=16, sz=32, pc=140737335247302, thr=0x7ffff6784740) at ../../../../libsanitizer/tsan/tsan_mman.cc:162
8 __tsan::user_alloc_internal (thr=0x7ffff6784740, pc=140737335247302, sz=32, align=16, signal=) at ../../../../libsanitizer/tsan/tsan_mman.cc:154
9 0x00007ffff6e3ec7b in __tsan::user_calloc (thr=thr@entry=0x7ffff6784740, pc=, size=size@entry=1, n=n@entry=32) at ../../../../libsanitizer/tsan/tsan_mman.cc:197
10 0x00007ffff6dfc1d7 in __interceptor_calloc (size=1, n=32) at ../../../../libsanitizer/tsan/tsan_interceptors.cc:681
11 0x0000003e18201310 in _dlerror_run () from /lib64/libdl.so.2
12 0x0000003e1820107a in dlsym () from /lib64/libdl.so.2
13 0x00007ffff6e70b65 in interception::GetRealFunctionAddress (func_name=func_name@entry=0x7ffff6e864b9 "mmap", func_addr=func_addr@entry=0x7ffff70c28a8 <interception::real_mmap>,
14 0x00007ffff6e223a5 in InitializeCommonInterceptors () at ../../../../libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7240
15 __tsan::InitializeInterceptors () at ../../../../libsanitizer/tsan/tsan_interceptors.cc:2595
16 0x00007ffff6e46688 in __tsan::Initialize (thr=thr@entry=0x7ffff6784740) at ../../../../libsanitizer/tsan/tsan_rtl.cc:372
17 0x00007ffff6dfaa93 in tsan::ScopedInterceptor::ScopedInterceptor (this=this@entry=0x7fffffffd5b0, thr=0x7ffff6784740, pc=140737332463438, fname=0x7ffff6e852ed "cxa_atexit")
18 0x00007ffff6dfbd36 in __interceptor___cxa_atexit (f=f@entry=0x7ffff6b51620 <std::pmr::(anonymous namespace)::constant_init<std::pmr::(anonymous namespace)::newdel_res_t>::~constant_init()>,
19 0x00007ffff6b5474e in static_initialization_and_destruction_0 (initialize_p=1, __priority=65535) at ../../../../../libstdc++-v3/src/c++17/memory_resource.cc:1394
20 _GLOBAL__sub_I_memory_resource.cc(void) () at ../../../../../libstdc++-v3/src/c++17/memory_resource.cc:1394
21 0x00007ffff6b6c0e2 in __do_global_ctors_aux () from /cad/tools/gnu/gcc/9.1.0/lib64/libstdc++.so.6
22 0x00007fffffffd6a8 in ?? ()
23 0x0000000000000001 in ?? ()
24 0x00007fffffffd6a8 in ?? ()
25 0x00007ffff6a7489b in _init () from /cad/tools/gnu/gcc/9.1.0/lib64/libstdc++.so.6
26 0x00007ffff69df9c0 in ?? ()
27 0x0000003e1760e985 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
28 0x0000003e17600b6a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
29 0x0000000000000001 in ?? ()
30 0x00007fffffffdb26 in ?? ()
31 0x0000000000000000 in ?? ()