From: Michael Snyder <michsnyd@cisco.com>
To: gdb@sources.redhat.com, gdb-patches@sources.redhat.com,
Wendy Peikes <wendyp@cisco.com>
Subject: [RFC] What to do on VM exhaustion
Date: Thu, 05 Jan 2006 01:00:00 -0000 [thread overview]
Message-ID: <43BC6F36.3050000@cisco.com> (raw)
Hey folks,
I don't know how many of you may have ever run into this situation,
but my question is, what should we do in gdb when we detect that
we are dead out of memory?
Theoretically it's handled -- there is a routine in utils.c called
"nomem", which calls internal_error. The problem is that internal_error
isn't a simple bailout -- it calls query to ask the user what s/he
wants to do. And you can't count on something like that working,
when you are out of virtual memory.
I actually ran into this once before, years ago -- in fact it was
RMS himself who called me to beef about gdb bailing on him, when
he was debugging emacs and crashed the stack with an infinite
recursion. I think gdb ran out of memory while trying to do a
backtrace. He wanted me to make it recover gracefully and let him
keep debugging. I couldn't do it, but then I didn't have the
luxury of having all you guys to ask for advice!
In present time, I'm suggesting that nomem should just write
a simple error msg to the console and abort. What do you think?
next reply other threads:[~2006-01-05 1:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-05 1:00 Michael Snyder [this message]
2006-01-05 5:13 ` Eli Zaretskii
[not found] ` <43BD965C.1080500@cisco.com>
2006-01-06 8:50 ` Eli Zaretskii
2006-01-05 14:50 ` Paul Koning
2006-01-05 22:00 ` Michael Snyder
[not found] ` <b1fa29170601051725t2fc37a96r2dc959a45a2aa92f@mail.gmail.com>
2006-01-06 1:35 ` Michael Snyder
[not found] ` <b1fa29170601051800n452bda22sc28082a2776c858@mail.gmail.com>
2006-01-06 3:16 ` Michael Snyder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43BC6F36.3050000@cisco.com \
--to=michsnyd@cisco.com \
--cc=gdb-patches@sources.redhat.com \
--cc=gdb@sources.redhat.com \
--cc=wendyp@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox