Bug 1857847
| Summary: | KSH script execution fails with /usr/bin/ls: /usr/bin/ls: cannot execute [Exec format error] | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Rajesh Dulhani <rdulhani> | |
| Component: | ksh | Assignee: | Vincent Mihalkovič <vmihalko> | |
| Status: | CLOSED ERRATA | QA Contact: | Karel Volný <kvolny> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 8.2 | CC: | amepatil, jhuo, kdudka, vmihalko | |
| Target Milestone: | rc | Keywords: | Triaged | |
| Target Release: | 8.0 | Flags: | kdudka:
needinfo-
kdudka: needinfo- pm-rhel: mirror+ |
|
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | ksh-20120801-255.el8 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2035863 (view as bug list) | Environment: | ||
| Last Closed: | 2022-11-08 10:03:55 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: | 2035863 | |||
This upstream issue seems to be related: https://github.com/ksh93/ksh/issues/79 Upstream has just pushed a fix for the above issue: https://github.com/ksh93/ksh/commit/f207cd57 *** Bug 2035863 has been marked as a duplicate of this bug. *** 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 (ksh bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2022:7665 |
I am able to reproduce it with some probability. The failure seems to happen within posix_spawn(). ltrace output of the non-working case: 1361 write(1, "/usr/bin/ls test2\n", 18) = 18 1361 strchr("/usr/bin/ls", '/') = "/usr/bin/ls" 1361 getpid() = 1361 1361 memccpy(0x7feff4ef93b8, 0x7feff4ef88d1, 0, 4632) = 0x7feff4ef93c4 1361 posix_spawnattr_init(0x7ffd12cf9110, 0x7feff4ef9138, 0x7feff4ef9268, 1364) = 0 1361 posix_spawnattr_setpgroup(0x7ffd12cf9110, 1364, 0x7feff4ef9268, 0) = 0 1361 posix_spawnattr_setflags(0x7ffd12cf9110, 2, 0x7feff4ef9268, 0) = 0 1361 posix_spawn(0x7ffd12cf910c, 0x7feff4ef93b8, 0, 0x7ffd12cf9110 <no return ...> 1365 +++ exited (status 127) +++ 1361 --- SIGCHLD (Child exited) --- 1361 <... posix_spawn resumed> ) = 1 1361 posix_spawnattr_destroy(0x7ffd12cf9110, 0x7ffd12cf8e60, 0, 0) = 0 ltrace output of the working case: 1361 write(1, "/usr/bin/ls test3\n", 18) = 18 1361 strchr("/usr/bin/ls", '/') = "/usr/bin/ls" 1361 getpid() = 1361 1361 memccpy(0x7feff4ef93b8, 0x7feff4ef88d1, 0, 4632) = 0x7feff4ef93c4 1361 posix_spawnattr_init(0x7ffd12cf9110, 0x7feff4ef9138, 0x7feff4ef9268, 1) = 0 1361 posix_spawnattr_setpgroup(0x7ffd12cf9110, 0, 0x7feff4ef9268, 0) = 0 1361 posix_spawnattr_setflags(0x7ffd12cf9110, 2, 0x7feff4ef9268, 0) = 0 1361 posix_spawn(0x7ffd12cf910c, 0x7feff4ef93b8, 0, 0x7ffd12cf9110 <no return ...> 1367 --- Called exec() --- 1361 <... posix_spawn resumed> ) = 0 1361 posix_spawnattr_destroy(0x7ffd12cf9110, 0x7ffd12cf8e60, 0, 0) = 0