comp.lang.ada
 help / color / mirror / Atom feed
From: "Dr. Adrian Wrigley" <amtw@linuxchip.demon.co.uk.uk.uk>
Subject: Re: Reliability and deadlock in Annex E/distributed code
Date: Sun, 17 Sep 2006 13:33:10 GMT
Date: 2006-09-17T13:33:10+00:00	[thread overview]
Message-ID: <pan.2006.09.17.13.31.57.898535@linuxchip.demon.co.uk.uk.uk> (raw)
In-Reply-To: mailman.6.1158356955.4234.comp.lang.ada@ada-france.org

On Fri, 15 Sep 2006 16:24:34 -0500, Anh Vo wrote:

> I successfully compiled and run your original code. The important thing
> is the starting sequence of partitions. That is cpart , bpart and apart
> should be started in sequence. Cpart terminates first. Then, after 1000
> seconds, cpart and bpart terminate. Therefore, delay 1000 seconds in
> amain.adb is unnecessary. Comment out this delay, the result of the run
> can complete quickly without for 17 minutes approximately.

Thank you very much for trying this!

The code runs fine for me with GNAT 3.15p on Linux.  Which version are
you using (gcc -v)?

The code runs fine on GNAT GPL 2006 too. But the second time cpart
is run, it hangs.  The third time it works and so on.

I start apart and bpart first as "servers".  If you take out the
delay in amain and run cpart first, it will work fine as you
describe.  But the "servers", apart and bpart will immediately
terminate.  The failure occurs if apart and bpart carry on
running, and a second cpart is invoked.

In my application it is important that I can run multiple
clients at the same time (like cpart).

Since I wrote my message last week, I have found that the failure
also occurs on alternate calls to B.Next within one invocation
of a partition.  I show a modified version of cmain.adb below,
which simply calls B.Next twice.  The partition outputs

C: Running  B.Next:
C: B Next gives 2
<hangs>

Do you get the same problem on your system with this code?

Thanks for your time!
--
Adrian


==> cmain.adb <==
with Text_IO;
with B;

-- Each time this program is run, should produce the next two integers
-- in sequence

procedure CMain is

begin

   Text_IO.Put_Line ("C: Running  B.Next:");
-- The next line works
   Text_IO.Put_Line ("C: B Next gives" & Integer'Image (B.Next));

-- but the next hangs on GNAT GPL 2006 and recent GLADEs
   Text_IO.Put_Line ("C: B Next gives" & Integer'Image (B.Next));

end CMain;
==>




  reply	other threads:[~2006-09-17 13:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-15 21:24 Reliability and deadlock in Annex E/distributed code Anh Vo
2006-09-17 13:33 ` Dr. Adrian Wrigley [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-09-10 20:58 Dr. Adrian Wrigley
2006-09-11 18:52 ` Jerome Hugues
2006-09-12 20:40   ` Dr. Adrian Wrigley
2006-09-13  7:16     ` Dmitry A. Kazakov
2006-09-12 20:31 ` Dr. Adrian Wrigley
2006-09-12 23:24   ` tmoran
2006-09-13 11:00     ` Dr. Adrian Wrigley
2006-09-13 11:21   ` Dr. Adrian Wrigley
2006-09-21 21:18   ` Dr. Adrian Wrigley
2006-09-22 13:52   ` Dr. Adrian Wrigley
2006-09-22 23:11     ` Ludovic Brenta
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox