Bug 74201

Summary: pthread_create fails to return from pthread wait for restart
Product: [Retired] Red Hat Linux Reporter: Need Real Name <pma>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: fweimer
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-09-17 19:57:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2002-09-17 19:57:14 UTC
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:

Comment 1 Need Real Name 2002-09-20 14:47:05 UTC
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.