🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #4371

Bug#1149219: Probably a race condition

#4371
From: Chris Hofstaedtler
Date: Fri, 13 Nov 2026 12:30
69 lines
4671 bytes
* Mike Gabriel <sunweaver@debian.org> [261112 21:06]:
>Hi Chris, hi Elbrus, hi Roland,
>
>On  Do 12 Nov 2026 16:50:59 CET, Roland Clobus wrote:
>
>>[...]
>
>There has some discussion been going on due to testing migration 
>failures of src:pkg debian-edu package because of problems like:
>
>```
>363s Creating group 'kvm' with GID 982.
>363s Creating group 'render' with GID 981.
>363s /usr/lib/tmpfiles.d/static-nodes-permissions.conf:18: Failed to 
>resolve group 'kvm': Unknown group
>363s /usr/lib/tmpfiles.d/static-nodes-permissions.conf:19: Failed to 
>resolve group 'kvm': Unknown group
>363s /usr/lib/tmpfiles.d/static-nodes-permissions.conf:20: Failed to 
>resolve group 'kvm': Unknown group
>```
>
>I would like to bring up some findings Roland Clobus and I had that 
>might be relevant.
>
>TL;DR; does a package that uses the sysusers.d API of systemd need a 
>Pre-Depends: on libnss-systemd???

But sysusers doesn't use libnss-systemd...

>
>The failures we observed in CI (with debian-edu << 2.13.8, the current 
>version has another breakage):
>
>  - a postinst script of some package uses sysusers.d API from systemd to
>    create a system user or group
>  - and then later on in that postinst script, it tries to operate on that
>    user or group (normally a chown on some folder or file)
>  - we often then get an error message from that operation like the one
>    quoted above, because the user (or group) that just got created does
>    not yet exist on the system (or rather: it cannot yet be seen by the
>    system).
>
>A parallel observation we had is this:
>
>  - package X configures a new user/group via sysusers.d API from systemd
>  - package X want to use this user/group immediately (and fails)
>  - further down in the output of APT (Configuring <package>...), we can
>    see that libnss-systemd gets configured.
>  - libnss-systemd uses dh-nss and ships debian/libnss-systemd.nss. dh-nss
>    adds various #DEBHELPER# snippets to all (iirc) package scripts to
>    manage "systemd" nss provider info to the entries user, group, shadow,
>    gshadow in nsswitch.conf
>
>The problem now is:
>
>  - package X wants to operate on a user/group visible to the system
>    via libnss-systemd
>  - but: libnss-systemd is not yet configured (postinst)
>  - that means: "systemd" entries are not yet in /etc/nsswitch.conf for
>    user, group, shadow, gshadow when package X wants to use them
>  - which means: the user/group is still invisible when package X wants
>    to operate on them

I think these are unrelated problems, each of them deserves detailed 
debugging. 

Relatedly there is dh bug #1070473.

C
Technical Details
Message-ID: <NYYzM-bD4Q-11@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <NIkwF-2jx7-13@gated-at.bofh.it> <NYFnr-bsbx-5@gated-at.bofh.it> <NYJhn-buqP-1@gated-at.bofh.it> <NIkwF-2jx7-13@gated-at.bofh.it> <NYJhn-buqP-1@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Chris Hofstaedtler <zeha@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1149219: Probably a race condition
Date: Fri, 13 Nov 2026 13:30:02 +0100
Message-ID: <NYYzM-bD4Q-11@gated-at.bofh.it>
References: <NIkwF-2jx7-13@gated-at.bofh.it> <NYFnr-bsbx-5@gated-at.bofh.it> <NYJhn-buqP-1@gated-at.bofh.it> <NIkwF-2jx7-13@gated-at.bofh.it> <NYJhn-buqP-1@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Fri Nov 13 12:29:11 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.7
Reply-To: Chris Hofstaedtler <zeha@debian.org>, 1149219@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-edu@lists.debian.org
X-Debian-Pr-Message: followup 1149219
X-Debian-Pr-Package: debian-edu-config
X-Debian-Pr-Source: debian-edu-config
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline
X-Debian-User: zeha
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2002380
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 69
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: Roland Clobus <rclobus@rclobus.nl>, 1149219@bugs.debian.org, 
	elbrus@debian.org
X-Original-Date: Fri, 13 Nov 2026 13:27:02 +0100
X-Original-Message-ID: <avcBkMSFJMh7gQcB@zeha.at>
X-Original-References: <arp36PDju9UgFn1i@per.namespace.at> <f5ad1dcd-4af0-4036-836b-c46f0e4e24b8@rclobus.nl> <20261112200535.Horde.5KbQXDXCwhhhtp30hGhRy6d@mail.das-netzwerkteam.de> <arp36PDju9UgFn1i@per.namespace.at> <20261112200535.Horde.5KbQXDXCwhhhtp30hGhRy6d@mail.das-netzwerkteam.de>