This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/18463] New: pthread_cond_broadcast bug when surrounded by PTHREAD_PRIO_INHERIT mutex on ARM
- From: "mpa at pengutronix dot de" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 29 May 2015 11:09:38 +0000
- Subject: [Bug nptl/18463] New: pthread_cond_broadcast bug when surrounded by PTHREAD_PRIO_INHERIT mutex on ARM
- Auto-submitted: auto-generated
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.