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 1035434 - strace gets confused by PID namespaces
Summary: strace gets confused by PID namespaces
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: strace
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Eugene Syromiatnikov
QA Contact: Edjunior Barbosa Machado
URL:
Whiteboard:
Depends On:
Blocks: 1725113 1780592 1790836 1804334 1807458
TreeView+ depends on / blocked
 
Reported: 2013-11-27 18:37 UTC by Daniel Berrangé
Modified: 2020-10-05 08:17 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1035433
: 1725113 1780592 1804334 1807458 (view as bug list)
Environment:
Last Closed: 2020-10-05 08:17:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2013-11-27 18:37:49 UTC
Reproduced on RHEL-7 with

strace-4.8-3.el7
kernel-3.10.0-23.el7

+++ This bug was initially created as a clone of Bug #1035433 +++

Description of problem:
When using strace to debug an LXC problem I noticed that it gets a bit confused by PID namespaces.

I am running strace from host context, so I expect all PIDs it reports to be host PIDs. When strace creates new log files (due to the -ff CLI option) it names them based on the host PIDs, which is good. Inside these log files though the clone() syscalls are reporting container PIDs which is bad. This means you can't correlate the clone() syscalls  with the log files strace is creating.

If running strace from inside container context it correctly uses container PIDs in both places.

Version-Release number of selected component (if applicable):
strace-4.8-1.fc19.x86_64
kernel-3.11.9-200.fc19.x86_64

How reproducible:
Always

Steps to Reproduce:
1. From the host run

# strace -f -ff -o s.log unshare --pid -- /bin/sh

and at the shell prompt execute '/bin/sh' again. Then do it again. And again.. Then exit back to the host context

You should now have several log files
 

Actual results:
# ls s.log.*
s.log.9851  s.log.9860  s.log.9861  s.log.9862
# grep clone s.log.98*
s.log.9851:clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fe81e7b6a10) = 9860
s.log.9860:clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f47d93aca10) = 2
s.log.9861:clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f9962d34a10) = 3


Expected results:
# ls s.log.*
s.log.9851  s.log.9860  s.log.9861  s.log.9862
# grep clone s.log.98*
s.log.9851:clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fe81e7b6a10) = 9860
s.log.9860:clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f47d93aca10) = 9861
s.log.9861:clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f9962d34a10) = 9862


Additional info:

Comment 2 Jeff Law 2013-11-27 19:01:01 UTC
Not getting into RHEL 7.0 unless it's addressed upstream.

Comment 3 RHEL Program Management 2013-11-27 19:26:25 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Comment 13 Eugene Syromiatnikov 2019-03-11 13:10:46 UTC
It's unlikely that I'll be able to push the required changes to upstream during 7.7 development time frame, moving to 7.8.

Comment 16 Jerome Marchand 2020-10-05 08:17:04 UTC
Only critical bugs will be fixed in RHEL 7 after 7.9.


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