public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/16897] New: pthread_cond_timedwait wakes up early
@ 2014-05-02 18:37 te.anton at gmail dot com
  2014-05-02 18:53 ` [Bug libc/16897] " sourceware at linglink dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: te.anton at gmail dot com @ 2014-05-02 18:37 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16897

            Bug ID: 16897
           Summary: pthread_cond_timedwait wakes up early
           Product: glibc
           Version: 2.18
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: te.anton at gmail dot com
                CC: drepper.fsp at gmail dot com

Created attachment 7583
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7583&action=edit
test application in C to reproduce the bug

pthread_cond_timedwait wakes up early (1 second early it seems).

The bug is reproducible on:

* Fedora 20

$ cat /etc/issue
Fedora release 20 (Heisenbug)
Kernel \r on an \m (\l)

$ ldd --version
ldd (GNU libc) 2.18
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

* Ubuntu 12.04.4 LTS

$ cat /etc/issue
Ubuntu 12.04.4 LTS \n \l

$ ldd --version
ldd (Ubuntu EGLIBC 2.15-0ubuntu10.5) 2.15
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

* Ubuntu 13.04

$ cat /etc/issue
Ubuntu 13.04 \n \l

$ ldd --version
ldd (Ubuntu EGLIBC 2.17-0ubuntu5) 2.17
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Looks like libc/pthread 2.13 (fedora 14) and 2.10 does not have this bug. Also
the issued is not happening on my Mac Book Air.

Steps to reproduce:

* compile the test application
$ gcc -Wall -pipe -g -O0 bug_pthread_cond_timedwait.c -lpthread -o
bug_pthread_cond_timedwait
* run the application
./bug_pthread_cond_timedwait
* Result:
wait:1399055635 wakeup:1399055634
bug: main.c:54: main: Assertion `!"early wakeup"' failed.
Aborted (core dumped)
* Expected result:
OK
OK
switch, sleep 89383 ms
OK
OK
OK
switch, sleep 30886 ms
OK
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

end of thread, other threads:[~2014-06-12 19:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-02 18:37 [Bug libc/16897] New: pthread_cond_timedwait wakes up early te.anton at gmail dot com
2014-05-02 18:53 ` [Bug libc/16897] " sourceware at linglink dot com
2014-05-02 19:08 ` sourceware at linglink dot com
2014-06-04 14:17 ` [Bug nptl/16897] " schwab@linux-m68k.org
2014-06-04 14:44 ` schwab@linux-m68k.org
2014-06-04 14:52 ` te.anton at gmail dot com
2014-06-04 15:01 ` schwab@linux-m68k.org
2014-06-04 15:53 ` te.anton at gmail dot com
2014-06-12 19:29 ` fweimer 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).