public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/4169] New: SIGSTOP then SIGCONT on a whole process incorrectly releases a thread from sigwait(3) for another signal
@ 2007-03-08 14:44 tom dot viza at gmail dot com
  2007-03-08 14:48 ` [Bug nptl/4169] " tom dot viza at gmail dot com
  2007-03-08 14:59 ` drepper at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: tom dot viza at gmail dot com @ 2007-03-08 14:44 UTC (permalink / raw)
  To: glibc-bugs

If a whole process, which has a thread waiting with sigwait(3), is stopped with
SIGSTOP, then when it is restarted with SIGCONT sigwait returns without writing
to *sig (second argument).  This appears to be in contradiction with
POSIX-1003.1 2004.

http://www.opengroup.org/onlinepubs/000095399/functions/sigwait.html

Steps to reproduce:

$ wget http://purposeful.co.uk/testcase.c
$ gcc -o testcase -pthread -lpthread testcase.c
$./testcase

The test program prints 'a' from one thread and 'b' from another.  After ten of
each the 'b' thread calls sigwait, and you get just 'a's.  When this happens,
hit Ctrl+Z.  Now restart the process (with fg).  The 'b' thread resumes straight
away.

Expected behaviour:

$ gcc -o testcase -pthread -lpthread -DWORKAROUND testcase.c
$./testcase

Now do the same.  The 'b' thread returns to its waiting state.  You  get as more
of just 'a' until there have been 10 of them and then a mix again.

-- 
           Summary: SIGSTOP then SIGCONT on a whole process incorrectly
                    releases a thread from sigwait(3) for another signal
           Product: glibc
           Version: 2.3.6
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: tom dot viza at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=4169

------- 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] 3+ messages in thread

* [Bug nptl/4169] SIGSTOP then SIGCONT on a whole process incorrectly releases a thread from sigwait(3) for another signal
  2007-03-08 14:44 [Bug nptl/4169] New: SIGSTOP then SIGCONT on a whole process incorrectly releases a thread from sigwait(3) for another signal tom dot viza at gmail dot com
@ 2007-03-08 14:48 ` tom dot viza at gmail dot com
  2007-03-08 14:59 ` drepper at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: tom dot viza at gmail dot com @ 2007-03-08 14:48 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From tom dot viza at gmail dot com  2007-03-08 14:48 -------
Created an attachment (id=1603)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1603&action=view)
testcase descibed in original report


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4169

------- 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] 3+ messages in thread

* [Bug nptl/4169] SIGSTOP then SIGCONT on a whole process incorrectly releases a thread from sigwait(3) for another signal
  2007-03-08 14:44 [Bug nptl/4169] New: SIGSTOP then SIGCONT on a whole process incorrectly releases a thread from sigwait(3) for another signal tom dot viza at gmail dot com
  2007-03-08 14:48 ` [Bug nptl/4169] " tom dot viza at gmail dot com
@ 2007-03-08 14:59 ` drepper at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: drepper at redhat dot com @ 2007-03-08 14:59 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2007-03-08 14:59 -------
These are all just system call wrappers.  I'm not looking at the details.  Iff
there is really something wrong you'll have to talk to the kernel people.

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


http://sourceware.org/bugzilla/show_bug.cgi?id=4169

------- 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] 3+ messages in thread

end of thread, other threads:[~2007-03-08 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-08 14:44 [Bug nptl/4169] New: SIGSTOP then SIGCONT on a whole process incorrectly releases a thread from sigwait(3) for another signal tom dot viza at gmail dot com
2007-03-08 14:48 ` [Bug nptl/4169] " tom dot viza at gmail dot com
2007-03-08 14:59 ` drepper at redhat dot com

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).