This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to add timeout to Ada tests on Linux/ia64?
On Sat, Mar 27, 2004 at 04:37:15PM -0500, Geert Bosch wrote:
>
> On Mar 27, 2004, at 06:25, Arnaud Charlet wrote:
> >Tasking is in good shape on ia64 linux, at least on some configurations
> >(e.g. monoprocessor machines), so there is no reason to disable it
> >AFAIK.
>
> >It looks more like some bug in the pthread library itself (maybe in
> >the context of SMP), so I don't see any good reason for disabling Ada
> >tasking.
>
> The current situation (running make check requires manual intervention)
> clearly is not acceptable for GCC developers. The question is of course
> under what condition these failures occur and if more people are running
> into this issue.
>
On my 4way ia64 machine, I saw
(gdb) info thread
* 4 Thread 32771 (LWP 19781) 0x20000000000511c1 in __pthread_sigsuspend ()
from /lib/libpthread.so.0
3 Thread 16386 (LWP 19783) 0x20000000000511c1 in __pthread_sigsuspend ()
from /lib/libpthread.so.0
2 Thread 32769 (LWP 19782) 0x200000000034eac1 in __clone2 ()
from /lib/libc.so.6.1
1 Thread 16384 (LWP 19781) 0x20000000000511c1 in __pthread_sigsuspend ()
from /lib/libpthread.so.0
(gdb) thread 1
[Switching to thread 1 (Thread 16384 (LWP 19781))]#0 0x20000000000511c1 in
__pthread_sigsuspend () from /lib/libpthread.so.0
(gdb) bt
#0 0x20000000000511c1 in __pthread_sigsuspend () from /lib/libpthread.so.0
#1 0x200000000004ff90 in __pthread_wait_for_restart_signal ()
from /lib/libpthread.so.0
#2 0x200000000004f3a0 in pthread_create@@GLIBC_2.2 ()
from /lib/libpthread.so.0
#3 0x4000000000017bf0 in system.task_primitives.operations.create_task (
t=0x6000000000016910, wrapper=4611686018427733024, stack_size=0,
priority=15) at s-taprop.adb:878
#4 0x4000000000020b50 in system.tasking.stages.activate_tasks (
chain_access=0x60000fffffffb8f0) at s-tassta.adb:325
#5 0x4000000000013be0 in _ada_c91004b ()
#6 0x40000000000043e0 in main ()
(gdb) thread 4
[Switching to thread 4 (Thread 32771 (LWP 19781))]#0 0x20000000000511c1 in
__pthread_sigsuspend () from /lib/libpthread.so.0
(gdb) bt
#0 0x20000000000511c1 in __pthread_sigsuspend () from /lib/libpthread.so.0
#1 0x200000000004ff90 in __pthread_wait_for_restart_signal ()
from /lib/libpthread.so.0
#2 0x200000000004f3a0 in pthread_create@@GLIBC_2.2 ()
from /lib/libpthread.so.0
#3 0x4000000000017bf0 in system.task_primitives.operations.create_task (
t=0x6000000000016910, wrapper=4611686018427733024, stack_size=0,
priority=15) at s-taprop.adb:878
#4 0x4000000000020b50 in system.tasking.stages.activate_tasks (
chain_access=0x60000fffffffb8f0) at s-tassta.adb:325
#5 0x4000000000013be0 in _ada_c91004b ()
#6 0x40000000000043e0 in main ()
(gdb) thread 3
[Switching to thread 3 (Thread 16386 (LWP 19783))]#0 0x20000000000511c1 in
__pthread_sigsuspend () from /lib/libpthread.so.0
(gdb) bt
#0 0x20000000000511c1 in __pthread_sigsuspend () from /lib/libpthread.so.0
#1 0x200000000004ff90 in __pthread_wait_for_restart_signal ()
from /lib/libpthread.so.0
#2 0x2000000000054430 in __pthread_alt_lock () from /lib/libpthread.so.0
#3 0x200000000004cd90 in pthread_mutex_lock () from /lib/libpthread.so.0
#4 0x4000000000016870 in system.task_primitives.operations.write_lock (
l=0x60000000000077b0, lF=390) at s-taprop.adb:390
#5 0x4000000000016520 in system.task_primitives.operations.lock_rts ()
at s-taprop.adb:235
#6 0x40000000000172e0 in system.task_primitives.operations.enter_task (
self_id=0x6000000000013540) at s-taprop.adb:741
#7 0x4000000000022180 in system.tasking.stages.task_wrapper (
self_id=0x6000000000013540) at s-tassta.adb:882
#8 0x200000000004c820 in pthread_start_thread_event ()
from /lib/libpthread.so.0
#9 0x200000000034eb70 in __clone2 () from /lib/libc.so.6.1
#10 0x200000000004ff90 in __pthread_wait_for_restart_signal ()
from /lib/libpthread.so.0
#11 0x0000000000000000 in ?? ()
It looks like 2 threads are trying to create tasks at the same time.
Later,
(gdb) c
Continuing.
[New Thread 32771 (LWP 19938)]
,.,. C91004B ACATS 2.5 04-03-29 10:07:19
---- C91004B TASK IDENTIFIER IN OWN BODY.
Program received signal SIGINT, Interrupt.
[Switching to Thread 32771 (LWP 19938)]
0x20000000000511c1 in __pthread_sigsuspend () from /lib/libpthread.so.0
(gdb) info thread
* 5 Thread 32771 (LWP 19938) 0x20000000000511c1 in __pthread_sigsuspend ()
from /lib/libpthread.so.0
2 Thread 32769 (LWP 19782) 0x200000000033d131 in poll ()
from /lib/libc.so.6.1
1 Thread 16384 (LWP 19781) 0x20000000000511c1 in __pthread_sigsuspend ()
from /lib/libpthread.so.0
(gdb) t 5
[Switching to thread 5 (Thread 32771 (LWP 19938))]#0 0x20000000000511c1 in
__pthread_sigsuspend () from /lib/libpthread.so.0
(gdb) bt
#0 0x20000000000511c1 in __pthread_sigsuspend () from /lib/libpthread.so.0
#1 0x200000000004ff90 in __pthread_wait_for_restart_signal ()
from /lib/libpthread.so.0
#2 0x2000000000048930 in pthread_cond_wait@GLIBC_2.2 ()
from /lib/libpthread.so.0
#3 0x4000000000016a80 in system.task_primitives.operations.sleep (self_id=0x0)
at s-taprop.adb:480
#4 0x40000000000206b0 in system.tasking.rendezvous.wait_for_call (
self_id=0x6000000000016910) at s-tasren.adb:1788
#5 0x400000000001d5b0 in system.tasking.rendezvous.accept_call (e=1)
at s-tasren.adb:244
#6 0x40000000000132c0 in c91004b__tt1B.8 ()
#7 0x4000000000022210 in system.tasking.stages.task_wrapper (
self_id=0x6000000000016910) at s-tassta.adb:910
#8 0x200000000004c820 in pthread_start_thread_event ()
from /lib/libpthread.so.0
#9 0x200000000034eb70 in __clone2 () from /lib/libc.so.6.1
#10 0x200000000004ff90 in __pthread_wait_for_restart_signal ()
from /lib/libpthread.so.0
#11 0x0000000000000000 in ?? ()
(gdb) t 1
[Switching to thread 1 (Thread 16384 (LWP 19781))]#0 0x20000000000511c1 in
__pthread_sigsuspend () from /lib/libpthread.so.0
(gdb) bt
#0 0x20000000000511c1 in __pthread_sigsuspend () from /lib/libpthread.so.0
#1 0x200000000004ff90 in __pthread_wait_for_restart_signal ()
from /lib/libpthread.so.0
#2 0x2000000000048930 in pthread_cond_wait@GLIBC_2.2 ()
from /lib/libpthread.so.0
#3 0x4000000000016a80 in system.task_primitives.operations.sleep (self_id=0x0)
at s-taprop.adb:480
#4 0x4000000000028570 in system.tasking.entry_calls.wait_for_completion (
entry_call=0x6000000000012cd8) at s-taenca.adb:582
#5 0x400000000001dbf0 in system.tasking.rendezvous.call_synchronous (
acceptor=0x6000000000013540, e=1, uninterpreted_data=6917546619827108192,
mode=system__tasking__simple_call) at s-tasren.adb:476
#6 0x400000000001da40 in system.tasking.rendezvous.call_simple (
acceptor=0x6000000000013540, e=1, uninterpreted_data=6917546619827108192)
at s-tasren.adb:395
#7 0x4000000000013ce0 in _ada_c91004b ()
#8 0x40000000000043e0 in main ()
Now 2 threads are both waiting for some conditional variable to change,
which will never happen.
H.J.