Bug 18026 - SIGSEGV on shutdown in threadpool stress test
Summary: SIGSEGV on shutdown in threadpool stress test
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-02-26 13:16 UTC by Mark Probst
Modified: 2014-02-26 14:08 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Test case (1.24 KB, application/octet-stream)
2014-02-26 13:16 UTC, Mark Probst

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Mark Probst 2014-02-26 13:16:44 UTC
Created attachment 6157 [details]
Test case

Running this program on Linux/AMD64 often results in a SIGSEGV in pthread_join():

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7fe17c0 (LWP 27920)]
0x00007ffff74b5184 in pthread_join () from /lib/x86_64-linux-gnu/libpthread.so.0
(gdb) backtrace 
#0  0x00007ffff74b5184 in pthread_join () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x000000000065a829 in mono_thread_join (tid=0x7fff6f377700) at threads.c:4786
#2  0x0000000000655bc6 in wait_for_tids (wait=0x7fffffffda80, timeout=4294967295) at threads.c:2614
#3  0x0000000000656883 in mono_thread_manage () at threads.c:2885
#4  0x00000000004d0e6a in mono_main (argc=2, argv=0x7fffffffe178) at driver.c:2010
#5  0x0000000000413413 in mono_main_with_options (argc=2, argv=0x7fffffffe178) at main.c:91
#6  0x0000000000413443 in main (argc=2, argv=0x7fffffffe178) at main.c:122

My guess is that there's a race condition where we end up joining a thread more than once.
Comment 1 Mark Probst 2014-02-26 14:08:11 UTC
Fixed in 484d5d0408f763541431316f11782f5810750449.