emerge --info app-editors/nano Portage 3.0.63 (python 3.12.3-final-0, server, gcc-13, glibc-2.39-r6, 6.6.30-gentoo-dist-hardened x86_64) ================================================================= System Settings ================================================================= System uname: Linux-6.6.30-gentoo-dist-hardened-x86_64-Intel-R-_Core-TM-_i7-4910MQ_CPU_@_2.90GHz-with-glibc2.39 KiB Mem: 16252700 total, 2404588 free KiB Swap: 31456252 total, 30944224 free Timestamp of repository gentoo: Wed, 12 Jun 2024 07:06:16 +0000 Head commit of repository gentoo: f86a645fe26b917ab06cea1ba877ac1ff95ff2e4 Head commit of repository jonesmz-public-overlay: 066d1e1e163c084a3adcf356497258bc6f02e9f7 Head commit of repository lto-overlay: a46a5749ee6e70bcf2317f9d6e24037779b643a8 Head commit of repository mv: bef5d18bbd57e801c74d62fd2890298b0fcb3fe6 Head commit of repository wsdd: 9c546e56ca51a7f6575e04f5fd9a2ca33758f9f4 Head commit of repository steam-overlay: fc142da83eb4eb440c787e9f1befe5945b09f485 sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.42 p3) 2.42.0 ccache version 4.9.1 [disabled] app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.71-r7::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 3.28.5::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.4.0-r1::gentoo dev-lang/perl: 5.38.2-r3::gentoo dev-lang/python: 3.11.9-r1::gentoo, 3.12.3-r1::gentoo dev-lang/rust: 1.77.1::gentoo dev-util/ccache: 4.9.1-r1::gentoo sys-apps/baselayout: 2.15::gentoo sys-apps/sandbox: 2.38::gentoo sys-apps/systemd: 255.7::gentoo sys-devel/binutils: 2.42-r1::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 17.0.6::gentoo sys-devel/gcc: 13.2.1_p20240210::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/llvm: 17.0.6::gentoo sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.39-r6::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: git://anongit.gentoo.org/repo/sync/gentoo.git priority: -1000 volatile: False jonesmz-public-overlay location: /var/db/repos/jonesmz-public-overlay sync-type: git sync-uri: https://github.com/jonesmz/gentoo-overlay.git masters: gentoo volatile: False lto-overlay location: /var/db/repos/lto-overlay sync-type: git sync-uri: https://github.com/InBetweenNames/gentooLTO.git masters: gentoo mv volatile: False mv location: /var/db/repos/mv sync-type: git sync-uri: https://anongit.gentoo.org/git/user/mv.git masters: gentoo volatile: False wsdd location: /var/db/repos/wsdd-gentoo sync-type: git sync-uri: https://github.com/christgau/wsdd-gentoo masters: gentoo volatile: False steam-overlay location: /var/db/repos/steam-overlay sync-type: git sync-uri: https://github.com/anyc/steam-overlay.git masters: gentoo priority: 50 volatile: False Installed sets: @archive, @desktop-applications, @lxqt, @network-manager, @pc-base-system, @portage ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=auto -fuse-linker-plugin -march=core2 -mtune=generic -mpopcnt" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=auto -fuse-linker-plugin -march=core2 -mtune=generic -mpopcnt -O2 -pipe" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS=" --jobs --keep-going --newrepo --newuse --changed-use --changed-deps --changed-slot --deep --tree --unordered-display --backtrack=3000 --complete-graph --with-bdeps=y --rebuild-if-new-rev --rebuild-if-new-ver --rebuild-if-unbuilt --rebuilt-binaries --binpkg-respect-use=y --binpkg-changed-deps=y --usepkg=y --buildpkg-exclude='virtual/*' --buildpkg-exclude='sys-kernel/*' --buildpkg-exclude='*/*-bin' --buildpkg-exclude='acct-user/*' --buildpkg-exclude='acct-group/*' --buildpkg-exclude='app-alternatives/*' --buildpkg-exclude='dev-perl/*' --usepkg-exclude='virtual/*' --usepkg-exclude='sys-kernel/*' --usepkg-exclude='*/*-bin' --usepkg-exclude='acct-user/*' --usepkg-exclude='acct-group/*' --usepkg-exclude='app-alternatives/*' --usepkg-exclude='dev-perl/*'" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live clean-logs compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles installsources ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-elog split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" INSTALL_MASK="/etc/init.d/* /etc/cron.*/* /usr/share/doc/*/Changelog* /usr/share/doc/*/*/Changelog* /usr/share/doc/*/AUTHORS* /usr/share/doc/*/*/AUTHORS*" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" LEX="flex" LINGUAS="en en_US" MAKEOPTS="-j10" PKGDIR="/var/cache/binpkgs" PORTAGE_COMPRESS="zstd" PORTAGE_COMPRESS_FLAGS="-15" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet crypt dbus dri dts dvd dvdr encode exif flac gdbm gif gnome-keyring gpm gstreamer gtk gui hardened iconv icu ipv6 jpeg lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls ogg opengl openmp pam pango pcre pdf pic pie png policykit ppds pulseaudio qt5 readline sdl seccomp sound spell ssl ssp startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb vaapi vorbis vulkan wifi wxwidgets x264 xattr xcb xft xml xtpax xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 mmxext sse sse3 lm cmov cx8 fpu fxsr mmx syscall sse2 cx16 lahf_lm popcnt ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="AArch64 AMDGPU BPF WebAssembly X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" QEMU_SOFTMMU_TARGETS="aarch64 x86_64" QEMU_USER_TARGETS="aarch64 x86_64" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="vesa modesetting intel i965 crocus amdgpu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS ================================================================= Package Settings ================================================================= app-editors/nano-8.0::gentoo was built with the following: USE="ncurses nls spell static (unicode) -debug -justify -magic -minimal" ABI_X86="(64)" CFLAGS="-O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=auto -fuse-linker-plugin -march=core2 -mtune=generic -mpopcnt -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" CXXFLAGS="-O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=auto -fuse-linker-plugin -march=core2 -mtune=generic -mpopcnt -O2 -pipe -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=auto -fuse-linker-plugin -march=core2 -mtune=generic -mpopcnt -O2 -pipe -static" Reproducible: Always
Please provide a backtrace.
(gdb) bt #0 0x00007ffff7fcdfd5 in _nss_winbind_getpwuid_r () from /usr/lib64/libnss_winbind.so.2 #1 0x00000000004c2a97 in getpwuid_r () #2 0x00000000004c28c7 in getpwuid () #3 0x000000000042b0dd in get_homedir () at /usr/src/debug/app-editors/nano-8.0/nano-8.0/src/utils.c:42 #4 get_homedir () at /usr/src/debug/app-editors/nano-8.0/nano-8.0/src/utils.c:33 #5 0x0000000000404d9e in do_rcfiles () at /usr/src/debug/app-editors/nano-8.0/nano-8.0/src/rcfile.c:1740 #6 main (argc=1, argv=0x7fffffffdb88) at /usr/src/debug/app-editors/nano-8.0/nano-8.0/src/nano.c:2173
with some variables expanded (gdb) bt #0 0x00007f0c03111401 in read () from /usr/lib64/libc.so.6 #1 0x00007f0c03386c88 in read (__nbytes=1, __buf=0x7ffd7251f35f, __fd=<optimized out>) at /usr/include/bits/unistd.h:28 #2 fifo_push (sp=0x55d5a51b6430) at /usr/src/debug/sys-libs/ncurses-6.4_p20240414/ncurses-6.4/ncurses/base/lib_getch.c:340 #3 kgetch (forever=<optimized out>, sp=<optimized out>) at /usr/src/debug/sys-libs/ncurses-6.4_p20240414/ncurses-6.4/ncurses/base/lib_getch.c:732 #4 _nc_wgetch (win=0x55d5a5415d30, result=<optimized out>, use_meta=<optimized out>) at /usr/src/debug/sys-libs/ncurses-6.4_p20240414/ncurses-6.4/ncurses/base/lib_getch.c:563 #5 0x00007f0c033880db in wgetch (win=0x55d5a5415d30) at /usr/src/debug/sys-libs/ncurses-6.4_p20240414/ncurses-6.4/ncurses/base/lib_getch.c:693 #6 0x000055d5a498aaeb in ?? () #7 0x000055d5a498b18c in ?? () #8 0x000055d5a4976f50 in ?? () #9 0x000055d5a495f423 in ?? () #10 0x00007f0c03026190 in ?? () from /usr/lib64/libc.so.6 #11 0x00007f0c03026249 in __libc_start_main () from /usr/lib64/libc.so.6 #12 0x000055d5a4960175 in ?? ()
With samba recompiled with `-g`. gdb /usr/bin/nano -iex 'set pagination off' -iex 'set print thread-events off' -iex 'set python print-stack full' -iex 'set print static-members off' -iex 'set- max-value-size 100000' -iex 'set print object on' -iex 'set print pretty on' -ex 'r' -ex 'bt' GNU gdb (Gentoo 14.2 vanilla) 14.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://bugs.gentoo.org/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Undefined command: "set-". Try "help". Reading symbols from /usr/bin/nano... Starting program: /usr/bin/nano warning: File "/usr/lib64/libthread_db.so.1" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /usr/lib64/libthread_db.so.1 line to your configuration file "/home/jonesmz/.config/gdb/gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/jonesmz/.config/gdb/gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7fcdfd5 in _nss_winbind_getpwuid_r (uid=0, result=0x5a8600 <resbuf>, buffer=<optimized out>, buflen=<optimized out>, errnop=0x5aa3b0) at ../../nsswitch/winbind_nss_linux.c:517 517 if (!keep_response || uid != response.data.pw.pw_uid) { #0 0x00007ffff7fcdfd5 in _nss_winbind_getpwuid_r (uid=0, result=0x5a8600 <resbuf>, buffer=<optimized out>, buflen=<optimized out>, errnop=0x5aa3b0) at ../../nsswitch/winbind_nss_linux.c:517 #1 0x00000000004c2a97 in getpwuid_r () #2 0x00000000004c28c7 in getpwuid () #3 0x000000000042b0dd in get_homedir () at /usr/src/debug/app-editors/nano-8.0/nano-8.0/src/utils.c:42 #4 get_homedir () at /usr/src/debug/app-editors/nano-8.0/nano-8.0/src/utils.c:33 #5 0x0000000000404d9e in do_rcfiles () at /usr/src/debug/app-editors/nano-8.0/nano-8.0/src/rcfile.c:1740 #6 main (argc=1, argv=0x7fffffffdb88) at /usr/src/debug/app-editors/nano-8.0/nano-8.0/src/nano.c:2173
NSS + static linking are known to not get on. I'm not sure we can do anything about this (and I suspect Samba can't either).
It looks like this is segfaulting when _nss_winbind_getpwuid_r attempts to access variables declared as "static __thread". In other words, it attempts to access thread-local storage and then segfaults. I don't know exactly why that would fail, but it seems obscure enough to not be surprising.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=540f78ba328d2fc58acff4abf22eb803178e6027 commit 540f78ba328d2fc58acff4abf22eb803178e6027 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2024-06-13 19:49:40 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2024-06-13 19:49:40 +0000 app-editors/nano: drop IUSE=static nano calls getpwuid (NSS), which can be problematic in static binaries. Bug: https://bugs.gentoo.org/934128 Signed-off-by: Mike Gilbert <floppym@gentoo.org> app-editors/nano/nano-8.0.ebuild | 16 +++++----------- app-editors/nano/nano-9999.ebuild | 16 +++++----------- 2 files changed, 10 insertions(+), 22 deletions(-)