Bug 1220802
| Summary: | strace shows 11 as execve syscall's return value | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Michael Petlan <mpetlan> |
| Component: | strace | Assignee: | DJ Delorie <dj> |
| Status: | CLOSED WONTFIX | QA Contact: | Michael Petlan <mpetlan> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.7 | CC: | ashankar, esyr, law, mkolar, mnewsome, ohudlick |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | s390x | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-01-07 19:50:29 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: | |||
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). |
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.