public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Andrew Walrond <andrew@walrond.org>
Cc: gdb@sources.redhat.com
Subject: Re: gdb drops out with 'I/O possible message'
Date: Mon, 31 Oct 2005 09:43:00 -0000	[thread overview]
Message-ID: <jebr1658ej.fsf@sykes.suse.de> (raw)
In-Reply-To: <200510310653.49726.andrew@walrond.org> (Andrew Walrond's message of "Mon, 31 Oct 2005 06:53:49 +0000")

Andrew Walrond <andrew@walrond.org> writes:

> On Saturday 29 October 2005 00:15, Daniel Jacobowitz wrote:
>> On Fri, Oct 28, 2005 at 11:30:00PM +0100, Andrew Walrond wrote:
>> > What might cause gdb to do this?
>>
>> I have no idea.  That message comes from ruby rather than GDB.
>
> No, it doesn't...

Just because gdb contains the string doesn't mean that it has printed it.

> $ grep -rF 'I/O possible' gdb-6.3

Glibc also contains this string:

libc/sysdeps/generic/siglist.h:  init_sig (SIGIO, "IO", N_("I/O possible"))
libc/sysdeps/generic/signame.c:  init_sig (SIGIO, "IO", "I/O possible");
libc/sysdeps/generic/signame.c:  init_sig (SIGPOLL, "POLL", "I/O possible");
libc/sysdeps/unix/siglist.c:    N_("I/O possible"),

> I have seen gdb drop out with this message when debugging c, c++ as well as 
> ruby projects, but not frequently. In this particular example, I immediately 
> re-ran gdb with the same commands and it worked exactly as expected.

Some process (ruby?) is probably enabling async I/O on stdin, which causes
all processes in the same process group to receive SIGIO whenever
something is available to be read on stdin.  Then the process crashes and
has no chance to disable async I/O.  With the next debugging session a new
process group is created, but the SIGIO signals are still sent to the old
(now defunct) process group, effectively dropping them on the floor.

> I don't see 'I/O possible' often, but when I do gdb always seems to just exit.

Try running gdb inside gdb to find out exactly why gdb is exiting.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2005-10-31  9:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-28 22:30 Andrew Walrond
2005-10-28 23:15 ` Daniel Jacobowitz
2005-10-31  6:53   ` Andrew Walrond
2005-10-31  9:43     ` Andreas Schwab [this message]
2005-10-31 10:03       ` Andrew Walrond
2005-10-31 14:18         ` Daniel Jacobowitz

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=jebr1658ej.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=andrew@walrond.org \
    --cc=gdb@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).