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 1220802 - strace shows 11 as execve syscall's return value
Summary: strace shows 11 as execve syscall's return value
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: strace
Version: 6.7
Hardware: s390x
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: DJ Delorie
QA Contact: Michael Petlan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-12 13:28 UTC by Michael Petlan
Modified: 2018-10-17 10:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-07 19:50:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Michael Petlan 2015-05-12 13:28:56 UTC
Description of problem:

Despite that execve should not return anything in case of success, a weird value 11 is at the output when it's traced by strace.

Version-Release number of selected component (if applicable):

kernel-2.6.32-552.el6.s390x
strace-4.8-10.el6.s390x

How reproducible:

100%

Steps to Reproduce:
1. strace -f -e execve -- /bin/sh -c '/bin/ls'


Actual results:

execve("/bin/sh", ["/bin/sh", "-c", "/bin/ls"], [/* 42 vars */]) = 11
execve("/bin/ls", ["/bin/ls"], [/* 42 vars */]) = 11

Expected results:

execve("/bin/sh", ["/bin/sh", "-c", "/bin/ls"], [/* 42 vars */]) ... <no return>
execve("/bin/ls", ["/bin/ls"], [/* 42 vars */]) ... <no return>

Additional info:

 * on RHEL 7 and on non-s390x environments it shows usually 0, but that value is also not correct

 * ltrace seems to handle the syscall correctly

 * systemtap shows 0

 * perf trace shows 11 as well as strace (bz1220799)

 * The value 11 should be number of the execve syscall on s390x, so probably the syscall value remains in some register and it is wrongly considered being the return value of execve then.

Comment 6 Eugene Syromiatnikov 2018-10-17 10:40:16 UTC
FWIW, "11" is execve syscall number; it shows up since on s390 return value is placed in the same register (in pt_regs) as syscall number (gpr2, in case svc scno is used; that's why, probably, it didn't show up previously: if svc 0 is used, then scno is placed in gpr1 and gpr2 is 0, IIUC).


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