public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/18463] New: pthread_cond_broadcast bug when surrounded by PTHREAD_PRIO_INHERIT mutex on ARM
@ 2015-05-29 11:09 mpa at pengutronix dot de
  2015-05-29 11:12 ` [Bug nptl/18463] pthread_cond_broadcast issue " mpa at pengutronix dot de
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: mpa at pengutronix dot de @ 2015-05-29 11:09 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 18463
           Summary: pthread_cond_broadcast bug when surrounded by
                    PTHREAD_PRIO_INHERIT mutex on ARM
           Product: glibc
           Version: 2.20
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
          Assignee: unassigned at sourceware dot org
          Reporter: mpa at pengutronix dot de
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Created attachment 8335
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8335&action=edit
test program that triggers this issue

The attached program uses pthread_cond_broadcast() to wake up two threads
waiting on a condition variable which is surrounded by a mutex with
PTHREAD_PRIO_INHERIT set. The pthread_mutex_unlock() after
pthread_cond_broadcast() returns EPERM in the main thread.

This does not happen when using pthread_cond_signal(). Also it does not happen
when using just one thread that is waiting or when PTHREAD_PRIO_INHERIT is not
set.

This issue is reproducable with the attached program on the following setups:
 - Kernel 4.0 with OSELAS Toolchain 2014.12.0 for cortex a8, glibc-2.20
 - Kernel 4.0 with OSELAS Toolchain 2014.12.0 for armv7a without NEON,
glibc-2.20
 - Kernel 4.0.0-1-armmp with native Debian experimental toolchain for armhf,
glibc-2.21, gcc-5
 - Kernel 3.18.0-trunk-kirkwood native Debian experimental toolchain for armel,
glibc-2.21, gcc-5

This issue does not exist on:
 - Kernel 3.16 with Debian toolchain for x86_64 , glibc-2.19, gcc-4.9.2
 - Kernel 4.0.4 (vanilla, not debian) with Debian experimental toolchain for
x86_64, glibc-2.21, gcc-5
 - Kernel 4.0.0-1-armmp with native Debian testing toolchain for armhf,
glibc-2.19, gcc-4.9.2
 - Kernel 4.0.0-1-armmp crosscompile Debian unstable toolchain for armhf,
glibc-2.19, gcc-4.9.2
 - Kernel 3.18.0-trunk-kirkwood native Debian testing toolchain for armel,
glibc-2.19, gcc-4.9.2

I found bug 17013 which seems related. But 17013 is marked as fixed in
glibc-2.20 which is where the issue described above was introduced.

We tried reverting
        8f630cca5c36941db1cb48726016bbed80ec1041 Fix lll_unlock twice in
pthread_cond_broadcast
it does not solve the issue.

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


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

end of thread, other threads:[~2015-07-17 10:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-29 11:09 [Bug nptl/18463] New: pthread_cond_broadcast bug when surrounded by PTHREAD_PRIO_INHERIT mutex on ARM mpa at pengutronix dot de
2015-05-29 11:12 ` [Bug nptl/18463] pthread_cond_broadcast issue " mpa at pengutronix dot de
2015-05-29 11:20 ` mkl at pengutronix dot de
2015-05-29 12:04 ` r.schwebel at pengutronix dot de
2015-06-13 17:06 ` mkl at pengutronix dot de
2015-06-13 22:09 ` mkl at pengutronix dot de
2015-06-14 14:07 ` joseph at codesourcery dot com
2015-06-14 15:30 ` mkl at pengutronix dot de
2015-06-14 16:31 ` mkl at pengutronix dot de
2015-06-20 16:12 ` mkl at pengutronix dot de
2015-06-26 16:17 ` mkl at pengutronix dot de
2015-07-17 10:17 ` mkl at pengutronix dot de

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