[Gc] pthread_suspend failed - using pthread_exit(0)
baylorpaul at gmail.com
Wed Aug 17 10:30:00 PDT 2011
I am a contributor to XMLVM - https://xmlvm.org/
Using the Boehm garbage collector, I have recently run into a case where I
am getting an error "pthread_suspend failed" using OSX.
At that point, the main thread had called pthread_exit(0), so as not to
terminate while other threads are still running. Shortly afterwords, the
If I wait on a condition (in order to keep the process alive), rather than
invoke pthread_exit(0), the error does not occur.
I suspect the GC thinks the main thread is still running, even after calling
pthread_exit(0). Part of that theory is based on:
There it mentions "a race condition making libgc think there are more
threads than in actuality."
At the time of error, all remaining threads besides the thread invoking
GC_MALLOC were "in __semwait_signal ()".
Would you have any insight as to why this error is occurring?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gc