Bug 510894 - ptrace(GETSIGINFO) not working as expected (utrace)
Summary: ptrace(GETSIGINFO) not working as expected (utrace)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 10
Hardware: i686
OS: Linux
low
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL: http://fakerootng.svn.sourceforge.net...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-12 07:09 UTC by Shachar Shemesh
Modified: 2009-12-18 09:37 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-12-18 09:37:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Sample code displaying the problem (3.80 KB, text/x-csrc)
2009-07-12 07:09 UTC, Shachar Shemesh
no flags Details

Description Shachar Shemesh 2009-07-12 07:09:00 UTC
Created attachment 351372 [details]
Sample code displaying the problem

Description of problem:
the ptrace(PTRACE_GETSIGINFO) is not returning the expected values in si_code, instead returning different values in some cases, and EINVAL in others.

Version-Release number of selected component (if applicable):
$ uname -a
Linux vmf10 2.6.27.24-170.2.68.fc10.i686 #1 SMP Wed May 20 23:10:16 EDT 2009 i686 i686 i386 GNU/Linux

How reproducible:
Always

Steps to Reproduce:
1. Compile attached test program, or download from URL above
2. Run on vanilla kernel
3. Run on Fedora kernel
  
Actual results:
Process 2256 stopped with SIGSTOP
Process 2256 stopped with SIGTRAP
siginfo.si_code=1
Process 2256 stopped with SIGTRAP
ptrace(GETSIGINFO failed): Invalid argument
Process 2256 stopped with SIGTRAP
ptrace(GETSIGINFO failed): Invalid argument
Process 2256 stopped with SIGTRAP
siginfo.si_code=0
Process 2256 stopped with SIGTRAP
ptrace(GETSIGINFO failed): Invalid argument
Process 2256 stopped with SIGTRAP
ptrace(GETSIGINFO failed): Invalid argument
Process 2256 stopped with SIGTRAP
siginfo.si_code=0
Process 2256 stopped with SIGTRAP
ptrace(GETSIGINFO failed): Invalid argument
...
Process 2256 stopped with SIGTRAP
ptrace(GETSIGINFO failed): Invalid argument
Process 2256 stopped with SIGCHLD
Process 2256 stopped with SIGTRAP
siginfo.si_code=1
Process 2256 stopped with SIGTRAP
ptrace(GETSIGINFO failed): Invalid argument
Process 2256 exit with exit code 3


Expected results:
Taken on vanilla 2.6.30 for AMD64:
Process 20285 stopped with SIGSTOP
Process 20285 stopped with SIGTRAP
siginfo.si_code=2
Process 20285 stopped with SIGTRAP
siginfo.si_code=5
Process 20285 stopped with SIGTRAP
siginfo.si_code=5
Process 20285 stopped with SIGTRAP
siginfo.si_code=0
Process 20285 stopped with SIGTRAP
siginfo.si_code=5
Process 20285 stopped with SIGTRAP
siginfo.si_code=5
Process 20285 stopped with SIGTRAP
siginfo.si_code=0
Process 20285 stopped with SIGTRAP
siginfo.si_code=5
....
Process 20285 stopped with SIGTRAP
siginfo.si_code=5
Process 20285 stopped with SIGCHLD
Process 20285 stopped with SIGTRAP
siginfo.si_code=2
Process 20285 stopped with SIGTRAP
siginfo.si_code=5
Process 20285 exit with exit code 3


Additional info:
I have not investigated why a single step returns 1 on Fedora and 2 on vanilla. This may well be the difference between the architectures (i686 vs. amd64). If it is, then not a problem. If it's not, then this is a bug.

Either way, GETSIGINFO should not return an error (EINVAL) merely because its internal state is not correct, certainly not in cases where vanilla actually reports a distinct code (after PTRACE_SYSCALL).

Comment 1 Chuck Ebbert 2009-08-12 22:28:55 UTC
This is fixed in Fedora 11's 2.6.29 kernel.

Comment 2 Bug Zapper 2009-11-18 12:09:44 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Bug Zapper 2009-12-18 09:37:37 UTC
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


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