From Bugzilla Helper: User-Agent: Mozilla/4.77C-SGI [en] (X11; I; IRIX 6.5-ALPHA-1277435220 IP22) Description of problem: It seems that it is possible for a pthread_create_2_1 call to fail return from the __libc_write() call to make its suspend(self) call before the thread_manager processes the REQ_CREATE request and calls restart(caller). If this is the case, since the calling thread is not yet suspended when the restart() call is made, it will never be restarted when it does eventually suspend itself. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Add a sleep() before the suspend(self) call in pthread_create_2_1 to simulate the timing. 2. 3. Actual Results: The pthread_create call remains hung in pthread_wait_for_restart. Expected Results: The pthread_create should have returned to the caller. Additional info:
This isn't a bug in pthreads. The application was using sigprocmask to unblock all signals and as a result was clobbering the restart signal assumed blocked by pthreads that it uses for restart. The application should have been using pthread_sigmask which is __pthread_sig_restart sensitive.