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!news4.google.com!news.glorb.com!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!news.highwinds-media.com!newspeer1-win.ntli.net!newsfe1-gui.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: Thu, 21 Sep 2006 21:18:35 GMT NNTP-Posting-Host: 82.10.238.153 X-Trace: newsfe1-gui.ntli.net 1158873515 82.10.238.153 (Thu, 21 Sep 2006 22:18:35 BST) NNTP-Posting-Date: Thu, 21 Sep 2006 22:18:35 BST Organization: NTL Xref: g2news2.google.com comp.lang.ada:6690 Date: 2006-09-21T21:18:35+00:00 List-Id: On Tue, 12 Sep 2006 20:31:55 +0000, Dr. Adrian Wrigley wrote: > On Sun, 10 Sep 2006 20:58:33 +0000, Dr. Adrian Wrigley wrote: > >> I've been having difficulty getting my Annex E/glade code to run reliably. >> >> Under gnat 3.15p for x86 Linux, things were tolerably OK, with failures >> of the code about weekly (running one instance continuously). >> Sometimes the program simply wouldn't allow new partitions to run, as if >> there was some boot server failure. Sometimes the server would suddenly >> start consuming all the CPU cycles it could get. > ... > > OK. I have produced a fairly short example. > There are three partitions, A, B, C. > C calls B which calls A. > Compiler is GNAT GPL 2006 + GLADE 2006 on x86 Linux > > The partition C (executable in ./cpart) runs OK on *alternate* > invocations. Every other time, it hangs indefinitely. > This seems strange. ... Just a quick update on (non) progress... OK. The test case is now shorter and very easy to run, failing with just one partition used. Simply gnatchop the text. Paste the dist2.cfg # compile gnatdist -g dist2.cfg # run ./apart B: B Next called C: B Next gives 1 The program should output numbers up to 100 and exit. So far, it fails on: GNAT GPL 2005, GNAT GPL 2006, GNAT 4.1.1 (using corresponding glade distributions) and it succeeds on: GNAT 3.15p on FC5, Red Hat 8.0 and knoppix (debian) (arch i386/i686) The problem is that 3.15p glade fails in other, more interesting ways, some of which have since been fixed. RACW calls are proving particularly problematic. ------ gnatchop-able text follows with Text_IO; with B; with A; -- Each time this program is run, should produce the next integer in sequence procedure CMain is begin for I in 1 .. 100 loop Text_IO.Put_Line ("C: B Next gives" & Integer'Image (B.Next)); end loop; end CMain; package body A is X : Integer := 0; function Next return Integer is begin X := X + 1; -- Return next integer in sequence, unprotected return X; end Next; end A; package A is pragma Remote_Call_Interface; -- The next line causes failure. Without it, -- the calls are local and succeed without problem also see b.ads pragma All_Calls_Remote; function Next return Integer; end A; with Text_IO; with A; package body B is -- Return A.Next simply by passing call through function Next return Integer is begin Text_IO.Put_Line ("B: B Next called"); return A.Next; end Next; end B; package B is pragma Remote_Call_Interface; -- The nextline causes failure. Without it, -- the calls are local and succeed without problem pragma All_Calls_Remote; function Next return Integer; -- Pass through of A's Next end B; -----end gnatchop-able text -- Configuration file dist2.cfg configuration Dist2 is -- Boot server specification: pragma Starter (None); pragma Boot_Location ("tcp", "localhost:6788"); -- Choose spare port APart : Partition := (A, B, CMain); procedure CMain is in APart; for APart'Task_Pool use (2, 40, 60); end Dist2; -------------END------------