|
From: Matthias S. <zz...@ge...> - 2015-09-04 20:52:05
|
Hi! The test helgrind/tests/stackteardown sometimes crashes with a SIGSEGV inside of pthread_create. gentoo, amd64, glibc-2.21-r1, gcc-4.9.3 It seems that this crash happens when the created thread already exited (or at least unmapped the stack). pthread_create.c:711: if (pd->stopped_start) The test app crashes also without valgrind. I wonder if the child thread needs a bit of waiting to make main leave pthread_create? --- stackteardown.stderr.exp 2015-05-17 14:29:09.000000000 +0200 +++ stackteardown.stderr.out 2015-09-04 20:08:03.000000000 +0200 @@ -1,3 +1,14 @@ +Process terminating with default action of signal 11 (SIGSEGV) + Access not within mapped region at address 0x........ + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (stackteardown.c:105) + If you believe this happened as a result of a stack + overflow in your program's main thread (unlikely but + possible), you can try to increase the size of the + main thread stack using the --main-stacksize= flag. + The main thread stack size used in this run was .... + ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) directly executed: ==29782== Process terminating with default action of signal 11 (SIGSEGV) ==29782== Access not within mapped region at address 0x4032D13 ==29782== at 0x4E43ABD: pthread_create@@GLIBC_2.2.5 (pthread_create.c:711) ==29782== by 0x4C3073C: pthread_create_WRK (hg_intercepts.c:427) ==29782== by 0x4C31815: pthread_create@* (hg_intercepts.c:460) ==29782== by 0x40098C: main (stackteardown.c:105) without valgrind: (gdb) bt #0 __pthread_create_2_1 (newthread=0x7fffffffd8e8, attr=<optimized out>, start_routine=0x40086b <child_fn>, arg=0x0) at pthread_create.c:711 #1 0x000000000040098d in main () at stackteardown.c:105 (gdb) info threads Id Target Id Frame * 1 Thread 0x7ffff7fb4700 (LWP 24672) "stackteardown" __pthread_create_2_1 (newthread=0x7fffffffd8e8, attr=<optimized out>, start_routine=0x400 86b <child_fn>, arg=0x0) at pthread_create.c:711 Regards Matthias |