Summary: | app-emulation/crun-0.18 with app-emulation/podman-3.0.1 and app-emulation/buildah-1.19.6 - /usr/bin/crun: symbol lookup error: /usr/lib64/libcrun.so.0: undefined symbol: seccomp_init | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dennis Schridde <dschridde+gentoobugs> |
Component: | Current packages | Assignee: | robertgzr <robert> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gyakovlev, jeffrey, jstein, proxy-maint, sam, sebasmagri |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/containers/crun/issues/711 | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=737460 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | env file for crun-0.19.1 |
Description
Dennis Schridde
2020-04-16 19:49:58 UTC
I was able to use dev-util/patchelf to workaround the issue: ❯ sudo patchelf --add-needed libseccomp.so.2 /usr/lib64/libcrun.so.0.0.0 ❯ scanelf -n /usr/lib64/libcrun.so.0 TYPE NEEDED FILE ET_DYN libseccomp.so.2,libc.so.6 /usr/lib64/libcrun.so.0 But I run into the next error: cannot configure rootless cgroup using the cgroupfs manager\n/usr/bin/crun: symbol lookup error: /usr/lib64/libcrun.so.0: undefined symbol: cap_from_name\nsync socket closed: OCI runtime error This can also be worked around: ❯ readelf -s /usr/lib64/libcap.so.2 | rg cap_from_name 45: 00000000000047c0 43 FUNC GLOBAL DEFAULT 11 cap_from_name ❯ sudo patchelf --add-needed libcap.so.2 /usr/lib64/libcrun.so.0.0.0 ❯ scanelf -n /usr/lib64/libcrun.so.0 TYPE NEEDED FILE ET_DYN libcap.so.2,libseccomp.so.2,libc.so.6 /usr/lib64/libcrun.so.0 Now podman-compose appears to work. More fun: /usr/bin/crun: symbol lookup error: /usr/lib64/libcrun.so.0: undefined symbol: sd_bus_default\n{\"msg\":\"sync socket closed\",\"level\":\"error\",\"time\":\"2020-04-16T20:14:10.000071856Z\"}: OCI runtime error Worked around in the same manner: ❯ readelf -s /usr/lib64/libsystemd.so.0.28.0 | rg sd_bus_default 494: 00000000000450b0 41 FUNC GLOBAL DEFAULT 11 sd_bus_default_user@@LIBSYSTEMD_221 580: 0000000000048980 101 FUNC GLOBAL DEFAULT 11 sd_bus_default_flush_clos@@LIBSYSTEMD_227 635: 0000000000045080 41 FUNC GLOBAL DEFAULT 11 sd_bus_default_system@@LIBSYSTEMD_221 663: 00000000000450e0 84 FUNC GLOBAL DEFAULT 11 sd_bus_default@@LIBSYSTEMD_221 ❯ sudo patchelf --add-needed libsystemd.so.0 /usr/lib64/libcrun.so.0.0.0 ❯ scanelf -n /usr/lib64/libcrun.so.0 TYPE NEEDED FILE ET_DYN libsystemd.so.0,libcap.so.2,libseccomp.so.2,libc.so.6 /usr/lib64/libcrun.so.0 The issue persists in version 0.13 (local overlay, cf. https://bugs.gentoo.org/709982). The issue persists in 0.14.1: ❯ scanelf -n /usr/lib64/libcrun.so.0 TYPE NEEDED FILE ET_DYN libc.so.6 /usr/lib64/libcrun.so.0 ❯ readelf -s /usr/lib64/libcrun.so.0 | rg seccomp 177: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND seccomp_export_bpf 178: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND seccomp_rule_add 179: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND seccomp_rule_add_array 180: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND seccomp_release 181: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND seccomp_syscall_resolve_n 182: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND seccomp_arch_add 183: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND seccomp_arch_resolve_name 184: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND seccomp_init Bug #737460 appears to be a similar issue of underlinking. Should we reassign this bug to maintainer-needed? Reproducible also using `buildah run ...`: ++ buildah from docker.io/circleci/php@sha256:92168b0092945ca4dee27564292996cd0f19e3fdedea6b75e83e367eaede598b + php_ct=php-working-container-1 + buildah copy php-working-container-1 ./composer.json /app/ de2935457610cfd2bd673ec5d916c2ba5d256b04e13311cde3e3cdbc162cf564 + buildah copy php-working-container-1 ./composer.lock /app/ 44c4883a8ebfab560dc23e6a04b8847e5f3da16de95951ad4f6bc68ee246d19e + buildah copy php-working-container-1 ./database /app/ 7826a941d5aade1ef26d94aad5434832b22363ccc396f33eada8c3f27140c697 + buildah run php-working-container-1 composer install --ignore-platform-reqs --no-interaction --no-plugins --no-scripts --prefer-dist /usr/bin/crun: symbol lookup error: /usr/lib64/libcrun.so.0: undefined symbol: seccomp_init 2020-08-30T10:26:31.000687192Z: sync socket closed error running container: error creating container for [/usr/local/bin/composer install --ignore-platform-reqs --no-interaction --no-plugins --no-scripts --prefer-dist]: : exit status 127 error while running runtime: exit status 1 ERRO exit status 1 When running `buildah run --runtime-flag=systemd ...` I get: ``` /usr/bin/crun: symbol lookup error: /usr/lib64/libcrun.so.0: undefined symbol: sd_bus_default_user ``` Workaround: ❯ sudo patchelf --add-needed libcap.so.2 /usr/lib64/libcrun.so.0.0.0 ❯ sudo patchelf --add-needed libseccomp.so.2 /usr/lib64/libcrun.so.0.0.0 ❯ sudo patchelf --add-needed libsystemd.so.0 /usr/lib64/libcrun.so.0.0.0 Persists with app-emulation/crun-0.15 and app-emulation/libpod-2.2.1. Also reproducible by just running `podman run -ti image /bin/sh`. Persists with app-emulation/crun-0.18 and app-emulation/podman-3.0.1. Can confirm this is still an issue on app-emulation/crun-0.19.1 and app-emulation/podman-3.2.1 libcrun_la_LDFLAGS target in Makefile.am seems to be missing $(FOUND_LIBS) adding following phase to ebuild seems to be linking properly: src_prepare() { default sed -i 's@^libcrun_la_LIBADD.*@libcrun_la_LIBADD = libocispec/libocispec.la $(maybe_libyajl.la) $(FOUND_LIBS)@' Makefile.am || die eautoreconf } can someone test it? It works for me. *** Bug 737460 has been marked as a duplicate of this bug. *** Created attachment 728256 [details]
env file for crun-0.19.1
temporary workaround:
you can place attached file to
/etc/portage/env/app-emulation/crun-0.19.1 (as file, not as directory)
and re-emerge crun, without editing ebuild, it will apply a fix.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bebd123a64235046ab73bb3fed35cb0973fd1857 commit bebd123a64235046ab73bb3fed35cb0973fd1857 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2021-08-04 09:35:16 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2021-08-04 09:36:43 +0000 app-emulation/crun: drop 0.18 Closes: https://bugs.gentoo.org/717750 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> app-emulation/crun/Manifest | 1 - app-emulation/crun/crun-0.18.ebuild | 61 ------------------------------------- 2 files changed, 62 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ea780e78b89e07a1c6a50ec069d3cfb68e23a63 commit 1ea780e78b89e07a1c6a50ec069d3cfb68e23a63 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2021-08-04 09:34:33 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2021-08-04 09:36:42 +0000 app-emulation/crun: revbump, fix libcrun underlinking. Bug: https://bugs.gentoo.org/717750 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> .../{crun-0.19.1.ebuild => crun-0.19.1-r1.ebuild} | 9 +++++++ app-emulation/crun/files/libcrun-linkage.patch | 29 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) |