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,ab4f67f984ef04f9 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeed.berkeley.edu!ucberkeley!cyclone-sf.pbi.net!151.164.30.34!cyclone.swbell.net!bos-service1.raytheon.com!dfw-service2.ext.ray.com.POSTED!53ab2750!not-for-mail From: Mark H Johnson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Is the Ada run-time required to detect out-of-memory conditions? References: <878yfmiuak.fsf@insalien.org> In-Reply-To: <878yfmiuak.fsf@insalien.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 21 May 2004 11:56:49 -0500 NNTP-Posting-Host: 192.27.48.39 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.ray.com 1085158610 192.27.48.39 (Fri, 21 May 2004 11:56:50 CDT) NNTP-Posting-Date: Fri, 21 May 2004 11:56:50 CDT Organization: Raytheon Company Xref: controlnews3.google.com comp.lang.ada:749 Date: 2004-05-21T11:56:49-05:00 List-Id: Ludovic Brenta wrote: > Hello, > > I have received a bug report [1] against GNAT 3.15p and reproduced the > same behaviour with GCC 3.4. [snip] > My first impression is that the program exhausts physical memory (RAM > + swap) before exhausting the default storage pool, the size of which > is defined to be the total size of the virtual address space. As a > result, the kernel detects the out-of-memory condition before the Ada > run-time library does, and sends SIGKILL to the program. Of course, > the program has no chance to turn SIGKILL into an exception. > > Is my assessment correct? Is this a bug in the GNAT library? Well - if the OOM killer is getting rid of the application, you should be able to do something like the following... - allocate a bunch of storage with program A and then wait - run another copy of A and then wait repeat running new copies until someone gets killed. If its the OOM killer and it kills any but the last copy - it cannot be a GNAT library problem. You HAD enough storage when you went into the wait but globally don't now. I don't see how any run time could prevent such a situation (especially since the program that "broke the camel's back" could be implemented in any language). Also - have you checked the console / system logs for any indication that the OOM killer is at work? --Mark