From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,88cb7446cf44556a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news2.volia.net!koehntopp.de!newsfeed.freenet.de!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!news.highwinds-media.com!newspeer1-win.ntli.net!newsfe2-win.ntli.net.POSTED!53ab2750!not-for-mail From: "Dr. Adrian Wrigley" Subject: Re: Reliability and deadlock in Annex E/distributed code User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.lang.ada References: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Sun, 17 Sep 2006 13:33:10 GMT NNTP-Posting-Host: 82.10.238.153 X-Trace: newsfe2-win.ntli.net 1158499990 82.10.238.153 (Sun, 17 Sep 2006 14:33:10 BST) NNTP-Posting-Date: Sun, 17 Sep 2006 14:33:10 BST Organization: NTL Xref: g2news2.google.com comp.lang.ada:6619 Date: 2006-09-17T13:33:10+00:00 List-Id: 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 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; ==>