🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Bug#1149219: Probably a race condition

#4302
From: Mike Gabriel
Date: Thu, 12 Nov 2026 20:10
105 lines
6235 bytes
This message is in MIME format and has been PGP signed.

--=_engme2e_PPQzb0ygEdLBDr1
Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20=20
failures=20of 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=20=20
resolve=20group 'kvm': Unknown group
363s /usr/lib/tmpfiles.d/static-nodes-permissions.conf:19: Failed to=20=20
resolve=20group 'kvm': Unknown group
363s /usr/lib/tmpfiles.d/static-nodes-permissions.conf:20: Failed to=20=20
resolve=20group 'kvm': Unknown group
```

I would like to bring up some findings Roland Clobus and I had that=20=20
might=20be relevant.

TL;DR; does a package that uses the sysusers.d API of systemd need a=20=20
Pre-Depends:=20on libnss-systemd???

The failures we observed in CI (with debian-edu << 2.13.8, the current=20=
=20
version=20has 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

Boom! Should this be discussed with a broader audience???

Happy about feedback!
Mike
--=20

mike=20gabriel aka sunweaver (Debian Developer)
mobile: +49 (1520) 1976 148
landline: +49 (4351) 486 14 27

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: sunweaver@debian.org, http://sunweavers.net


--=_engme2e_PPQzb0ygEdLBDr1
Content-Type: application/pgp-signature
Content-Description: Digitale PGP-Signatur
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIzBAABCgAdFiEEm/uu6GwKpf+/IgeCmvRrMCV3GzEFAmr2HA0ACgkQmvRrMCV3
GzGD2Q//bsFiBpAByZ8rLCaQPR1MjRU+yNU0DSAnZBMZWzai/saUPpzl27rKewIO
Znah81gScFuz8/S0Sm7Cw8RKM1Hw7cm4uV3/SlPRr8vXhwzkTuAtZkYjwG1EIcO+
rA55cWZmyFN6jP/gKNHTGleemIBL0cRpovjohj7UTI/84VULmvbm2BGkT1ZntAh3
677C4gQ3cjvjvBB2Uqo4CKfM6meUa1BXSgxlaDkJFEqX1mbqam8ayEFfWVhoIWWp
oIDLea26jADrlhcjGxaEvNFJ1pNncUrCJ7n8xhJKxqKY1pxXRzPx0upp0dTJz56C
iDblviEPlCgcqF5RHosWTAEFFoIg9z5vzhWyYMaTcmnhMEfFRxjdQ/Iq2y80I328
BsCsO+qRve3RfvdE8ZKKTg9qZEK5TAINKOlLQTKgYYrKfkb3diOOz3/7lfPSbpLW
OAafSUJeCWFF/YheId7B1YxQIo3XEHed1J3HX3O4LuiPdzmZPBqs2SUoTCwocBuC
RzxWN8d35DvPz2s9TyjBmuJ+oSYU6+KZ7QNZMifymW5PNQjHDK+S+85l9rHEvW5Y
pGR0DrYs10Sx9hdpr4A8O644Dr6U7ZBst+ne6PBZdXxJj9c4xb0uwKDw6C3KzjJe
qcf5Y7JBfIMdcDXyxtlihFR/csVf2FdiB58xk+ZCvktJCCDEaIw=
=tdXi
-----END PGP SIGNATURE-----

--=_engme2e_PPQzb0ygEdLBDr1--
Technical Details
Message-ID: <NYJhn-buqP-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!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> <NIkwF-2jx7-13@gated-at.bofh.it> <NYFnr-bsbx-5@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Mike Gabriel <sunweaver@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1149219: Probably a race condition
Date: Thu, 12 Nov 2026 21:10:01 +0100
Message-ID: <NYJhn-buqP-1@gated-at.bofh.it>
References: <NIkwF-2jx7-13@gated-at.bofh.it> <NYFnr-bsbx-5@gated-at.bofh.it> <NIkwF-2jx7-13@gated-at.bofh.it> <NYFnr-bsbx-5@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Thu Nov 12 20:07:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.9
Reply-To: Mike Gabriel <sunweaver@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
User-Agent: Horde Application Framework 5
Accept-Language: de,en
Organization: DAS-NETZWERKTEAM
X-Originating-IP: 185.211.18.166
X-Remote-Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
 like Gecko) Chrome/156.0.0.0 Safari/537.36
Content-Type: multipart/signed; boundary="=_engme2e_PPQzb0ygEdLBDr1";
 protocol="application/pgp-signature"; micalg=pgp-sha512
MIME-Version: 1.0
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2002286
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 105
Sender: robomod@news.nic.it
X-Original-Cc: Chris Hofstädtler <zeha@debian.org>, elbrus@debian.org
X-Original-Date: Thu, 12 Nov 2026 20:05:35 +0000
X-Original-Message-ID: <20261112200535.Horde.5KbQXDXCwhhhtp30hGhRy6d@mail.das-netzwerkteam.de>
X-Original-References: <arp36PDju9UgFn1i@per.namespace.at> <f5ad1dcd-4af0-4036-836b-c46f0e4e24b8@rclobus.nl> <arp36PDju9UgFn1i@per.namespace.at> <f5ad1dcd-4af0-4036-836b-c46f0e4e24b8@rclobus.nl>