Bug 510894 - ptrace(GETSIGINFO) not working as expected (utrace)
ptrace(GETSIGINFO) not working as expected (utrace)
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
10
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
http://fakerootng.svn.sourceforge.net...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-12 03:09 EDT by Shachar Shemesh
Modified: 2009-12-18 04:37 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-12-18 04:37:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Shachar Shemesh 2009-07-12 03:09:00 EDT
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 18:28:55 EDT
This is fixed in Fedora 11's 2.6.29 kernel.
Comment 2 Bug Zapper 2009-11-18 07:09:44 EST
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 04:37:37 EST
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.