Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 635853

Summary: ptrace: the tracee can get the extra trap after PTRACE_DETACH
Product: Red Hat Enterprise Linux 6 Reporter: Oleg Nesterov <onestero>
Component: kernelAssignee: Oleg Nesterov <onestero>
Status: CLOSED ERRATA QA Contact: Guangze Bai <gbai>
Severity: low Docs Contact:
Priority: low    
Version: 6.1CC: czhang, jan.kratochvil, qcai, syeghiay, yshao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-2.6.32-91.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-23 20:53:02 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:
Attachments:
Description Flags
the tracee gets the extra trap after PTRACE_DETACH none

Description Oleg Nesterov 2010-09-20 21:59:37 UTC
Created attachment 448556 [details]
the tracee gets the extra trap after PTRACE_DETACH

Description of problem:

TIF_SINGLESTEP is not cleared after PTRACE_DETACH
and the tracee gets another trap after resume.

How reproducible:

    always

Steps to Reproduce:

    run the attached test-case

Actual results:

    the tracee gets the trap after detach

Expected results:

    the tracee should exit normaly

Additional info:

    the patch exists, under discussion

Comment 2 RHEL Program Management 2010-11-10 12:19:51 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 3 Oleg Nesterov 2010-11-24 17:45:00 UTC
[RHEL6.1 PATCH] bz635853: utrace: move user_disable_single_step() logic from utrace_control() to utrace_reset()
http://post-office.corp.redhat.com/archives/rhkernel-list/2010-November/msg01359.html

Comment 4 Aristeu Rozanski 2010-12-15 16:06:44 UTC
Patch(es) available on kernel-2.6.32-91.el6

Comment 9 Guangze Bai 2011-04-27 03:25:00 UTC
Having run attachment,reproduced on kernel-2.6.32-85.el6:

# ./a.out
ERR!! exit status: 0085

verified on kernel-2.6.32-122.el6:

# ./a.out
# echo $?
0
(exit normally)

Comment 10 errata-xmlrpc 2011-05-23 20:53:02 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0542.html