Description of problem: Program terminated in gdb when receive signal. Version-Release number of selected component (if applicable): gdb-6.6-15.fc7rh How reproducible: I uploaded sample program at http://ftp.mizi.com/~ganadist/pipetest.tgz and build it first. and run with gdb Steps to Reproduce: 1. run gdb with sample program 2. 3. Actual results: $ gdb ./pipe GNU gdb Red Hat Linux (6.6-15.fc7rh) Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) b main Breakpoint 1 at 0x80488de: file pipe.c, line 34. (gdb) r Starting program: /home/megamino/cvs/prizm/wipi/wipi_lgtel/src/test/pipe Breakpoint 1, main () at pipe.c:34 34 pipe(p); (gdb) n 35 io_init(); (gdb) 36 io_register(p[0], pipe_read_cb, &p); (gdb) 37 char * m = "helloworld"; (gdb) 38 write(p[1], m, 11); (gdb) Program terminated with signal SIGIO, I/O possible. The program no longer exists. Expected results: $ gdb ./pipe GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) b main Breakpoint 1 at 0x804893e: file pipe.c, line 34. (gdb) r Starting program: /home/ganadist/cvs/ganadist/unixsocket/pipe Breakpoint 1, main () at pipe.c:34 34 pipe(p); (gdb) n 35 io_init(); (gdb) 36 io_register(p[0], pipe_read_cb, &p); (gdb) 37 char * m = "helloworld"; (gdb) 38 write(p[1], m, 11); (gdb) fd: 6, code: 1 68656c callback completed 41 sleep(1); Additional info: I tested this problem in Fedora Core 7, Gentoo (linux 2.6.23-rc4, gdb 6.6) and Ubuntu gutsy(linux -2.6.22-11-generic gdb 6.6-debian). but It occur in Fedora core 7 only
It seems an issue related with kernel ptrace compatibility.
Problem has been verified on: kernel-2.6.22.4-65.fc7.x86_64 kernel-2.6.23-0.170.rc5.git1.fc8.x86_64 Problem is not present in upstream: kernel.org 2.6.22-rc4-git7.x86_64
Created attachment 192121 [details] Simplified testcase. Thanks for the bugreport.
I have a fix in now that should show up in the next rawhide and f7 update kernel builds.
In kernel 2.6.22.6-81.fc7, submitted for testing.
FYI it is not fixed in: kernel-2.6.23-0.171.rc5.git1.fc8.x86_64
(In reply to comment #6) > FYI it is not fixed in: > kernel-2.6.23-0.171.rc5.git1.fc8.x86_64 > That kernel is 12 days old...