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,fc4ac82d0abec4ff,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews2.google.com!not-for-mail From: 402450@cepsz.unizar.es (Jano) Newsgroups: comp.lang.ada Subject: Weird bug - Protected object - Gnat 3.15p win32 Date: 11 Jul 2004 08:29:42 -0700 Organization: http://groups.google.com Message-ID: <5d6fdb61.0407110729.657570af@posting.google.com> NNTP-Posting-Host: 62.101.166.185 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1089559783 10337 127.0.0.1 (11 Jul 2004 15:29:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 11 Jul 2004 15:29:43 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:2143 Date: 2004-07-11T08:29:42-07:00 List-Id: Hi Ada men, I think I've stumbled across another mortifying bug in gnat 3.15p win32, another one which has taken a lot of time to track down. Please share any knowledge you have about it: The thing is that I have a protected type with a lot of functions and quite some encapsulated data. Sud- denly it has started to cause deadlocks. After any call to a function (not procedure!) in the protected type, the lock of the monitor is not released for some reason, because any subsequent call to the object will lock and not enter it. The function can have null body, no other tasks are using the protected object. After tinkering around, I've detected that changing the following private member declaration makes the deadlock to go away: protected type Blah is -- procedures and functions private Some_Array : Array_Type (1 .. 1); -- Will work ok Some_Array : Array_Type (1 .. Global_Variable); -- Will deadlock end Blah; Note that Global_Variable also equals to 1! I've tried to get a small reproducer using new code, but failed, so there must be some other dependences for it to arise. Using the code from the project where I've detected it, it happens for every instance of the protected type. Someone has noticed something like this? Having been bitten hard at least twice by gnat bugs in 3.15p win, I'm thinking of making a bugs page for other people to be warned ahead. I'm already aware of the following: * The broken time packages. * The broken Select in Gnat.Sockets. If you're aware of such kind of bugs which are hard to detect and track down, please write about them so I can collect them for reference. I think it can spare useful time to newcomers. Thanks!