-
Notifications
You must be signed in to change notification settings - Fork 402
dracut does not add all required libraries if /etc/ld.so.preload
contains a missing library
#2241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dracut does not add all required libraries if /etc/ld.so.preload
contains a missing library
#2241
Comments
I think we should review all |
AFAIR there isn't any. I'm pretty sure I just copied the preceding check. |
We haven't had a complaint for years and now we receive 2 similar bug reports (#2190 upstream and this one at SUSE) in a month, good timing :)
Ok, thanks for your feedback. I'll test it a little more before submitting a PR. |
…ded" When /etc/ld.so.preload contains a non-existing library, `ldd` prints the following output: ``` > ldd /usr/lib64/libfido2.so.1.12.0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. linux-vdso.so.1 (0x00007ffd477f5000) libcbor.so.0.10 => /lib64/libcbor.so.0.10 (0x00007f34062dd000) libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007f3405e00000) libudev.so.1 => /lib64/libudev.so.1 (0x00007f34062af000) libhidapi-hidraw.so.0 => /lib64/libhidapi-hidraw.so.0 (0x00007f34062a6000) libz.so.1 => /lib64/libz.so.1 (0x00007f340628c000) libc.so.6 => /lib64/libc.so.6 (0x00007f3405c05000) /lib64/ld-linux-x86-64.so.2 (0x00007f3406336000) ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. > echo $? 0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ``` If `dracut-install` stops parsing the `ldd` output, the initrd will not contain all the required dependencies. Fixes issue dracutdevs#2241
This is not a regression, it was reported for dracut-044, our oldest supported version. |
…ded" When /etc/ld.so.preload contains a non-existing library, `ldd` prints the following output: ``` > ldd /usr/lib64/libfido2.so.1.12.0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. linux-vdso.so.1 (0x00007ffd477f5000) libcbor.so.0.10 => /lib64/libcbor.so.0.10 (0x00007f34062dd000) libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007f3405e00000) libudev.so.1 => /lib64/libudev.so.1 (0x00007f34062af000) libhidapi-hidraw.so.0 => /lib64/libhidapi-hidraw.so.0 (0x00007f34062a6000) libz.so.1 => /lib64/libz.so.1 (0x00007f340628c000) libc.so.6 => /lib64/libc.so.6 (0x00007f3405c05000) /lib64/ld-linux-x86-64.so.2 (0x00007f3406336000) ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. > echo $? 0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ``` If `dracut-install` stops parsing the `ldd` output, the initrd will not contain all the required dependencies. Fixes issue dracutdevs#2241
…ded" When /etc/ld.so.preload contains a non-existing library, `ldd` prints the following output: ``` > ldd /usr/lib64/libfido2.so.1.12.0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. linux-vdso.so.1 (0x00007ffd477f5000) libcbor.so.0.10 => /lib64/libcbor.so.0.10 (0x00007f34062dd000) libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007f3405e00000) libudev.so.1 => /lib64/libudev.so.1 (0x00007f34062af000) libhidapi-hidraw.so.0 => /lib64/libhidapi-hidraw.so.0 (0x00007f34062a6000) libz.so.1 => /lib64/libz.so.1 (0x00007f340628c000) libc.so.6 => /lib64/libc.so.6 (0x00007f3405c05000) /lib64/ld-linux-x86-64.so.2 (0x00007f3406336000) ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. > echo $? 0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ``` If `dracut-install` stops parsing the `ldd` output, the initrd will not contain all the required dependencies. Fixes issue dracutdevs#2241 (cherry picked from commit dracut-ng/dracut-ng@ace9e1b) bsc#1208690
…ded" When /etc/ld.so.preload contains a non-existing library, `ldd` prints the following output: ``` > ldd /usr/lib64/libfido2.so.1.12.0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. linux-vdso.so.1 (0x00007ffd477f5000) libcbor.so.0.10 => /lib64/libcbor.so.0.10 (0x00007f34062dd000) libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007f3405e00000) libudev.so.1 => /lib64/libudev.so.1 (0x00007f34062af000) libhidapi-hidraw.so.0 => /lib64/libhidapi-hidraw.so.0 (0x00007f34062a6000) libz.so.1 => /lib64/libz.so.1 (0x00007f340628c000) libc.so.6 => /lib64/libc.so.6 (0x00007f3405c05000) /lib64/ld-linux-x86-64.so.2 (0x00007f3406336000) ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. > echo $? 0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ``` If `dracut-install` stops parsing the `ldd` output, the initrd will not contain all the required dependencies. Fixes issue dracutdevs#2241 (cherry picked from commit dracut-ng/dracut-ng@ace9e1b) bsc#1208690
…ded" When /etc/ld.so.preload contains a non-existing library, `ldd` prints the following output: ``` > ldd /usr/lib64/libfido2.so.1.12.0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. linux-vdso.so.1 (0x00007ffd477f5000) libcbor.so.0.10 => /lib64/libcbor.so.0.10 (0x00007f34062dd000) libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007f3405e00000) libudev.so.1 => /lib64/libudev.so.1 (0x00007f34062af000) libhidapi-hidraw.so.0 => /lib64/libhidapi-hidraw.so.0 (0x00007f34062a6000) libz.so.1 => /lib64/libz.so.1 (0x00007f340628c000) libc.so.6 => /lib64/libc.so.6 (0x00007f3405c05000) /lib64/ld-linux-x86-64.so.2 (0x00007f3406336000) ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. > echo $? 0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ``` If `dracut-install` stops parsing the `ldd` output, the initrd will not contain all the required dependencies. Fixes issue dracutdevs#2241 (cherry picked from commit dracut-ng/dracut-ng@ace9e1b) bsc#1208690
…ded" When /etc/ld.so.preload contains a non-existing library, `ldd` prints the following output: ``` > ldd /usr/lib64/libfido2.so.1.12.0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. linux-vdso.so.1 (0x00007ffd477f5000) libcbor.so.0.10 => /lib64/libcbor.so.0.10 (0x00007f34062dd000) libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007f3405e00000) libudev.so.1 => /lib64/libudev.so.1 (0x00007f34062af000) libhidapi-hidraw.so.0 => /lib64/libhidapi-hidraw.so.0 (0x00007f34062a6000) libz.so.1 => /lib64/libz.so.1 (0x00007f340628c000) libc.so.6 => /lib64/libc.so.6 (0x00007f3405c05000) /lib64/ld-linux-x86-64.so.2 (0x00007f3406336000) ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. > echo $? 0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ``` If `dracut-install` stops parsing the `ldd` output, the initrd will not contain all the required dependencies. Fixes issue dracutdevs#2241 (cherry picked from commit dracut-ng/dracut-ng@ace9e1b) bsc#1208690
…ded" When /etc/ld.so.preload contains a non-existing library, `ldd` prints the following output: ``` > ldd /usr/lib64/libfido2.so.1.12.0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. linux-vdso.so.1 (0x00007ffd477f5000) libcbor.so.0.10 => /lib64/libcbor.so.0.10 (0x00007f34062dd000) libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007f3405e00000) libudev.so.1 => /lib64/libudev.so.1 (0x00007f34062af000) libhidapi-hidraw.so.0 => /lib64/libhidapi-hidraw.so.0 (0x00007f34062a6000) libz.so.1 => /lib64/libz.so.1 (0x00007f340628c000) libc.so.6 => /lib64/libc.so.6 (0x00007f3405c05000) /lib64/ld-linux-x86-64.so.2 (0x00007f3406336000) ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. > echo $? 0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ``` If `dracut-install` stops parsing the `ldd` output, the initrd will not contain all the required dependencies. Fixes issue dracutdevs#2241 (cherry picked from commit dracut-ng/dracut-ng@ace9e1b) bsc#1208690
…ded" When /etc/ld.so.preload contains a non-existing library, `ldd` prints the following output: ``` > ldd /usr/lib64/libfido2.so.1.12.0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. linux-vdso.so.1 (0x00007ffd477f5000) libcbor.so.0.10 => /lib64/libcbor.so.0.10 (0x00007f34062dd000) libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007f3405e00000) libudev.so.1 => /lib64/libudev.so.1 (0x00007f34062af000) libhidapi-hidraw.so.0 => /lib64/libhidapi-hidraw.so.0 (0x00007f34062a6000) libz.so.1 => /lib64/libz.so.1 (0x00007f340628c000) libc.so.6 => /lib64/libc.so.6 (0x00007f3405c05000) /lib64/ld-linux-x86-64.so.2 (0x00007f3406336000) ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. > echo $? 0 ERROR: ld.so: object '/usr/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. ``` If `dracut-install` stops parsing the `ldd` output, the initrd will not contain all the required dependencies. Fixes issue dracutdevs#2241 (cherry picked from commit dracut-ng/dracut-ng@ace9e1b) bsc#1208690
Describe the bug
If
/etc/ld.so.preload
contains a missing library, dracut does not add all the required libraries to the initrd.Distribution used
openSUSE Tumbleweed
Dracut version
dracut 059+suse.360.g2e0ed5f7-1.1
Init system
systemd
To Reproduce
Additional context
This issue is similar to the one fixed by #2193:
dracut/src/install/dracut-install.c
Lines 605 to 606 in 1ddcb13
If we replace that
break
with acontinue
,dracut-install
continues parsing theldd
output and the missing libraries are included to the initrd.This code was added in 4916dfc2, is there any reason why dracut should not continue parsing the
ldd
output?CC: @dtardon
The text was updated successfully, but these errors were encountered: