Bug 232837
Summary: | utrace: PTRACE_ATTACH of SIGSTOPped process hangs | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jan Kratochvil <jan.kratochvil> |
Component: | kernel | Assignee: | Roland McGrath <roland> |
Status: | CLOSED RAWHIDE | QA Contact: | Brian Brock <bbrock> |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | cagney, cmoller, mjw |
Target Milestone: | --- | Keywords: | Regression, Reopened |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | kernel-2.6.23-0.204.rc8.fc8 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2007-10-04 20:23:05 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 233540, 233852 | ||
Attachments: |
Description
Jan Kratochvil
2007-03-18 17:33:10 UTC
Created attachment 150336 [details]
Testcase (returns OK or abort()s).
Looking into it. Someone please add this as a regression test in the frysk suite. Created attachment 150448 [details]
Testcase for kernel-2.6.20-1.2935.rm1.fc6: PTRACE_PEEKUSER + PTRACE_GETREGS
Tested kernel-2.6.20-1.2935.rm1.fc6 passes PTRACE_ATTACH / waitpid() but it
fails on the registers reading:
ptrace(PTRACE_ATTACH, 16984, 0, 0) = 0
wait4(16984, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGSTOP}], 0, NULL) = 16984
ptrace(PTRACE_PEEKUSER, 16984, 8*R15, [0]) = -1 ESRCH (No such process)
ptrace(PTRACE_GETREGS, 16984, 0, 0x7fffde5e2a50) = -1 ESRCH (No such process)
Updated testcase tests also this kernel feature.
On kernel-2.6.20-1.2935.rm1.fc6.x86_64 it now fails with:
attachstop2: attachstop2.c:77: main: Assertion `(*__errno_location ()) == 0'
failed.
Aborted
Created attachment 150449 [details]
Testcase for this bug
Having the testcase simply abort doesn't work in the frysk test suite. This
version has been tweaked to exit(0) on pass and exit(1) on fail and it's what
I'm going to stick into the suite.
No other regressions were found during compare of GDB-6.6-5 testsuite results: kernel-2.6.20-1.2300.fc5.x86_64 -> kernel-2.6.20-1.2935.rm1.fc6.x86_64 You also need to clean up all the asserts to be e.g. error (2, errno, ...) calls. Do that on attachstop2.c for the suite. Okay, original frysk testsuite test replaced with one based on attachstop2.c. Created attachment 150476 [details]
Testcase for kernel-2.6.20-1.2935.rm2.fc6: second PTRACE_ATTACH
It is sad but kernel-2.6.20-1.2935.rm2.fc6 still hangs on the sequence:
PTRACE_ATTACH, PTRACE_DETACH, PTRACE_ATTACH.
Chris, based on your variant, also the frysk testsuite got committed this
update.
No GDB testsuite regressions found for kernel-2.6.20-1.2300.fc5 -> kernel-2.6.20-1.2936.rm2.fc6 ( /mnt/brew/scratch/roland/task_684350/ ) when ran on i686 + x86_64. This is long fixed and should be closed, right? Yes, thanks, all of its 3 sub-bugs were verified as fixed on: kernel-2.6.21-1.3228.fc7.x86_64 There is a regression for the testcase of Comment 10: kernel-2.6.21-1.3228.fc7.x86_64: PASS (as in Comment 13 above) but: kernel-2.6.22.4-65.fc7.x86_64: FAIL kernel-2.6.23-0.149.rc4.fc8.x86_64: FAIL Testcase is now provided in Frysk as `frysk4217/attachstop.c'. Created attachment 180921 [details]
Roland's fix.
Still testing possible regressions but basic tests look OK.
I see no regressions on the fix in Comment 15. Current fixes are committed for the next rawhide kernel build. Problem is no longer reproducible on: kernel-2.6.23-0.204.rc8.fc8.x86_64 |