public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "steve dot hawkes at motorola dot com" <sourceware-bugzilla@sources.redhat.com>
To: glibc-bugs@sources.redhat.com
Subject: [Bug nptl/801] NPTL pthread_create siliently fails to create thread if non-zero priority used with SCHED_OTHER policy
Date: Fri, 25 Mar 2005 23:58:00 -0000	[thread overview]
Message-ID: <20050325235846.13818.qmail@sourceware.org> (raw)
In-Reply-To: <20050324001227.801.steve.hawkes@motorola.com>


------- Additional Comments From steve dot hawkes at motorola dot com  2005-03-25 23:58 -------
Subject: RE:  NPTL pthread_create siliently fails to create 
	thread if non-zero priority used with SCHED_OTHER policy

There is a bug. The pthread_create() call does not return EINVAL. It returns
0 but does not create a thread. Please look more closely at the patch. The
problem is really quite straightforward. If the description of the problem
isn't clear enough (although I believe it is), just try compiling
pthread_create.c with -Wshadow. You will see that the declaration of 'err'
on line 409 shadows that on line 351, which is not what was intended by the
developer of the code and which causes it to fail silently.

In the example code, this line is printed from the created thread only if
the bug is fixed:

**** Success, created thread exiting

When the example code is run on the unpatched pthread_create.c, the above
line is not printed because the thread is never created, and
pthread_create() does not return EINVAL, it returns 0, as shown by this
line:

Thread creation returned 0

-----Original Message-----
From: drepper at redhat dot com
[mailto:sourceware-bugzilla@sources.redhat.com] 
Sent: Wednesday, March 23, 2005 7:02 PM
To: Hawkes Steve-FSH016
Subject: [Bug nptl/801] NPTL pthread_create siliently fails to create thread
if non-zero priority used with SCHED_OTHER policy



------- Additional Comments From drepper at redhat dot com  2005-03-24 01:01
------- There is no bug.  The pthread_create calls fails, returns EINVAL,
and that's it.  There is

**** Success, created thread exiting

output since pthread_create doesn't create a thread.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


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

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.


-- 


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

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


  parent reply	other threads:[~2005-03-25 23:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-24  0:12 [Bug nptl/801] New: " steve dot hawkes at motorola dot com
2005-03-24  1:01 ` [Bug nptl/801] " drepper at redhat dot com
2005-03-25 23:58 ` steve dot hawkes at motorola dot com [this message]
2005-03-26  7:50 ` jakub at redhat dot com
2005-03-26  7:51 ` jakub at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050325235846.13818.qmail@sourceware.org \
    --to=sourceware-bugzilla@sources.redhat.com \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).