run command 'lsns -t net -T' crashed Reproducible: Always Steps to Reproduce: run lsns -t net -T
It works for me with sys-apps/util-linux-2.39.3-r1. * Please share the output. * What version of util-linux? * emerge --info please * Can you get a backtrace? (https://wiki.gentoo.org/wiki/Debugging#Per-package)
Created attachment 882218 [details] emerge --info
lsns -t net -T Ошибка сегментирования (образ памяти сброшен на диск) sys-apps/util-linux 2.39.3-r1 -abi_x86_32 +audit -build +caps +cramfs +cryptsetup -fdformat +hardlink +kill +logger +magic +ncurses +nls +pam +python +python_targets_python3_10 +python_targets_python3_11 +readline +slang +static-libs +su +suid +systemd -test +tty-helpers +udev +verify-sig
Please get a back trace as requested.
> Ошибка сегментирования (образ памяти сброшен на диск) This appears to be Russian for a segfault with core dump.
Process 2785081 (lsns) of user 0 dumped core. Module libcrypt.so.2 without build-id. Module libnss_systemd.so.2 without build-id. Module libcap.so.2 without build-id. Module libz.so.1 without build-id. Module libm.so.6 without build-id. Module libudev.so.1 without build-id. Module libjson-c.so.5 without build-id. Module libargon2.so.1 without build-id. Module libcrypto.so.3 without build-id. Module libssl.so.3 without build-id. Module libdevmapper.so.1.02 without build-id. Module libuuid.so.1 without build-id. Module libcryptsetup.so.12 without build-id. Module libblkid.so.1 without build-id. Module ld-linux-x86-64.so.2 without build-id. Module libc.so.6 without build-id. Module libmount.so.1 without build-id. Module libsmartcols.so.1 without build-id. Module lsns without build-id. Stack trace of thread 2785081: #0 0x00005579f40e8d21 interpolate_missing_namespaces (lsns + 0x5d21) #1 0x00005579f40e8129 main (lsns + 0x5129) #2 0x00007fb72d4beeea __libc_start_call_main (libc.so.6 + 0x23eea) #3 0x00007fb72d4befa5 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x23fa5) #4 0x00005579f40e81c1 _start (lsns + 0x51c1) ELF object binary architecture: AMD x86-64 Starting program: /usr/bin/lsns -t net -T [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib64/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x0000555555559d21 in interpolate_missing_namespaces ()
Your gdb output seems incomplete. Please rebuild util-linux using the instructions provided at the link above.
gdb --args /usr/bin/lsns -t net -T Reading symbols from /usr/bin/lsns... (gdb) run Starting program: /usr/bin/lsns -t net -T [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib64/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x0000555555559d21 in snprintf (__fmt=0x5555555640d0 "/proc/%d/ns/%s", __n=8192, __s=0x7fffffffa9e0 "") at /usr/include/bits/stdio2.h:54 54 return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, (gdb)
Please type "bt".
(gdb) run Starting program: /usr/bin/lsns -t net -T [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib64/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x0000555555559d21 in snprintf (__fmt=0x5555555640d0 "/proc/%d/ns/%s", __n=8192, __s=0x7fffffffae20 "") at /usr/include/bits/stdio2.h:54 54 return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, (gdb) bt #0 0x0000555555559d21 in snprintf (__fmt=0x5555555640d0 "/proc/%d/ns/%s", __n=8192, __s=0x7fffffffae20 "") at /usr/include/bits/stdio2.h:54 #1 interpolate_missing_namespaces (ls=ls@entry=0x7fffffffcf00, orphan=<optimized out>, rela=rela@entry=1) at /usr/src/debug/sys-apps/util-linux-2.39.3-r1/util-linux-2.39.3/sys-utils/lsns.c:799 #2 0x0000555555559129 in read_related_namespaces (ls=0x7fffffffcf00) at /usr/src/debug/sys-apps/util-linux-2.39.3-r1/util-linux-2.39.3/sys-utils/lsns.c:869 #3 read_namespaces (ls=0x7fffffffcf00) at /usr/src/debug/sys-apps/util-linux-2.39.3-r1/util-linux-2.39.3/sys-utils/lsns.c:940 #4 main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/sys-apps/util-linux-2.39.3-r1/util-linux-2.39.3/sys-utils/lsns.c:1498 (gdb)
It looks like one of the pointer arguments for snprintf is pointed at some memory that isn't owned by the process. Someone would need to debug the process interactively to further diagnose the issue.