Bug 1596312
| Summary: | kernel: x86 compat exit_group(1) sets exit status to zero | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | dima |
| Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 28 | CC: | airlied, aoliva, arjun, bskeggs, codonell, dima, dj, ewk, fweimer, hdegoede, ichavero, itamar, jarodwilson, jglisse, john.j5live, jonathan, josef, kernel-maint, law, linville, mchehab, mfabian, mjg59, pfrankli, rth, siddhesh, steved |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-07-06 15:39:06 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: | |||
|
Description
dima
2018-06-28 15:05:40 UTC
Would you please tell us which glibc-common package is installed on your system? Thanks. (In reply to Florian Weimer from comment #1) > Would you please tell us which glibc-common package is installed on your > system? Thanks. Yes, it's installed: root@host:~# dnf list installed glibc-common Installed Packages glibc-common.x86_64 2.27-19.fc28 @updates And it worked before the past update. Thanks. Please run: strace -f -eexecve ldd /bin/bash And: bash -x ldd /bin/bash And attach the output to this bug. [root@farin ~]# strace -f -eexecve ldd /bin/bash
execve("/usr/bin/ldd", ["ldd", "/bin/bash"], 0x7ffde273d4e8 /* 22 vars */) = 0
strace: Process 30496 attached
[pid 30496] execve("/lib/ld-linux.so.2", ["/lib/ld-linux.so.2", "--verify", "/bin/bash"], 0x55a7c3766450 /* 22 vars */) = 0
strace: [ Process PID=30496 runs in 32 bit mode. ]
[pid 30496] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=30496, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
strace: Process 30497 attached
strace: Process 30498 attached
strace: Process 30499 attached
[pid 30499] execve("/lib/ld-linux.so.2", ["/lib/ld-linux.so.2", "/bin/bash"], 0x55a7c3772900 /* 27 vars */) = 0
strace: [ Process PID=30499 runs in 32 bit mode. ]
[pid 30499] +++ exited with 108 +++
[pid 30498] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=30499, si_uid=0, si_status=108, si_utime=0, si_stime=0} ---
[pid 30498] +++ exited with 108 +++
[pid 30497] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=30498, si_uid=0, si_status=108, si_utime=0, si_stime=0} ---
/bin/bash: error while loading shared libraries: /bin/bash: wrong ELF class: ELFCLASS64
[pid 30497] +++ exited with 108 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=30497, si_uid=0, si_status=108, si_utime=0, si_stime=0} ---
+++ exited with 1 +++
[root@farin ~]# bash -x ldd /bin/bash
+ TEXTDOMAIN=libc
+ TEXTDOMAINDIR=/usr/share/locale
+ RTLDLIST='/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-linux-x32.so.2'
+ warn=
+ bind_now=
+ verbose=
+ test 1 -gt 0
+ case "$1" in
+ break
+ add_env='LD_TRACE_LOADED_OBJECTS=1 LD_WARN= LD_BIND_NOW='
+ add_env='LD_TRACE_LOADED_OBJECTS=1 LD_WARN= LD_BIND_NOW= LD_LIBRARY_VERSION=$verify_out'
+ add_env='LD_TRACE_LOADED_OBJECTS=1 LD_WARN= LD_BIND_NOW= LD_LIBRARY_VERSION=$verify_out LD_VERBOSE='
+ test '' = yes
+ set -o pipefail
+ case $# in
+ single_file=t
+ result=0
+ for file in "$@"
+ test t = t
+ case $file in
+ :
+ test '!' -e /bin/bash
+ test '!' -f /bin/bash
+ test -r /bin/bash
+ test -x /bin/bash
+ RTLD=
+ ret=1
+ for rtld in ${RTLDLIST}
+ test -x /lib/ld-linux.so.2
++ /lib/ld-linux.so.2 --verify /bin/bash
+ verify_out=
+ ret=0
+ case $ret in
+ RTLD=/lib/ld-linux.so.2
+ break
+ case $ret in
+ try_trace /lib/ld-linux.so.2 /bin/bash
+ eval LD_TRACE_LOADED_OBJECTS=1 LD_WARN= LD_BIND_NOW= 'LD_LIBRARY_VERSION=$verify_out' LD_VERBOSE= '"$@"'
++ LD_TRACE_LOADED_OBJECTS=1
++ LD_WARN=
++ LD_BIND_NOW=
++ LD_LIBRARY_VERSION=
++ LD_VERBOSE=
++ /lib/ld-linux.so.2 /bin/bash
+ cat
/bin/bash: error while loading shared libraries: /bin/bash: wrong ELF class: ELFCLASS64
+ result=1
+ exit 1
So “/lib/ld-linux.so.2 --verify /bin/bash” exits with status 0 on your system? Could you confirm this by running it manually? (In reply to Florian Weimer from comment #5) > So “/lib/ld-linux.so.2 --verify /bin/bash” exits with status 0 on your > system? Could you confirm this by running it manually? It's true: [root@farin ~]# strace /lib/ld-linux.so.2 --verify /bin/bash execve("/lib/ld-linux.so.2", ["/lib/ld-linux.so.2", "--verify", "/bin/bash"], 0x7fffe1b90d70 /* 22 vars */) = 0 strace: [ Process PID=22351 runs in 32 bit mode. ] brk(NULL) = 0xf96d1000 openat(AT_FDCWD, "/bin/bash", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\344\2\0\0\0\0\0"..., 512) = 512 close(3) = 0 exit_group(1) = ? +++ exited with 0 +++ (In reply to dima from comment #6) > [root@farin ~]# strace /lib/ld-linux.so.2 --verify /bin/bash > execve("/lib/ld-linux.so.2", ["/lib/ld-linux.so.2", "--verify", > "/bin/bash"], 0x7fffe1b90d70 /* 22 vars */) = 0 > strace: [ Process PID=22351 runs in 32 bit mode. ] > brk(NULL) = 0xf96d1000 > openat(AT_FDCWD, "/bin/bash", O_RDONLY|O_CLOEXEC) = 3 > read(3, > "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\344\2\0\0\0\0\0"..., > 512) = 512 > close(3) = 0 > exit_group(1) = ? > +++ exited with 0 +++ Now that's really strange. For me, the last two lines are: exit_group(1) = ? +++ exited with 1 +++ I'm still running 4.16.16-300.fc28.x86_64. Could you downgrade the kernel and see if the bug goes away? And perhaps upgrade to 4.17.3 for another test? Thanks. It works fine with 4.17.3-200.fc28.x86_64. Thank you! |