libprelude FTBFS on arm64, armhf, ppc64el, segfaults in testsuite

Bug #1262430 reported by Steve Langasek
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libprelude (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

After applying some initial porting patches for floating point endianness detection in gnulib, libprelude still fails to build on ppc64el:

make[4]: Leaving directory `/build/buildd/libprelude-1.0.0/tests'
make check-TESTS check-local
make[4]: Entering directory `/build/buildd/libprelude-1.0.0/tests'
make[5]: Entering directory `/build/buildd/libprelude-1.0.0/tests'
../test-driver: line 95: 7666 Segmentation fault "$@" > $log_file 2>&1
FAIL: async-timer
PASS: idmef
PASS: idmef-criteria
PASS: idmef-message-helper
PASS: idmef-path
PASS: idmef-value
../test-driver: line 95: 7810 Segmentation fault "$@" > $log_file 2>&1
FAIL: prelude-client
PASS: prelude-string

The segfault in async-timer is:

(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00003fffb7de7458 in prelude_init (argc=0x0, argv=0x0) at prelude.c:223
#2 0x0000000010000a44 in main () at async-timer.c:47

async-timer and prelude-client are the only two tests that call prelude_init().

Tags: ftbfs ppc64el
Steve Langasek (vorlon)
tags: added: ftbfs ppc64el
Revision history for this message
Steve Langasek (vorlon) wrote :

Relevant line of prelude.c is:
        ret = glthread_atfork(prelude_fork_prepare, prelude_fork_parent, prelude_fork_child);

libmissing defines glthread_atfork() to pthread_atfork() if available, and this has been correctly detected. So glthread_atfork() expands as:

# define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) \
     (pthread_in_use () ? pthread_atfork (PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) : 0)

(pthread_in_use() evaluates true at build time)

Not seeing any obvious bugs in the threads handling.

William Grant (wgrant)
summary: - libprelude FTBFS on ppc64el, segfaults in testsuite
+ libprelude FTBFS on arm64, armhf, ppc64el, segfaults in testsuite
Revision history for this message
William Grant (wgrant) wrote :

With eglibc 2.18 this now FTBFS on armhf and arm64 as well. On all affected archs the pthread_atfork call segfaults due to the symbol being unresolved.

The embedded gnulib forces pthread_* to be a weak symbol, but pthread_atfork is not intended to be dynamically linkable. It's available in libpthread.so on i386, amd64 and a couple of other archs for historical reasons, and was (apparently erroneously) present on arm and aarch64 until glibc 2.18 (https://sourceware.org/bugzilla/show_bug.cgi?id=15234). It's expected that callers link the static version from libpthread_nonshared.a instead.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libprelude - 1.0.0-11ubuntu4

---------------
libprelude (1.0.0-11ubuntu4) trusty; urgency=medium

  * Correctly link against -lpthread as needed to statically link
    pthreads_atfork symbol. (LP: #1262430)
  * Do not use quilt dh helper, as the package is 3.0 (quilt) format.
  * Enable parallel build.
 -- Dimitri John Ledkov <email address hidden> Mon, 30 Dec 2013 01:43:57 +0000

Changed in libprelude (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.