Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920331 - sys-apps/systemd-254.7: systemd-userdbd.service fails to start
Summary: sys-apps/systemd-254.7: systemd-userdbd.service fails to start
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL: https://forums.gentoo.org/viewtopic-p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-19 17:51 UTC by Pacho Ramos
Modified: 2024-01-12 18:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2023-12-19 17:51:24 UTC
I was quickly seeing that systemd-userdbd.service was failing at boot. The errors are:
# systemctl status systemd-userdbd.service 
× systemd-userdbd.service - User Database Manager
     Loaded: loaded (/usr/lib/systemd/system/systemd-userdbd.service; indirect; preset: disabled)
     Active: failed (Result: exit-code) since Tue 2023-12-19 18:45:05 CET; 2min 33s ago
TriggeredBy: × systemd-userdbd.socket
       Docs: man:systemd-userdbd.service(8)
    Process: 278 ExecStart=/usr/lib/systemd/systemd-userdbd (code=exited, status=226/NAMESPACE)
   Main PID: 278 (code=exited, status=226/NAMESPACE)
        CPU: 410us

dic 19 18:45:05 hp-isidro systemd[1]: Starting systemd-userdbd.service...
dic 19 18:45:05 hp-isidro (-userdbd)[278]: systemd-userdbd.service: Failed to set up mount namespacing: /run/systemd/mount-rootfs/dev: Read-only file system
dic 19 18:45:05 hp-isidro (-userdbd)[278]: systemd-userdbd.service: Failed at step NAMESPACE spawning /usr/lib/systemd/systemd-userdbd: Read-only file system
dic 19 18:45:05 hp-isidro systemd[1]: systemd-userdbd.service: Main process exited, code=exited, status=226/NAMESPACE
dic 19 18:45:05 hp-isidro systemd[1]: systemd-userdbd.service: Failed with result 'exit-code'.
dic 19 18:45:05 hp-isidro systemd[1]: Failed to start systemd-userdbd.service.
dic 19 18:45:05 hp-isidro systemd[1]: systemd-userdbd.service: Start request repeated too quickly.
dic 19 18:45:05 hp-isidro systemd[1]: systemd-userdbd.service: Failed with result 'exit-code'.
dic 19 18:45:05 hp-isidro systemd[1]: Failed to start systemd-userdbd.service.


The system looks to work fine even with the error :/

