Bug 74201 - pthread_create fails to return from pthread wait for restart
pthread_create fails to return from pthread wait for restart
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-09-17 15:57 EDT by Need Real Name
Modified: 2016-11-24 10:14 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-09-17 15:57:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2002-09-17 15:57:14 EDT
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 10:47:05 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.