This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb drops out with 'I/O possible message'


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]