Bug#989078: several SIGABRT in containers
Simon Richter
sjr at debian.org
Tue May 25 14:29:48 BST 2021
Package: systemd
Version: 241-7~deb10u7
Severity: important
Tags: upstream
Hi,
I have a Docker container where I compile FPGA images using the QuartusII
toolchain, but this fails with
realloc(): invalid pointer
Aborted
Investigating this, I got a backtrace from gdb:
#0 __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007f242ac38535 in __GI_abort () at abort.c:79
#2 0x00007f242ac8f508 in __libc_message (action=action at entry=do_abort, fmt=fmt at entry=0x7f242ad9a28d "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3 0x00007f242ac95c1a in malloc_printerr (str=str at entry=0x7f242ad98587 "realloc(): invalid pointer") at malloc.c:5341
#4 0x00007f242ac9ae4a in __GI___libc_realloc (oldmem=0x7f242583b378, bytes=9) at malloc.c:3166
#5 0x00007f24256afaf5 in strextend_with_separator (x=x at entry=0x7ffe16aeaba0, separator=0x0, separator=0x0) at ../src/basic/string-util.c:920
#6 0x00007f24256b3081 in chase_symlinks.constprop.36 (path=<optimized out>, ret=0x7ffe16aeac98, flags=0, original_root=0x0) at ../src/basic/fs-util.c:1009
#7 0x00007f24256b8c0c in device_set_syspath (device=0x19e5760, _syspath=_syspath at entry=0x7ffe16aead10 "/sys/bus/serio/devices/serio0", verify=verify at entry=true)
at ../src/libsystemd/sd-device/sd-device.c:148
#8 0x00007f24256b930a in sd_device_new_from_syspath (ret=ret at entry=0x7ffe16aeadd0, syspath=syspath at entry=0x7ffe16aead10 "/sys/bus/serio/devices/serio0")
at ../src/libsystemd/sd-device/sd-device.c:223
#9 0x00007f24256bf572 in enumerator_scan_dir_and_add_devices (enumerator=enumerator at entry=0x19e5690, basedir=basedir at entry=0x7f24256c77c8 "bus",
subdir1=subdir1 at entry=0x7f24257d014b "serio", subdir2=subdir2 at entry=0x7f24256c77ef "devices") at ../src/libsystemd/sd-device/device-enumerator.c:471
#10 0x00007f24256bf945 in enumerator_scan_dir (enumerator=enumerator at entry=0x19e5690, basedir=basedir at entry=0x7f24256c77c8 "bus", subdir=<optimized out>, subsystem=0x0)
at ../src/libsystemd/sd-device/device-enumerator.c:568
#11 0x00007f24256c221f in enumerator_scan_devices_all (enumerator=0x19e5690) at ../src/libsystemd/sd-device/device-enumerator.c:777
#12 device_enumerator_scan_devices (enumerator=0x19e5690) at ../src/libsystemd/sd-device/device-enumerator.c:844
#13 udev_enumerate_scan_devices (udev_enumerate=<optimized out>, udev_enumerate=<optimized out>) at ../src/libudev/libudev-enumerate.c:377
#14 0x00007f2430302f45 in ?? () from /opt/altera/20.1/quartus/linux64/libsys_cpt.so
I've tried to build a minimal test case, which succeeds:
#include <libudev.h>
int main(int argc, char **argv)
{
struct udev *u = udev_new();
struct udev_enumerate *e = udev_enumerate_new(u);
return udev_enumerate_scan_devices(e);
}
So, in order to get better debug information, I've tried to rebuild the
systemd package with debug information. For convenience, I did this inside
a container, and got several failing test cases. I then upgraded to the
version in sid to see if the problem had been solved in the meantime, but
building this package also failed:
324/598 udev-test SKIP 0.12s
351/598 test-engine FAIL 0.04s (killed by signal 6 SIGABRT)
351/598 test-engine FAIL 0.04s (killed by signal 6 SIGABRT)
357/598 test-boot-timestamps SKIP 0.04s
359/598 test-unit-name FAIL 0.05s (killed by signal 6 SIGABRT)
359/598 test-unit-name FAIL 0.05s (killed by signal 6 SIGABRT)
360/598 test-load-fragment FAIL 0.07s (killed by signal 6 SIGABRT)
360/598 test-load-fragment FAIL 0.07s (killed by signal 6 SIGABRT)
377/598 test-util FAIL 0.09s (killed by signal 6 SIGABRT)
377/598 test-util FAIL 0.09s (killed by signal 6 SIGABRT)
408/598 test-process-util FAIL 0.06s (killed by signal 6 SIGABRT)
408/598 test-process-util FAIL 0.06s (killed by signal 6 SIGABRT)
417/598 test-barrier SKIP 0.03s
419/598 test-namespace SKIP 0.03s
423/598 test-seccomp FAIL 0.04s (killed by signal 6 SIGABRT)
423/598 test-seccomp FAIL 0.04s (killed by signal 6 SIGABRT)
426/598 test-loop-block SKIP 0.04s
429/598 test-bpf-devices SKIP 0.02s
430/598 test-bpf-firewall SKIP 0.02s
431/598 test-watch-pid FAIL 0.03s (killed by signal 6 SIGABRT)
431/598 test-watch-pid FAIL 0.03s (killed by signal 6 SIGABRT)
462/598 test-cgroup-util FAIL 0.03s (killed by signal 6 SIGABRT)
462/598 test-cgroup-util FAIL 0.03s (killed by signal 6 SIGABRT)
470/598 test-path FAIL 0.02s (killed by signal 6 SIGABRT)
470/598 test-path FAIL 0.02s (killed by signal 6 SIGABRT)
471/598 test-execute FAIL 0.03s (killed by signal 6 SIGABRT)
471/598 test-execute FAIL 0.03s (killed by signal 6 SIGABRT)
475/598 test-sched-prio FAIL 0.03s (killed by signal 6 SIGABRT)
475/598 test-sched-prio FAIL 0.03s (killed by signal 6 SIGABRT)
489/598 test-sd-hwdb SKIP 0.02s
511/598 test-bus-marshal SKIP 0.03s
515/598 test-bus-chat SKIP 0.02s
516/598 test-bus-cleanup SKIP 0.02s
518/598 test-bus-track SKIP 0.02s
522/598 test-bus-gvariant SKIP 0.02s
523/598 test-bus-creds FAIL 0.02s (killed by signal 6 SIGABRT)
523/598 test-bus-creds FAIL 0.02s (killed by signal 6 SIGABRT)
524/598 test-bus-match SKIP 0.02s
529/598 test-login FAIL 0.02s (killed by signal 6 SIGABRT)
529/598 test-login FAIL 0.02s (killed by signal 6 SIGABRT)
533/598 test-sd-device-monitor FAIL 0.02s (killed by signal 6 SIGABRT)
533/598 test-sd-device-monitor FAIL 0.02s (killed by signal 6 SIGABRT)
This suggests that this is a deeper-seated issue within the systemd
codebase -- some assumption that doesn't hold inside a container.
To reproduce, build the Debian systemd package inside a docker container,
e.g. using
FROM debian:buster
RUN echo "deb-src http://deb.debian.org/debian/ buster main" >>/etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install build-essential
RUN apt-get -y build-dep systemd
RUN apt-get -y source systemd
RUN apt-get -y -b source systemd
To test the version in sid (which outputs the test summary), replace
"buster" by "sid" in the Dockerfile.
Simon
-- Package-specific info:
-- System Information:
Debian Release: 10.9
APT prefers stable
APT policy: (990, 'stable'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.19.0-16-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages systemd depends on:
ii adduser 3.118
ii libacl1 2.2.53-4
ii libapparmor1 2.13.2-10
ii libaudit1 1:2.8.4-3
ii libblkid1 2.33.1-0.1
ii libc6 2.31-11
ii libcap2 1:2.25-2
ii libcryptsetup12 2:2.1.0-5+deb10u2
ii libgcrypt20 1.8.4-5
ii libgnutls30 3.7.1-3
ii libgpg-error0 1.35-1
ii libidn11 1.33-2.2
ii libip4tc0 1.8.2-4
ii libkmod2 26-1
ii liblz4-1 1.8.3-1
ii liblzma5 5.2.4-1
ii libmount1 2.36.1-7
ii libpam0g 1.3.1-5
ii libseccomp2 2.5.1-1
ii libselinux1 3.1-3
ii libsystemd0 241-7~deb10u7
ii mount 2.33.1-0.1
ii util-linux 2.33.1-0.1
Versions of packages systemd recommends:
ii dbus 1.12.20-0+deb10u1
ii libpam-systemd 241-7~deb10u7
Versions of packages systemd suggests:
ii policykit-1 0.105-25
pn systemd-container <none>
Versions of packages systemd is related to:
pn dracut <none>
ii initramfs-tools 0.133+deb10u1
ii udev 241-7~deb10u7
-- Configuration Files:
/etc/systemd/logind.conf changed [not included]
-- no debconf information
More information about the Pkg-systemd-maintainers
mailing list