Bug 74201 - pthread_create fails to return from pthread wait for restart
Summary: pthread_create fails to return from pthread wait for restart
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 7.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-09-17 19:57 UTC by Need Real Name
Modified: 2016-11-24 15:14 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-09-17 19:57:21 UTC
Embargoed:


Attachments (Terms of Use)

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.



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