public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/379] New: pthread_create fails but the thread executes some instructions
@ 2004-09-10 14:15 sebastien dot decugis at ext dot bull dot net
  2004-09-10 14:17 ` [Bug nptl/379] " sebastien dot decugis at ext dot bull dot net
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: sebastien dot decugis at ext dot bull dot net @ 2004-09-10 14:15 UTC (permalink / raw)
  To: glibc-bugs

On some failure cases of the pthread_create routine, for exemple when specifying
a high-priority as a standard user which have not enough rights, the
pthread_create will return an error ENOPERM (which is normal) but the
not-created thread will execute for some instructions before being killed. 

This can lead to some problems for exemple when the first instruction of the new
thread is a mutex_lock!

-- 
           Summary: pthread_create fails but the thread executes some
                    instructions
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: sebastien dot decugis at ext dot bull dot net
                CC: glibc-bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=379

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nptl/379] pthread_create fails but the thread executes some instructions
  2004-09-10 14:15 [Bug nptl/379] New: pthread_create fails but the thread executes some instructions sebastien dot decugis at ext dot bull dot net
@ 2004-09-10 14:17 ` sebastien dot decugis at ext dot bull dot net
  2004-09-10 14:36 ` jakub at redhat dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sebastien dot decugis at ext dot bull dot net @ 2004-09-10 14:17 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From sebastien dot decugis at ext dot bull dot net  2004-09-10 14:17 -------
Created an attachment (id=191)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=191&action=view)
This sample shows the bug (on an SMP machine)

I often get the following trace from this program execution (The "should not
see me" shows that the test failed) -- kernel is 2.6.8.1; NPTL from 2004/09/06;
2-way box:

[thedoc@nptl tmp]$ ./create
Test starting...
Thread attribute is ready, creating the thread...
Test passed
Should not see me

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=379

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nptl/379] pthread_create fails but the thread executes some instructions
  2004-09-10 14:15 [Bug nptl/379] New: pthread_create fails but the thread executes some instructions sebastien dot decugis at ext dot bull dot net
  2004-09-10 14:17 ` [Bug nptl/379] " sebastien dot decugis at ext dot bull dot net
@ 2004-09-10 14:36 ` jakub at redhat dot com
  2004-09-10 14:52 ` sebastien dot decugis at ext dot bull dot net
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at redhat dot com @ 2004-09-10 14:36 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jakub at redhat dot com  2004-09-10 14:36 -------
What --enable-kernel are you using?
If 2.6.1 and later, then kill __ASSUME_CLONE_STOPPED in
sysdeps/unix/sysv/linux/kernel_features.h
That would explain why I can't reproduce this.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


http://sources.redhat.com/bugzilla/show_bug.cgi?id=379

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nptl/379] pthread_create fails but the thread executes some instructions
  2004-09-10 14:15 [Bug nptl/379] New: pthread_create fails but the thread executes some instructions sebastien dot decugis at ext dot bull dot net
  2004-09-10 14:17 ` [Bug nptl/379] " sebastien dot decugis at ext dot bull dot net
  2004-09-10 14:36 ` jakub at redhat dot com
@ 2004-09-10 14:52 ` sebastien dot decugis at ext dot bull dot net
  2004-09-10 15:10 ` sebastien dot decugis at ext dot bull dot net
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sebastien dot decugis at ext dot bull dot net @ 2004-09-10 14:52 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From sebastien dot decugis at ext dot bull dot net  2004-09-10 14:52 -------
Yes I'm using --enable-kernel=2.6.8.1 (with a running kernel 2.6.8.1).

Do you tell me to remove the following lines?
368 /* The CLONE_STOPPED flag was introduced in the 2.6.0-test1 series.  */
369 #if __LINUX_KERNEL_VERSION >= 132609
370 # define __ASSUME_CLONE_STOPPED 1
371 #endif

Well, if that's it, shouldn't this be considered as a bug ?!?

Thanks!
Seb.


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=379

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nptl/379] pthread_create fails but the thread executes some instructions
  2004-09-10 14:15 [Bug nptl/379] New: pthread_create fails but the thread executes some instructions sebastien dot decugis at ext dot bull dot net
                   ` (2 preceding siblings ...)
  2004-09-10 14:52 ` sebastien dot decugis at ext dot bull dot net
@ 2004-09-10 15:10 ` sebastien dot decugis at ext dot bull dot net
  2004-09-12  5:58 ` drepper at redhat dot com
  2004-09-16 23:23 ` cvs-commit at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: sebastien dot decugis at ext dot bull dot net @ 2004-09-10 15:10 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From sebastien dot decugis at ext dot bull dot net  2004-09-10 15:10 -------
Once I remove the 
# define __ASSUME_CLONE_STOPPED 1

from the file, I'm also unable to reproduce the bug!

Is it a wrong usage from me to use --enable-kernel=2.6.8.1 ?

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=379

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nptl/379] pthread_create fails but the thread executes some instructions
  2004-09-10 14:15 [Bug nptl/379] New: pthread_create fails but the thread executes some instructions sebastien dot decugis at ext dot bull dot net
                   ` (3 preceding siblings ...)
  2004-09-10 15:10 ` sebastien dot decugis at ext dot bull dot net
@ 2004-09-12  5:58 ` drepper at redhat dot com
  2004-09-16 23:23 ` cvs-commit at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: drepper at redhat dot com @ 2004-09-12  5:58 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2004-09-12 05:58 -------
I have removed the __ASSUME_CLONE_STOPPED definition.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED


http://sources.redhat.com/bugzilla/show_bug.cgi?id=379

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nptl/379] pthread_create fails but the thread executes some instructions
  2004-09-10 14:15 [Bug nptl/379] New: pthread_create fails but the thread executes some instructions sebastien dot decugis at ext dot bull dot net
                   ` (4 preceding siblings ...)
  2004-09-12  5:58 ` drepper at redhat dot com
@ 2004-09-16 23:23 ` cvs-commit at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-16 23:23 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-16 23:23 -------
Subject: Bug 379

CVSROOT:	/cvs/glibc
Module name:	libc
Changes by:	roland@sources.redhat.com	2004-09-16 23:23:21

Modified files:
	nptl           : pthread_create.c allocatestack.c 

Log message:
	2004-09-10  Roland McGrath  <roland@redhat.com>
	
	[BZ #379]
	* allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
	code, since we don't try to use the broken CLONE_STOPPED any more.
	* pthread_create.c (start_thread): Likewise.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/nptl/pthread_create.c.diff?cvsroot=glibc&r1=1.33&r2=1.34
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/nptl/allocatestack.c.diff?cvsroot=glibc&r1=1.48&r2=1.49



-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=379

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-09-16 23:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-10 14:15 [Bug nptl/379] New: pthread_create fails but the thread executes some instructions sebastien dot decugis at ext dot bull dot net
2004-09-10 14:17 ` [Bug nptl/379] " sebastien dot decugis at ext dot bull dot net
2004-09-10 14:36 ` jakub at redhat dot com
2004-09-10 14:52 ` sebastien dot decugis at ext dot bull dot net
2004-09-10 15:10 ` sebastien dot decugis at ext dot bull dot net
2004-09-12  5:58 ` drepper at redhat dot com
2004-09-16 23:23 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).