From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30980 invoked by alias); 29 May 2015 11:09:43 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 29821 invoked by uid 48); 29 May 2015 11:09:39 -0000 From: "mpa at pengutronix dot de" To: glibc-bugs@sourceware.org Subject: [Bug nptl/18463] New: pthread_cond_broadcast bug when surrounded by PTHREAD_PRIO_INHERIT mutex on ARM Date: Fri, 29 May 2015 11:09:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: nptl X-Bugzilla-Version: 2.20 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpa at pengutronix dot de X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg00245.txt.bz2 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.