Bug 284311 - utrace: SA_RESETHAND fails on 1st PTRACE_CONT(sig)
utrace: SA_RESETHAND fails on 1st PTRACE_CONT(sig)
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
7
All Linux
medium Severity low
: ---
: ---
Assigned To: Roland McGrath
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 309551
  Show dependency treegraph
 
Reported: 2007-09-10 02:24 EDT by Young-Ho, Cha
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version: 2.6.22.7-85.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-25 18:33:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Simplified testcase. (3.94 KB, text/plain)
2007-09-10 17:49 EDT, Jan Kratochvil
no flags Details

  None (edit)
Description Young-Ho, Cha 2007-09-10 02:24:28 EDT
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
Comment 1 Young-Ho, Cha 2007-09-10 03:44:20 EDT
It seems an issue related with kernel ptrace compatibility.



Comment 2 Jan Kratochvil 2007-09-10 17:48:04 EDT
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
Comment 3 Jan Kratochvil 2007-09-10 17:49:14 EDT
Created attachment 192121 [details]
Simplified testcase.

Thanks for the bugreport.
Comment 4 Roland McGrath 2007-09-11 20:20:01 EDT
I have a fix in now that should show up in the next rawhide and f7 update kernel
builds.
Comment 5 Chuck Ebbert 2007-09-14 14:58:40 EDT
In kernel 2.6.22.6-81.fc7, submitted for testing.
Comment 6 Jan Kratochvil 2007-09-17 17:50:34 EDT
FYI it is not fixed in:
kernel-2.6.23-0.171.rc5.git1.fc8.x86_64
Comment 7 Chuck Ebbert 2007-09-17 18:08:43 EDT
(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...

Note You need to log in before you can comment on or make changes to this bug.