Bug 441406 - ptrace: Stepping out of a signal handler runs away
Summary: ptrace: Stepping out of a signal handler runs away
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 8
Hardware: i686
OS: Linux
low
low
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 173278 450378
TreeView+ depends on / blocked
 
Reported: 2008-04-07 21:16 UTC by Jan Kratochvil
Modified: 2008-07-22 22:50 UTC (History)
2 users (show)

Fixed In Version: kernel-2.6.25.10-47.fc8.x86_64
Clone Of:
Environment:
Last Closed: 2008-07-22 22:50:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 6044 0 None None None Never

Description Jan Kratochvil 2008-04-07 21:16:56 UTC
Description of problem:
On repeated PTRACE_SINGLESTEP when a signal gets delivered the signal handler
gets traced but on the `int 0x80' of `__kernel_sigreturn' it starts to
PTRACE_CONT instead.

Version-Release number of selected component (if applicable):
FAILs kernel-2.6.24.4-64.fc8.i686
FAILs kernel-2.6.23.1-42.fc8.i686
FAILs kernel-2.6.25-0.195.rc8.git1.fc9.i686 patched by
  https://www.redhat.com/archives/utrace-devel/2008-April/msg00004.html
PASSes kernel-2.6.24.4-64.fc8.x86_64
PASSes kernel-2.6.20-1.2933.fc6.i686 (as reported by mwielaard)

How reproducible:
Always.

Steps to Reproduce:
wget -O step-through-sigret.c
'http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/tests/ptrace-tests/tests/step-through-sigret.c?cvsroot=systemtap';
gcc -o step-through-sigret step-through-sigret.c -Wall -ggdb2 -D_GNU_SOURCE;
./step-through-sigret; echo $?

Actual results:
1

Expected results:
0

Additional info:

Comment 1 Mark Wielaard 2008-04-08 09:17:00 UTC
See also:
https://www.redhat.com/archives/utrace-devel/2008-April/msg00009.html

From Wenji Huang
"Verified that the test couldn't pass on > 2.6.20 i686 kernel [...]
 But passed on >= 2.6.22 (vanilla, x86_64) and 2.6.25 (utrace patched, x86_64)"

So it seems to not be utrace specific, but an upstream ptrace/signal bug since
2.6.21 on x86 only.

Comment 2 Jan Kratochvil 2008-04-09 17:53:05 UTC
->ptrace as the Bug is not utrace-related:
  https://www.redhat.com/archives/utrace-devel/2008-April/msg00011.html


Comment 3 Julien Tane 2008-05-30 16:53:39 UTC
I have the same problem on Fedora 9 with gcc :  gcc-4.3.0-8.i386,
glibc-headers-2.8-3.i386 (same version of glibc of course)
I downloaded the script given above and I also obtain 

1 
instead of:
0

This is probably related to my difficulties starting user-mode-linux kernels
from: <http://user-mode-linux.sourceforge.net/> or
<http://uml.nagafix.co.uk/kernels/>




Comment 4 Jan Kratochvil 2008-07-22 22:50:04 UTC
Thanks, verified as fixed on kernel-2.6.25.10-47.fc8.x86_64.



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