Bug 1235833

Summary: strace dies on clone.
Product: Red Hat Enterprise Linux 7 Reporter: D. E. Evans <devans>
Component: straceAssignee: Jeff Law <law>
Status: CLOSED ERRATA QA Contact: Michael Petlan <mpetlan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: bgollahe, law, mcermak, mnewsome, mpetlan, ohudlick, pfrankli
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: strace-4.8-11.el7 Doc Type: Bug Fix
Doc Text:
Previously, the strace utility contained a race condition in its handling of fork and clone calls when strace was in the "follow-fork" mode (using the "-f" option). As a consequence, strace could lose track of a traced process, and the traced process was incorrectly terminated. With this update, the race condition has been closed, and strace correctly handles the tracing of both the parent and child processes, regardless of which starts to be executed first. As a result, programs that fork or clone while under strace control no longer terminate prematurely.
Story Points: ---
Clone Of:
: 1235855 1235857 (view as bug list) Environment:
Last Closed: 2015-11-19 09:09:04 UTC Type: Bug
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: 1235855, 1235857    

Description D. E. Evans 2015-06-25 20:57:47 UTC
Description of problem:
strace dies on clone.

Version-Release number of selected component (if applicable):
tested with 4.8-7 on 7.1.

How reproducible:
Run ntpd (or chronyd) manually with strace.

Steps to Reproduce:
systemctl stop chronyd
strace -f ntpd -u ntp:ntp -g

Actual results:
When the process clones and drops its capabilities, strace disconnects.

Expected results:
strace output should show binding to port 123 as the ntp user and dropping its capabilities (see capset and setuid calls).

Additional info:
Works fine with a default build of 4.10 upstream (i.e. rpmbuild -ta, rpm -U of resulting RPM).

Comment 2 Jeff Law 2015-06-25 22:54:57 UTC
I'm confident this problem is due to a race which can cause the follow-fork option (-f) to not work properly in some cases.

strace is not scheduled to be updated in RHEL 7.2.  However I will make sure this gets fixed in the next version of DTS.

Comment 9 errata-xmlrpc 2015-11-19 09:09:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2145.html