[Pkg-gauche-devel] Bug#766639: gauche: FTBFS on ppc64el (and maybe ppc64)

Frederic Bonnard frediz at linux.vnet.ibm.com
Fri Oct 24 15:06:55 UTC 2014


Package: gauche
Version: 0.9.4-3
Severity: normal
Tags: patch
User: debian-powerpc at lists.debian.org
Usertags: ppc64el

Dear Maintainer,
we saw that gauche doesn't get compiled on ppc64el because gosh hangs in a futex.
https://buildd.debian.org/status/fetch.php?pkg=gauche&arch=ppc64el&ver=0.9.4-3&stamp=1414085994
and
https://buildd.debian.org/status/fetch.php?pkg=gauche&arch=powerpc&ver=0.9.4-3&stamp=1410804116

I had it working all the time in a ppc64el UP chroot. I guessed it's something to do with threading.
Here is a sample backtrace when "gosh" hangs :

(sid-ppc64el-sbuild)root at debian-le-1-2:~/gauche-0.9.4/ext/gauche# LD_LIBRARY_PATH="/root/gauche-0.9.4/src/" gdb ../../src/gosh
GNU gdb (Debian 7.7.1+dfsg-3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc64le-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ../../src/gosh...done.
(gdb) run -ftest ../../src/precomp -e -P -o gauche--collection ../../libsrc/gauche/collection.scm
Starting program: /root/gauche-0.9.4/src/gosh -ftest ../../src/precomp -e -P -o gauche--collection ../../libsrc/gauche/collection.scm
Can't read symbols from system-supplied DSO at 0x3fffb7fa0000: File truncated
warning: Could not load shared library symbols for linux-vdso64.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/powerpc64le-linux-gnu/libthread_db.so.1".
[New Thread 0x3fffb77ff1a0 (LWP 9423)]
[New Thread 0x3fffb6fff1a0 (LWP 9424)]
[New Thread 0x3fffb67ff1a0 (LWP 9425)]
[New Thread 0x3fffb5fff1a0 (LWP 9426)]
[New Thread 0x3fffb57ff1a0 (LWP 9427)]
[New Thread 0x3fffb4fff1a0 (LWP 9428)]
[New Thread 0x3fffb47ff1a0 (LWP 9429)]
[New Thread 0x3fffb3fff1a0 (LWP 9430)]
[New Thread 0x3fffb37ff1a0 (LWP 9431)]
[New Thread 0x3fffb2fff1a0 (LWP 9432)]
[New Thread 0x3fffb27ff1a0 (LWP 9433)]
[New Thread 0x3fffb1fff1a0 (LWP 9434)]
[New Thread 0x3fffb17ff1a0 (LWP 9435)]
[New Thread 0x3fffb0fff1a0 (LWP 9436)]
[New Thread 0x3fffb07ff1a0 (LWP 9437)]
^C
Program received signal SIGINT, Interrupt.
0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
187 pthread_cond_wait.c: No such file or directory.
(gdb) thread apply all backtrace

Thread 16 (Thread 0x3fffb07ff1a0 (LWP 9437)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb07ff1a0) at pthread_create.c:311
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 15 (Thread 0x3fffb0fff1a0 (LWP 9436)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb0fff1a0) at pthread_create.c:311
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 14 (Thread 0x3fffb17ff1a0 (LWP 9435)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb17ff1a0) at pthread_create.c:311
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 13 (Thread 0x3fffb1fff1a0 (LWP 9434)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb1fff1a0) at pthread_create.c:311
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 12 (Thread 0x3fffb27ff1a0 (LWP 9433)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb27ff1a0) at pthread_create.c:311
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 11 (Thread 0x3fffb2fff1a0 (LWP 9432)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb2fff1a0) at pthread_create.c:311
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 10 (Thread 0x3fffb37ff1a0 (LWP 9431)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb37ff1a0) at pthread_create.c:311
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 9 (Thread 0x3fffb3fff1a0 (LWP 9430)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb3fff1a0) at pthread_create.c:311
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 8 (Thread 0x3fffb47ff1a0 (LWP 9429)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb47ff1a0) at pthread_create.c:311
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 7 (Thread 0x3fffb4fff1a0 (LWP 9428)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb4fff1a0) at pthread_create.c:311
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 6 (Thread 0x3fffb57ff1a0 (LWP 9427)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d785a4 in GC_mark_local (local_mark_stack=0x3fffb57ee768, id=<optimized out>) at mark.c:1072
#4  0x00003fffb7d78b1c in GC_help_marker (my_mark_no=<optimized out>) at mark.c:1179
#5  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#6  0x00003fffb78089a4 in start_thread (arg=0x3fffb57ff1a0) at pthread_create.c:311
#7  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 5 (Thread 0x3fffb5fff1a0 (LWP 9426)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb5fff1a0) at pthread_create.c:311
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 4 (Thread 0x3fffb67ff1a0 (LWP 9425)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb67ff1a0) at pthread_create.c:311
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 3 (Thread 0x3fffb6fff1a0 (LWP 9424)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb6fff1a0) at pthread_create.c:311
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 2 (Thread 0x3fffb77ff1a0 (LWP 9423)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78ab8 in GC_help_marker (my_mark_no=14) at mark.c:1168
#4  0x00003fffb7d81414 in GC_mark_thread (id=<optimized out>) at pthread_support.c:389
#5  0x00003fffb78089a4 in start_thread (arg=0x3fffb77ff1a0) at pthread_create.c:311
---Type <return> to continue, or q <return> to quit---
#6  0x00003fffb7abfcd0 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:104

Thread 1 (Thread 0x3fffb7f95380 (LWP 9422)):
#0  0x00003fffb780e710 in __pthread_cond_wait (cond=0x3fffb7f0f5f0 <mark_cv>, mutex=0x3fffb7f0f590 <mark_mutex>) at pthread_cond_wait.c:187
#1  0x00003fffb7ad20cc in __pthread_cond_wait (cond=<optimized out>, mutex=<optimized out>) at forward.c:149
#2  0x00003fffb7d83ff8 in GC_wait_marker () at pthread_support.c:2036
#3  0x00003fffb7d78904 in GC_do_parallel_mark () at mark.c:1144
#4  0x00003fffb7d79f74 in GC_mark_some (cold_gc_frame=<optimized out>) at mark.c:372
#5  0x00003fffb7d6aa74 in GC_stopped_mark (stop_func=0x3fffb7d6a280 <GC_never_stop_func>) at alloc.c:637
#6  0x00003fffb7d6b9e4 in GC_try_to_collect_inner (stop_func=0x3fffb7d6a280 <GC_never_stop_func>) at alloc.c:456
#7  0x00003fffb7d6c7d0 in GC_collect_or_expand (needed_blocks=1, ignore_off_page=<optimized out>, retry=<optimized out>) at alloc.c:1266
#8  0x00003fffb7d6cc24 in GC_allocobj (gran=1, kind=<optimized out>) at alloc.c:1355
#9  0x00003fffb7d74f28 in GC_generic_malloc_inner (lb=16, k=<optimized out>) at malloc.c:133
#10 0x00003fffb7d76784 in GC_generic_malloc_many (lb=16, k=<optimized out>, result=0x3fffb7f0f338 <first_thread+272>) at mallocx.c:427
#11 0x00003fffb7d8640c in GC_malloc (bytes=16) at thread_local_alloc.c:175
#12 0x00003fffb7c8cc9c in Scm_Reverse2 (list=<optimized out>, tail=<optimized out>) at list.c:343
#13 0x00003fffb7c8cdac in Scm_Reverse (list=<optimized out>) at list.c:353
#14 0x00003fffb7c5f770 in run_loop () at ./vminsn.scm:1007
#15 0x00003fffb7c6c2b4 in user_eval_inner (program=<optimized out>, codevec=0x3ffffffff3a8) at vm.c:1458
#16 0x00003fffb7c6dc90 in apply_rec (vm=<optimized out>, vm=<optimized out>, nargs=1, proc=0x11324e00) at vm.c:1550
#17 Scm_ApplyRec1 (proc=0x11324e00, arg0=0x1023bb50) at vm.c:1582
#18 0x00000000100037c4 in execute_script (scriptfile=<optimized out>, args=0x1023bb50) at main.c:508
#19 0x000000001000222c in main (ac=<optimized out>, av=<optimized out>) at main.c:637

So it's stuck in libgc code.
In gauche 0.9.3, gc is 7.2 and in 0.9.4 it's 7.4.
Between 7.2 and 7.4, it seems PARALLEL MARK has been enable by default in libgc for the 
powerpc build :
https://github.com/ivmai/bdwgc/commit/9f60d6792c135fb7638f4b74ceaded4afd1f1fcf
and it seemed to be tested on powerpc at that time but disabling it, enables gosh not
to hang..
So in the meantime here is a patch to disable PARALLEL MARK on powerpc builds (though I could test it on ppc64el only)
Hope that helps,

F.

-- System Information:
Debian Release: 7.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (450, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gauche.patch
Type: text/x-diff
Size: 751 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gauche-devel/attachments/20141024/68d07a89/attachment.patch>


More information about the Pkg-gauche-devel mailing list