[ARM] pthread_cond_wait hang
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-linaro (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The attached test program hangs on ARM, but works fine on x86.
It's based on the thread_init code in memcached that exhibits the same symptoms.
Tested on Panda-A1 (Dual core cortex-A9) in an Oneiric chroot:
ii libc6 2.13-20ubuntu5 Embedded GNU C Library: Shared libraries
main install is a Linaro 11.09 (Natty based filesystem), the kernel is
Linux panda-01 3.0.0-1404-
It fails about 1/100ish times, so I run it with:
for SEQ in `seq 1 200`; do echo $SEQ; ./pthreadtest; done
gdb shows it's hanging trying to get the lock for the cond data:
gdb
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
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 "arm-linux-
For bug reporting instructions, please see:
<http://
(gdb) attach 2511
Attaching to process 2511
Reading symbols from /home/dg/
Reading symbols from /lib/arm-
[Thread debugging using libthread_db enabled]
[New Thread 0x42c1c470 (LWP 2516)]
[New Thread 0x423bf470 (LWP 2515)]
[New Thread 0x41b3a470 (LWP 2514)]
[New Thread 0x412aa470 (LWP 2513)]
[New Thread 0x409fe470 (LWP 2512)]
done.
Loaded symbols for /lib/arm-
Reading symbols from /lib/arm-
done.
Loaded symbols for /lib/arm-
Reading symbols from /lib/ld-
Loaded symbols for /lib/ld-linux.so.3
__libc_do_syscall ()
at ../ports/
46 ../ports/
in ../ports/
(gdb) bt full
#0 __libc_do_syscall ()
at ../ports/
No locals.
#1 0x40081608 in __lll_lock_wait (futex=0x11088, private=0)
at ../ports/
_a2tmp = 128
_a2 = <optimized out>
_nametmp = 240
_a3tmp = 2
_a3 = <optimized out>
_a1 = <optimized out>
_a4tmp = 0
_a1tmp = 69768
_a4 = <optimized out>
_name = <optimized out>
oldval = <optimized out>
#2 0x4007f58e in __pthread_cond_wait (cond=0x11088, mutex=0x11068)
at pthread_
__futex = 0x11088
futex_val = 1
buffer = {__routine = 0x4007f261 <__condvar_
__arg = 0xbe800bd8, __canceltype = 1119993776, __prev = 0x0}
cbuffer = {oldtype = 0, cond = 0x11088, mutex = 0x11068, bc_seq = 0}
err = <optimized out>
pshared = 0
val = <optimized out>
seq = 0
#3 0x000087e4 in thread_init ()
No symbol table info available.
#4 0x00008694 in main ()
No symbol table info available.
(gdb) q
A debugging session is active.
Inferior 1 [process 2511] will be detached.
Thanks to dmart for pointing at https:/ /lkml.org/ lkml/2011/ 9/28/534 as the likely culprit; linaro- lt-omap
seems to work in 3.1.0-1401-