llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.27k stars 11.68k forks source link

Deadlock with libasan with 13.0.0 #53417

Open diorcety opened 2 years ago

diorcety commented 2 years ago

We have updated our toolchain few days ago from 11.0.0 to 13.0.0 using also the associated compiler-rt library for the asan part. Since then our CI fails due to timeout on the tests. Indeed one of our tests (not always the same) blocks during loading. We have try with success to use the version 12.0.1 of the compiler-rt, the "regression" seems to appear on the 13.0.0

The issue may be linked to the modification done here: https://reviews.llvm.org/D98926. it doesn't seem to work well with our (old?) glibc. From my point of view there is a deadlock on dl_load_write_lock dl_load_lock mutexes when using dlopen with libasan. Seems also pretty close to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77982

Here the gdb backtraces

(gdb) thread apply all bt

Thread 21 (Thread 0xe4ffdb40 (LWP 164) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa6d12 in __lll_lock_wait () at ../sysdeps/unix/sysv/linux/i386/lowlevellock.S:144
#2  0xf6fa0919 in __GI___pthread_mutex_lock (mutex=0xf7f704e4 <_rtld_global+1220>) at ../nptl/pthread_mutex_lock.c:115
#3  0xf7f5d928 in tls_get_addr_tail (ti=0xe4ffc778, dtv=0xf39676e8, the_map=0xf7f46568) at dl-tls.c:765
#4  0xf7a5f714 in __interceptor___tls_get_addr () at /work/compiler-rt-13.0.0.src/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:5321
#5  0xf7a06604 in CollectStaticTlsBlocks () at /work/compiler-rt-13.0.0.src/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:355
#6  0xf6d05bae in __GI___dl_iterate_phdr (callback=0xf7a065b0 <CollectStaticTlsBlocks()>, data=0xe4ffc848) at dl-iteratephdr.c:76
#7  0xf7a0544b in GetStaticTlsBoundary () at /work/compiler-rt-13.0.0.src/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:371
#8  GetTls () at /work/compiler-rt-13.0.0.src/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:472
#9  0xf7a0599a in __sanitizer::GetThreadStackAndTls(bool, unsigned long*, unsigned long*, unsigned long*, unsigned long*) () at /work/compiler-rt-13.0.0.src/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:560
#10 0xf7aa28fd in SetThreadStackAndTls () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:307
#11 0xf7aa24a1 in Init () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:235
#12 0xf7aa2a06 in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:265
#13 0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#14 0xf6f9e295 in start_thread (arg=0xe4ffdb40) at pthread_create.c:333
#15 0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 20 (Thread 0xe5fffb40 (LWP 163) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3e36 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/i686/../pthread_cond_timedwait.S:245
#2  0xf750e8f8 in EventMonotonic::tryWait (this=<optimized out>, milliseconds=<optimized out>) at src/EventMonotonic.cpp:82
#3  0xf773e59e in Watchdog::run (this=0xf5b3fa40) at src/Watchdog.cpp:101
#4  0xf7510677 in ExtRunnable::run (this=<optimized out>) at src/ExtRunnable.cpp:52
#5  0xf76057e0 in XXThreadPool::AutoDeleteRunnable::run (this=0xf4dd0450) at src/XXThreadPool.cpp:45
#6  0xf72ca7ca in Poco::PooledThread::run() () from /opt/XX/lib/libPocoFoundation.so.81
#7  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#8  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#9  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#10 0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#11 0xf6f9e295 in start_thread (arg=0xe5fffb40) at pthread_create.c:333
#12 0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 19 (Thread 0xe57feb40 (LWP 162) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf728c4ac in Poco::TimedNotificationQueue::waitDequeueNotification() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf7122bdc in Poco::Util::Timer::run() () from /opt/XX/lib/libPocoUtil.so.81
#5  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#7  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#8  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#9  0xf6f9e295 in start_thread (arg=0xe57feb40) at pthread_create.c:333
#10 0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 18 (Thread 0xe6cfab40 (LWP 161) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3e36 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/i686/../pthread_cond_timedwait.S:245
#2  0xf7254dad in Poco::EventImpl::waitImpl(long) () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf7510d3c in Poco::Event::tryWait (this=<optimized out>, milliseconds=137) at /builds/mpu-components/xx/Poco/include/Poco/Event.h:120
#4  ExtRunnable::sleep (milliseconds=500) at src/ExtRunnable.cpp:90
#5  0xf6750715 in WWWWClientSession::initProtocol (this=<optimized out>) at src/WWWWClientSession.cpp:199
#6  0xf672bdca in WWWWClientProtocol::processMessages (this=<optimized out>) at src/WWWWClientProtocol.cpp:137
#7  0xf6aa043c in ClientProtocol::execute (this=<optimized out>) at src/ClientProtocol.cpp:212
#8  0xf6ab9778 in Poco::RunnableAdapter<ClientProtocol>::run (this=0xf4dcde10) at /builds/mpu-components/xx/Poco/include/Poco/RunnableAdapter.h:64
#9  0xf7510677 in ExtRunnable::run (this=<optimized out>) at src/ExtRunnable.cpp:52
#10 0xf76057e0 in XXThreadPool::AutoDeleteRunnable::run (this=0xf4dcddf0) at src/XXThreadPool.cpp:45
#11 0xf72ca7ca in Poco::PooledThread::run() () from /opt/XX/lib/libPocoFoundation.so.81
#12 0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#13 0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#14 0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#15 0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#16 0xf6f9e295 in start_thread (arg=0xe6cfab40) at pthread_create.c:333
#17 0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 17 (Thread 0xe74fbb40 (LWP 160) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf72ca83d in Poco::PooledThread::run() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#5  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#7  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#8  0xf6f9e295 in start_thread (arg=0xe74fbb40) at pthread_create.c:333
#9  0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 16 (Thread 0xe7cfcb40 (LWP 159) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf72ca83d in Poco::PooledThread::run() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#5  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#7  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#8  0xf6f9e295 in start_thread (arg=0xe7cfcb40) at pthread_create.c:333
#9  0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 15 (Thread 0xe84fdb40 (LWP 158) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf728c4ac in Poco::TimedNotificationQueue::waitDequeueNotification() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf7122bdc in Poco::Util::Timer::run() () from /opt/XX/lib/libPocoUtil.so.81
#5  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#7  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#8  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#9  0xf6f9e295 in start_thread (arg=0xe84fdb40) at pthread_create.c:333
#10 0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 14 (Thread 0xe8cfeb40 (LWP 157) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf728c4ac in Poco::TimedNotificationQueue::waitDequeueNotification() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf7122bdc in Poco::Util::Timer::run() () from /opt/XX/lib/libPocoUtil.so.81
#5  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#7  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#8  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#9  0xf6f9e295 in start_thread (arg=0xe8cfeb40) at pthread_create.c:333
#10 0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 13 (Thread 0xe94ffb40 (LWP 156) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf728c4ac in Poco::TimedNotificationQueue::waitDequeueNotification() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf7122bdc in Poco::Util::Timer::run() () from /opt/XX/lib/libPocoUtil.so.81
#5  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#7  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#8  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#9  0xf6f9e295 in start_thread (arg=0xe94ffb40) at pthread_create.c:333
#10 0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 12 (Thread 0xea1ffb40 (LWP 155) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf728c4ac in Poco::TimedNotificationQueue::waitDequeueNotification() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf7122bdc in Poco::Util::Timer::run() () from /opt/XX/lib/libPocoUtil.so.81
#5  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#7  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#8  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#9  0xf6f9e295 in start_thread (arg=0xea1ffb40) at pthread_create.c:333
#10 0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 11 (Thread 0xeab9db40 (LWP 154) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf728c4ac in Poco::TimedNotificationQueue::waitDequeueNotification() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf7122bdc in Poco::Util::Timer::run() () from /opt/XX/lib/libPocoUtil.so.81
#5  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#7  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#8  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#9  0xf6f9e295 in start_thread (arg=0xeab9db40) at pthread_create.c:333
#10 0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 10 (Thread 0xd6dffb40 (LWP 153) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf728c4ac in Poco::TimedNotificationQueue::waitDequeueNotification() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf7122bdc in Poco::Util::Timer::run() () from /opt/XX/lib/libPocoUtil.so.81
#5  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#7  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#8  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#9  0xf6f9e295 in start_thread (arg=0xd6dffb40) at pthread_create.c:333
#10 0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 9 (Thread 0xd53ffb40 (LWP 152) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf728c4ac in Poco::TimedNotificationQueue::waitDequeueNotification() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf7122bdc in Poco::Util::Timer::run() () from /opt/XX/lib/libPocoUtil.so.81
#5  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#7  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#8  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#9  0xf6f9e295 in start_thread (arg=0xd53ffb40) at pthread_create.c:333
#10 0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 8 (Thread 0xd2bfab40 (LWP 151) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf72ca83d in Poco::PooledThread::run() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#5  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#7  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#8  0xf6f9e295 in start_thread (arg=0xd2bfab40) at pthread_create.c:333
#9  0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 7 (Thread 0xf36ffb40 (LWP 150) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa6d12 in __lll_lock_wait () at ../sysdeps/unix/sysv/linux/i386/lowlevellock.S:144
#2  0xf6fa0919 in __GI___pthread_mutex_lock (mutex=0xf7f704fc <_rtld_global+1244>) at ../nptl/pthread_mutex_lock.c:115
#3  0xf7f56a15 in _dl_add_to_namespace_list (new=new@entry=0xf2d1d580, nsid=nsid@entry=0) at dl-object.c:34
#4  0xf7f51de8 in _dl_map_object_from_fd (name=name@entry=0xd32127c0 "/tmp/KTest5iRhYS/bin/codeCache/com.YYY.xx.hal.serialGPS.so", origname=origname@entry=0x0, fd=-1, fbp=0xf36fce9c, realname=0xf5dbf5c0 "/tmp/KTest5iRhYS/bin/codeCache/com.YYY.xx.hal.serialGPS.so", loader=0x0, l_type=2, mode=-1879047935, stack_endp=0xf36fce98, nsid=0) at dl-load.c:1441
#5  0xf7f5447d in _dl_map_object (loader=0x0, loader@entry=0xf7f46298, name=name@entry=0xd32127c0 "/tmp/KTest5iRhYS/bin/codeCache/com.YYY.xx.hal.serialGPS.so", type=type@entry=2, trace_mode=0, mode=-1879047935, nsid=0) at dl-load.c:2498
#6  0xf7f5f512 in dl_open_worker (a=0xf36fd24c) at dl-open.c:237
#7  0xf7f5b304 in _dl_catch_error (objname=objname@entry=0xf36fd244, errstring=errstring@entry=0xf36fd248, mallocedp=mallocedp@entry=0xf36fd243, operate=0xf7f5f470 <dl_open_worker>, args=0xf36fd24c) at dl-error.c:187
#8  0xf7f5f002 in _dl_open (file=0xd32127c0 "/tmp/KTest5iRhYS/bin/codeCache/com.YYY.xx.hal.serialGPS.so", mode=-2147483391, caller_dlopen=0xf7a6d12b <__interceptor_dlopen()+491>, nsid=<optimized out>, argc=2, argv=0xfff24764, env=0xf4f17180) at dl-open.c:660
#9  0xf6f948bd in dlopen_doit (a=0xf36fd400) at dlopenold.c:54
#10 0xf7f5b304 in _dl_catch_error (objname=0xc71fac3c, errstring=0xc71fac40, mallocedp=0xc71fac38, operate=0xf6f94850 <dlopen_doit>, args=0xf36fd400) at dl-error.c:187
#11 0xf6f9430d in _dlerror_run (operate=operate@entry=0xf6f94850 <dlopen_doit>, args=args@entry=0xf36fd400) at dlerror.c:163
#12 0xf6f94939 in __dlopen_nocheck (file=0xd32127c0 "/tmp/KTest5iRhYS/bin/codeCache/com.YYY.xx.hal.serialGPS.so", mode=257) at dlopenold.c:76
#13 0xf7a6d12b in __interceptor_dlopen () at /work/compiler-rt-13.0.0.src/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:6309
#14 0xf72b5c64 in Poco::SharedLibraryImpl::loadImpl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) () from /opt/XX/lib/libPocoFoundation.so.81
#15 0xf72b5fb5 in Poco::SharedLibrary::SharedLibrary(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /opt/XX/lib/libPocoFoundation.so.81
#16 0xf78dc9b3 in Poco::ClassLoader<Poco::OSP::BundleActivator>::loadLibrary (this=<optimized out>, path=..., manifest=...) at /builds/mpu-components/xx/Poco/include/Poco/ClassLoader.h:164
#17 0xf7097c5d in Poco::OSP::BundleLoader::loadActivator(Poco::OSP::BundleLoader::BundleInfo&) () from /opt/XX/lib/libPocoOSP.so.2
#18 0xf70971f4 in Poco::OSP::BundleLoader::startBundle(Poco::OSP::Bundle*) () from /opt/XX/lib/libPocoOSP.so.2
#19 0xf707bf4a in Poco::OSP::Bundle::start() () from /opt/XX/lib/libPocoOSP.so.2
#20 0xf7092cd9 in Poco::OSP::BundleLoader::startAllBundles() () from /opt/XX/lib/libPocoOSP.so.2
#21 0xf70b9e13 in Poco::OSP::OSPSubsystem::startBundles(Poco::Util::Application&) () from /opt/XX/lib/libPocoOSP.so.2
#22 0xf70b8eb2 in Poco::OSP::OSPSubsystem::initialize(Poco::Util::Application&) () from /opt/XX/lib/libPocoOSP.so.2
#23 0xf710a24a in Poco::Util::Application::initialize(Poco::Util::Application&) () from /opt/XX/lib/libPocoUtil.so.81
#24 0xf78c627a in KTest::TestServerApplication::initialize (this=<optimized out>, self=...) at src/KTestApplication.cpp:136
#25 0xf710c4c0 in Poco::Util::Application::run() () from /opt/XX/lib/libPocoUtil.so.81
#26 0xf711ec8c in Poco::Util::ServerApplication::run() () from /opt/XX/lib/libPocoUtil.so.81
#27 0xf711f497 in Poco::Util::ServerApplication::run(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) () from /opt/XX/lib/libPocoUtil.so.81
#28 0xf78cca19 in KTest::TestServerApplicationScope::run (this=<optimized out>) at src/KTestApplication.cpp:224
#29 0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#30 0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#31 0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#32 0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#33 0xf6f9e295 in start_thread (arg=0xf36ffb40) at pthread_create.c:333
#34 0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 6 (Thread 0xcbcffb40 (LWP 86) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf72ca83d in Poco::PooledThread::run() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#5  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#7  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#8  0xf6f9e295 in start_thread (arg=0xcbcffb40) at pthread_create.c:333
#9  0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 5 (Thread 0xcf2ffb40 (LWP 81) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf72ca83d in Poco::PooledThread::run() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#5  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#7  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#8  0xf6f9e295 in start_thread (arg=0xcf2ffb40) at pthread_create.c:333
#9  0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 4 (Thread 0xd9affb40 (LWP 65) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf72ca83d in Poco::PooledThread::run() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#5  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#7  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#8  0xf6f9e295 in start_thread (arg=0xd9affb40) at pthread_create.c:333
#9  0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 3 (Thread 0xec7fcb40 (LWP 30) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf72ca83d in Poco::PooledThread::run() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#5  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#7  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#8  0xf6f9e295 in start_thread (arg=0xec7fcb40) at pthread_create.c:333
#9  0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 2 (Thread 0xecffdb40 (LWP 29) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf7254b16 in Poco::EventImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf72ca83d in Poco::PooledThread::run() () from /opt/XX/lib/libPocoFoundation.so.81
#4  0xf72c970f in ?? () from /opt/XX/lib/libPocoFoundation.so.81
#5  0xf72c8274 in Poco::ThreadImpl::runnableEntry(void*) () from /opt/XX/lib/libPocoFoundation.so.81
#6  0xf7aa2a7a in ThreadStart () at /work/compiler-rt-13.0.0.src/lib/asan/asan_thread.cpp:278
#7  0xf7a81b8f in asan_thread_start(void*) () at /work/compiler-rt-13.0.0.src/lib/asan/asan_interceptors.cpp:198
#8  0xf6f9e295 in start_thread (arg=0xecffdb40) at pthread_create.c:333
#9  0xf6cd01ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Thread 1 (Thread 0xf60bb100 (LWP 21) "DummyTests"):
#0  0xf7f4b079 in __kernel_vsyscall ()
#1  0xf6fa3a6c in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xf72b56d5 in Poco::SemaphoreImpl::waitImpl() () from /opt/XX/lib/libPocoFoundation.so.81
#3  0xf78c7dba in Poco::Semaphore::wait (this=0xfff240e4) at /builds/mpu-components/xx/Poco/include/Poco/Semaphore.h:117
#4  KTest::TestServerApplicationScope::TestServerApplicationScope(char const*, std::function<void (KTest::TestServerApplication&)>) (this=<optimized out>, argv0=<optimized out>, initializer=...) at src/KTestApplication.cpp:179
#5  0x00407e61 in Dummy_vehicleMonitoring_Test::TestBody (this=<optimized out>) at src/main.cpp:6
#6  0xf786e638 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) () from /opt/XX/lib/libgtest.so
#7  0xf7848157 in testing::Test::Run() () from /opt/XX/lib/libgtest.so
#8  0xf78495f2 in testing::TestInfo::Run() () from /opt/XX/lib/libgtest.so
#9  0xf7849e19 in testing::TestSuite::Run() () from /opt/XX/lib/libgtest.so
#10 0xf7858db9 in testing::internal::UnitTestImpl::RunAllTests() () from /opt/XX/lib/libgtest.so
#11 0xf786f448 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) () from /opt/XX/lib/libgtest.so
#12 0xf7858887 in testing::UnitTest::Run() () from /opt/XX/lib/libgtest.so
#13 0x00409a27 in RUN_ALL_TESTS () at /builds/mpu-components/xx/GoogleTest/include/gtest/gtest.h:2473
#14 main (argc=<optimized out>, argv=<optimized out>) at src/main.cpp:35

Clang & LLD: 13.0.0 Compiler-rt: Version 13.0.0 GLIBC: Ubuntu GLIBC 2.23-0ubuntu11.3

HShan886 commented 2 years ago

I got an same error, any help will be pleasure