Red Hat Bugzilla – Bug 74201
pthread_create fails to return from pthread wait for restart
Last modified: 2016-11-24 10:14:53 EST
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
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):
Steps to Reproduce:
1. Add a sleep() before the suspend(self) call in pthread_create_2_1 to
simulate the timing.
Actual Results: The pthread_create call remains hung in
Expected Results: The pthread_create should have returned to the caller.
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.