mercredi 25 mars 2015

gcc thread sanitizer (tsan) crashes when trying to acquire pthread_mutex_lock()

We are trying to use TSAN in our project. Unfortunately we are seeing a crash in pthread library when we integrate with tsan. Could you please let us know what could be the issue here?


Stack trace:



Program received signal SIGSEGV, Segmentation fault.
0x00007ffff59453a0 in pthread_mutex_lock () from /lib64/libpthread.so.0


Thread 1 (Thread 0x7ffff6c44c80 (LWP 7276)):



#0 0x00007ffff59453a0 in pthread_mutex_lock () from /lib64/libpthread.so.0
#1 0x00007ffff5b98970 in pthread_mutex_lock () at ../../../../libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:2223
.
.
.
#8 0x00007ffff7d53b4d in __libc_csu_init ()
#9 0x00007ffff47edcf0 in __libc_start_main () from /lib64/libc.so.6
#10 0x00007ffff6fa6e99 in _start ()


Thread 2 (Thread 0x7ffff2fff700 (LWP 7294)):



#0 0x00007ffff487ba3d in nanosleep () from /lib64/libc.so.6
#1 0x00007ffff487b8b0 in sleep () from /lib64/libc.so.6
#2 0x00007ffff5ba918b in sleep () at ../../../../libsanitizer/tsan/tsan_interceptors.cc:239
#3 0x00007ffff5b89265 in __tsan::BackgroundThread(void*) () at ../../../../libsanitizer/tsan/tsan_rtl.cc:137
#4 0x00007ffff59439d1 in start_thread () from /lib64/libpthread.so.0
#5 0x00007ffff48b79dd in clone () from /lib64/libc.so.6


Machine: Linux x86_64



gcc flags: -m64 -g -fPIC -pie -fsanitize=thread -fno-omit-frame-pointer -L/usr/lib/software/gnu/gcc/4.9.2/lib64/ -ltsan


Could you please let us know what could be the issue here?


Aucun commentaire:

Enregistrer un commentaire