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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6538aab6b5cbb022 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-08-31 06:27:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!proxad.net!newspeer1-gui.server.ntli.net!ntli.net!newsfep4-glfd.server.ntli.net.POSTED!53ab2750!not-for-mail From: "Dr. Adrian Wrigley" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Annex E, GLADE and fault-tolerance (GLADE bug???) References: <%mK2b.4892$L15.72@newsfep4-winn.server.ntli.net> In-Reply-To: <%mK2b.4892$L15.72@newsfep4-winn.server.ntli.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sun, 31 Aug 2003 14:27:01 +0100 NNTP-Posting-Host: 81.100.88.147 X-Complaints-To: abuse@ntlworld.com X-Trace: newsfep4-glfd.server.ntli.net 1062336422 81.100.88.147 (Sun, 31 Aug 2003 14:27:02 BST) NNTP-Posting-Date: Sun, 31 Aug 2003 14:27:02 BST Organization: ntl Cablemodem News Service Xref: archiver1.google.com comp.lang.ada:42004 Date: 2003-08-31T14:27:01+01:00 List-Id: OK So I have rewritten my application so that the boot server and applicaion server are in separate partitions. I then expect to make connections from each client to the application server. Everything is fine... for a while. But eventually, the whole thing crashes - either with unexpected exceptions in "the wrong partition", or things simply hang. I have reduced this to a simple test case. Does *anyone* out there in Ada land use Annex E/GLADE? I have found the experience a little frustrating (because I am using closed-source library code with serious threading bugs). However, I was really pleased with how straightforward the whole process is - assuming the tools work properly. I have included the GLADE failure test base below. Hopefully the comments explain what is happening... Thanks for any input. -- Dr. Adrian Wrigley, Cambride, England. ---------------------------- configuration file ---------------------- -- This configuration demonstrates an apparent bug somewhere in the -- GLADE runtime, or perhaps the OS -- -- It has been built using GNAT 3.15p and GLADE 3.15p -- on Intel Linux kernel version 2.4.18 (RedHat 7.3) -- also fails on RedHat 8.0 -- -- To build, use "gnatdist dist.cfg" -- This will make three executables: -- mybootpartition -- the boot server -- serveur -- the application server -- client -- a client of the application -- -- The failure is demonstrated as follows: -- -- 1) Open (at least) four terminals on the same machine -- 2) run "./mybootpartition" on the first terminal -- 3) run "./serveur" on the second -- 4) run "./soaktest" on both the third and fourth (and others) -- -- What should happen? -- each soaktest should output -- Hello started -- Hello World! 1 -- Hello World! 2 -- ... -- up to 1000 -- before repeating -- -- What does happen? -- Erratic behaviour, including -- various exceptions "raised SYSTEM.RPC.COMMUNICATION_ERROR : Partition 2 is unreachable" -- lockup -- -- Why? -- It seems that communication between partitions does not always -- go to the right invocation of the client -- Sometimes, stopping one soaktest crashes the other configuration Dist is -- Boot server specification: pragma Starter (None); pragma Boot_Location ("tcp", "localhost:5926"); -- The boot partition MyBootPartition : Partition := (BootServ); procedure MainProc is in MyBootPartition; -- The server Serveur : Partition := (Message); procedure Hello; Client : Partition; for Client'Main use Hello; end Dist; ------------------------- soaktest script --------------------- #!/bin/bash # soaktest script while : do ./client done ------------------------- gnachop this below ------------------ package BootServ is pragma Remote_Call_Interface; end BootServ; procedure MainProc is begin loop delay 5.0; end loop; end MainProc; package Message is pragma Remote_Call_Interface; function Hello_World return String; end Message; package body Message is function Hello_World return String is begin return "Hello World!"; end Hello_World; end Message; with Message; with Text_IO; procedure Hello is begin Text_IO.Put_Line ("Hello started"); for I in 1 .. 1000 loop Text_IO.Put_Line (Message.Hello_World & Integer'Image (I)); end loop; end Hello; -------------------------