Summary: | media-sound/linuxsampler-1.0.0-r1 - configure: error: possibly NPTL glibc bug detected | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gentoo Sound Team <sound> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hardened |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
config log
info.txt emerge-history.txt environment media-sound:linuxsampler-2.0.0-r1:20160212-212522.log |
Description
Toralf Förster
2015-01-24 09:28:25 UTC
Created attachment 394756 [details]
config log
This is still happening with linuxsampler-2.0.0. I reported this bug upstream, as I believe it is their bug, but they insist that this only breaks on Gentoo and that they are allowed to ignore the documentation because it works on every other system. It seems Gentoo does something different, and even though what LinuxSampler does goes against the requirements of POSIX, it happens to work on every other distro and they believe this is Gentoo's fault. I don't know if there really is a subtle problem somehow triggered by a difference in the Gentoo glibc/pthreads stuff, or if they just got lucky with every other distro. I also run Hardened, as the original reporter of this bug does, so that's quite likely the difference in question. Upstream bug: https://bugs.linuxsampler.org/cgi-bin/show_bug.cgi?id=237 One workaround is to build with --enable-pthread-testcancel --disable-nptl-bug-check. If upstream doesn't want to do anything about this, then perhaps just adding that to the ebuild is the easiest way to go. This seems to be triggered by hardened, as I haven't seen this error on my non-hardened (no-multilib profile) system. Of course we're willing to add a patch on our side. Pinging hardened team for their recommendation. Confirmed on hardened. It seems they're doing use-after-free in the test. This is because pthread_mutex_lock is not a cancellation point in POSIX. The detached thread just breaks when the mutex is getting destroyed. That is just broken code that happens to not be caught on non-hardened. [23807.835365] traps: conftest[9128] general protection ip:7f83d2be53c8 sp:7f83d35ec420 error:0 in libgcc_s.so.1[7f83d2bd6000+16000] Created attachment 425348 [details]
info.txt
-----------------------------------------------------------------
This is an unstable amd64 chroot image (named amd64-hardened-unstable_20160121-225008) at a hardened host acting as a tinderbox.
-----------------------------------------------------------------
make.conf: USE="mmx sse sse2 pax_kernel -cdinstall -oci8 bindist alsa compat -csc -dvd gtk gudev haptic imap javaxml kvm -llvm minizip modplug multimedia ois opengl -openmpi plasma png python qemu qt4 sqlite svg system-jpeg system-libvpx system-sqlite usbredir v4l2 xa xscreensaver xslt"
Created attachment 425350 [details]
emerge-history.txt
Created attachment 425352 [details]
environment
Created attachment 425354 [details]
media-sound:linuxsampler-2.0.0-r1:20160212-212522.log
I've pushed a patch that replaces PTHREAD_CANCEL_ASYNCHRONOUS with PTHREAD_CANCEL_DEFERRED. While I can't verify this with my non-hardened system, I have compared the code using -fsanitize=thread and can confirm that the old one segfaults, whereas with PTHREAD_CANCEL_DEFERRED it exits cleanly. commit c3f25a35664cfe0d06ff946157e2302fed763710 Author: David Seifert <soap@gentoo.org> Date: Fri Feb 12 22:17:21 2016 +0100 media-sound/linuxsampler: Fix undefined behaviour in NPTL test Gentoo-Bug: 537516 * EAPI=6 * Replace PTHREAD_CANCEL_ASYNCHRONOUS, which is undefined behaviour when used for a non-pure function Toralf, please give it another shot... commit f7b26ec1e274a1985e25929b839221ed8f70e5e5 Author: David Seifert <soap@gentoo.org> Date: Sat Feb 13 13:42:08 2016 +0100 media-sound/linuxsampler: Fixed automagic dependency on media-libs/lv2 Gentoo-Bug: 557010 * Added USE=lv2 flag, which pulls in media-libs/lv2 as dependency * Fix configure.ac automagically enabling lv2 support * Amend metadata.xml to reflect new USE flag |