From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10141 invoked by alias); 5 Jan 2006 14:50:09 -0000 Received: (qmail 10128 invoked by uid 22791); 5 Jan 2006 14:50:08 -0000 X-Spam-Check-By: sourceware.org Received: from sadr.equallogic.com (HELO sadr.equallogic.com) (66.155.203.134) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 05 Jan 2006 14:50:07 +0000 Received: from sadr.equallogic.com (localhost.localdomain [127.0.0.1]) by sadr.equallogic.com (8.12.8/8.12.8) with ESMTP id k05Eo4pE012430; Thu, 5 Jan 2006 09:50:04 -0500 Received: from M31.equallogic.com (M31.equallogic.com [172.16.1.31]) by sadr.equallogic.com (8.12.8/8.12.8) with SMTP id k05Eo3ih012425; Thu, 5 Jan 2006 09:50:03 -0500 Received: from PKONING.equallogic.com ([172.16.1.176]) by M31.equallogic.com with Microsoft SMTPSVC(6.0.3790.211); Thu, 5 Jan 2006 09:50:03 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17341.12827.191000.952900@gargle.gargle.HOWL> Date: Thu, 05 Jan 2006 14:50:00 -0000 From: Paul Koning To: michsnyd@cisco.com Cc: gdb@sources.redhat.com, gdb-patches@sources.redhat.com, wendyp@cisco.com Subject: Re: [RFC] What to do on VM exhaustion References: <43BC6F36.3050000@cisco.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00020.txt.bz2 >>>>> "Michael" == Michael Snyder writes: Michael> Hey folks, I don't know how many of you may have ever run Michael> into this situation, but my question is, what should we do Michael> in gdb when we detect that we are dead out of memory? Michael> Theoretically it's handled -- there is a routine in utils.c Michael> called "nomem", which calls internal_error. The problem is Michael> that internal_error isn't a simple bailout -- it calls query Michael> to ask the user what s/he wants to do. And you can't count Michael> on something like that working, when you are out of virtual Michael> memory. That's for sure. And it fails miserably. GDB hangs for a while then blows up spectacularly. Michael> I actually ran into this once before, years ago -- in fact Michael> it was RMS himself who called me to beef about gdb bailing Michael> on him, when he was debugging emacs and crashed the stack Michael> with an infinite recursion. I think gdb ran out of memory Michael> while trying to do a backtrace. He wanted me to make it Michael> recover gracefully and let him keep debugging. I couldn't Michael> do it, but then I didn't have the luxury of having all you Michael> guys to ask for advice! Michael> In present time, I'm suggesting that nomem should just write Michael> a simple error msg to the console and abort. What do you Michael> think? That would be an improvement over the current broken situation. The right answer is what RMS said, though. Unfortunately that's likely to be hard. paul