# emerge --info systemd
Portage 3.0.57 (python 3.11.6-final-0, default/linux/amd64/17.1/desktop/gnome/systemd/merged-usr, gcc-13, glibc-2.37-r7, 6.6.7-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.6.7-gentoo-x86_64-12th_Gen_Intel-R-_Core-TM-_i7-12700H-with-glibc2.37
KiB Mem:    16098388 total,  14010628 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Tue, 19 Dec 2023 10:00:01 +0000
Head commit of repository gentoo: 43dfb9b608739c9ff9e427b1595747c09a5d39ba
sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.41 p2) 2.41.0
ccache version 4.8.3 [enabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.11.6::gentoo, 3.12.1::gentoo
dev-lang/rust-bin:         1.71.1::gentoo
dev-util/ccache:           4.8.3::gentoo
dev-util/cmake:            3.27.7::gentoo
dev-util/meson:            1.2.3::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-apps/systemd:          254.5-r1::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.41-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo
sys-devel/gcc:             13.2.1_p20230826::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-max-age: 3

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -fno-stack-protector"
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="-O2 -pipe -march=native -fno-stack-protector"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n --autounmask-write --keep-going --autounmask=y --autounmask-keep-masks"
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 -march=native -fno-stack-protector"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native -fno-stack-protector"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="es_ES.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="es es_ES en en_US"
PKGDIR="/var/cache/binpkgs"
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="7z 7zip X a52 aac acl acpi alsa amd64 appindicator archive avahi bash-completion bluetooth branding btrfs bzip2 cairo ccache cdda cdr chrome chromecast cli colord crypt cups dbus djvu dri dts dvd dvdr ebook eds emoji encode ethernet evo excel exif fat ffmpeg firefox firmware flac fortran fuse games gdbm gdk-pixbuf gdm gif gimp gnome gnome-keyring gnome-online-accounts gnome-shell google googledrive gphoto2 gpm grammar graphics gstreamer gtk gui heif hfs hidpi html http humanities hwaccel ico icons iconv icu inkscape introspection ios ipod ipv6 irc iso jpeg keyring latex lcms libass libnotify libtirpc libvisual luatex lyx lz4 lzma lzo mad math matroska media mediaplayer mng mobi modemmanager mp3 mp4 mpeg ms mtp multilib music nautilus ncurses network network-cron networkmanager nls nptl ntfs ntp nvme offensive ogg opengl openmp openvpn p2p pam pango pcre pdf pdfimport png policykit postscript ppapi ppds pptx proprietary-codecs pstricks publishers pulseaudio qt5 rar raw rdp readline reiserfs scanner science sdl seccomp sendto sftp smp snmp sound spell spi squashfs ssh ssl startup-notification subtitles svg synaptics sysprof systemd tcpd test-rust tiff tkip tpm tracker truetype udev udisks uefi unicode upnp upnp-av upower usb vaapi visio vlc vnc vorbis vulkan wayland webp wep wifi wma wxwidgets x264 x265 xattr xcb xetex xfs xft xml xpm xps xv xvid xz youtube zeroconf zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" 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="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 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="es es-ES en en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="intel" 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, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

sys-apps/systemd-254.5-r1::gentoo was built with the following:
USE="acl dns-over-tls gcrypt http kmod lz4 lzma openssl pam pcre policykit resolvconf seccomp sysv-utils tpm zstd -apparmor -audit -boot -cgroup-hybrid -cryptsetup -curl -elfutils -fido2 -gnutls -homed -idn -importd -iptables -kernel-install -pkcs11 -pwquality -qrcode -secureboot (-selinux) (-split-usr) -test -ukify -vanilla -xkb" ABI_X86="32 (64) (-x32)" PYTHON_SINGLE_TARGET="python3_11 -python3_10 (-python3_12)"
FEATURES="userfetch binpkg-multi-instance xattr ipc-sandbox network-sandbox ebuild-locks binpkg-logs parallel-fetch qa-unresolved-soname-deps preserve-libs binpkg-docompress binpkg-dostrip split-log merge-sync protect-owned news sandbox multilib-strict config-protect-if-modified strict userpriv ccache unmerge-orphans usersync fixlafiles buildpkg-live pid-sandbox unmerge-logs distlocks usersandbox unknown-features-warn assume-digests sfperms"

Thanks
Comment 1 Pacho Ramos gentoo-dev 2023-12-19 17:53:49 UTC
if I restart the service it works fine, once the system is fully booted
Comment 2 Pacho Ramos gentoo-dev 2023-12-19 17:59:25 UTC
It seems a problem with kernel 6.6.7, if I boot with the older 6.1.38 it works fine

But I am not sure about which new option is causing this :/
Comment 3 Pacho Ramos gentoo-dev 2023-12-19 18:21:12 UTC
Latest working version is kernel 6.4.3... I didn't try 6.5 and I couldn't guess which newer option could involve some kind of hardening that could cause this issue
Comment 4 Pacho Ramos gentoo-dev 2023-12-19 18:38:19 UTC
The same with 254.7
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-20 10:46:01 UTC
Could you report it upstream please?
Comment 6 Pacho Ramos gentoo-dev 2023-12-20 20:20:48 UTC
(In reply to Sam James from comment #5)
> Could you report it upstream please?

Yep, I was waiting to see a bit the progress to not spam here too much. Finally they found the culprit, let's see if it can be included for 254.8 :D
Comment 7 Larry the Git Cow gentoo-dev 2023-12-24 11:58:29 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=795d72fab680fc06f338f4ab4db38ee10049ae1e

commit 795d72fab680fc06f338f4ab4db38ee10049ae1e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-12-24 11:48:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-24 11:56:30 +0000

    sys-apps/systemd: add 254.8
    
    Bug: https://bugs.gentoo.org/920331
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/systemd/Manifest                          |   1 +
 .../systemd/files/254-PrivateDevices-userdbd.patch | 242 ++++++++++
 sys-apps/systemd/systemd-254.8.ebuild              | 526 +++++++++++++++++++++
 3 files changed, 769 insertions(+)
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-24 11:58:49 UTC
Thanks for chasing it down!