Bug#788799: libc6: pthread_cond_broadcast issue when surrounded by PTHREAD_PRIO_INHERIT mutex on ARM
Package: libc6
Version: 2.21-0experimental0
Severity: normal
Tags: upstream fixed-upstream
Forwarded: https://sourceware.org/bugzilla/show_bug.cgi?id=18463
Hello,
the attached program fails with an error on ARM platforms. (I only tested
armhf, but I think armel is affected, too.)
The problem is that pthread_mutex_unlock() in the main thread returns
EPERM which it shouldn't. This only happens when using
pthread_cond_broadcast, at least two threads and PTHREAD_PRIO_INHERIT.
For more details refer to the upstream bug[1].
A possible solution documented in the upstream bug report is to pass
--enable-kernel=3.15 (or something bigger).
According to
https://buildd.debian.org/status/fetch.php?pkg=glibc&arch=armhf&ver=2.21-0experimental0&stamp=1426842906
glibc is build using --enable-kernel=2.6.32, I guess that's from the
setting MIN_KERNEL_SUPPORTED in debian/sysdeps/linux.mk.
Given that stable has kernel 3.16 the probably easiest solution would be
to bump the dependency to >= 3.16?!
Best regards
Uwe
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=18463
-- System Information:
Debian Release: 8.1
APT prefers stable
APT policy: (990, 'stable'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: armhf (armv7l)
Kernel: Linux 3.16.0-4-armmp (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libc6 depends on:
ii libgcc1 1:4.9.2-10
libc6 recommends no packages.
Versions of packages libc6 suggests:
ii debconf [debconf-2.0] 1.5.56
pn glibc-doc <none>
ii locales 2.21-0experimental0
-- debconf information excluded
Reply to: