public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H. J. Lu" <hjl@lucon.org>
To: Geert Bosch <bosch@gnat.com>
Cc: Arnaud Charlet <charlet@ACT-Europe.FR>,
	gcc@gcc.gnu.org, Laurent GUERBY <laurent@guerby.net>,
	Chris Proctor <chrisp_42@bigpond.com>
Subject: Re: How to add timeout to Ada tests on Linux/ia64?
Date: Mon, 29 Mar 2004 21:12:00 -0000	[thread overview]
Message-ID: <20040329181437.GA2875@lucon.org> (raw)
In-Reply-To: <EA0B933C-8036-11D8-A9EB-000A959A128E@gnat.com>

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.

  reply	other threads:[~2004-03-29 18:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-25  2:55 H. J. Lu
2004-03-25 12:43 ` Arnaud Charlet
2004-03-25 14:23   ` Laurent GUERBY
2004-03-25 17:20     ` H. J. Lu
2004-03-25 13:06 ` Chris Proctor
2004-03-25 13:21   ` Arnaud Charlet
2004-03-25 14:21     ` Laurent GUERBY
2004-03-25 14:24       ` Arnaud Charlet
2004-03-25 14:28         ` Laurent GUERBY
2004-03-25 14:29     ` Chris Proctor
2004-03-25 15:04       ` Arnaud Charlet
2004-03-25 22:35         ` Chris Proctor
2004-03-25 23:29           ` Laurent GUERBY
2004-03-27  0:11             ` H. J. Lu
2004-03-27  0:36               ` Laurent GUERBY
2004-03-27  0:41                 ` H. J. Lu
2004-03-27  0:48                   ` Laurent GUERBY
2004-03-27 21:37                     ` Arnaud Charlet
2004-03-28  6:38                       ` Geert Bosch
2004-03-29 21:12                         ` H. J. Lu [this message]
2004-03-29 10:30                       ` Laurent GUERBY
2004-04-21  5:58 ` H. J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040329181437.GA2875@lucon.org \
    --to=hjl@lucon.org \
    --cc=bosch@gnat.com \
    --cc=charlet@ACT-Europe.FR \
    --cc=chrisp_42@bigpond.com \
    --cc=gcc@gcc.gnu.org \
    --cc=laurent@guerby.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).