From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id A0F416322; Sun, 09 Nov 2025 13:07:24 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 1E48162DF; Sun, 09 Nov 2025 13:07:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) by atuin.qyliss.net (Postfix) with ESMTPS id 64C9C6300 for ; Sun, 09 Nov 2025 13:07:18 +0000 (UTC) Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id A2D03140010F; Sun, 9 Nov 2025 08:07:15 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Sun, 09 Nov 2025 08:07:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1762693635; x=1762780035; bh=gt2sCxQ8/q zKI1trMs2msrNrJkUXeacLX3NGDPXH1Z8=; b=WXApEliIEPCJ0he3tBJObYxzPS UcNgSIkozHStnAZqx59ubeL6L5aICAbk/U+bpIH1GN1cNBGE1u8R8vCDxou/nMP/ 3Nw35/yLQoMKdeJ9sZC7EKSdRb5DB0zMdNWW6/Q1/msU43T/8T9BxOjmByQ0yywL +wR0g4rQjns3yPNSqdF26FvpB51ILM2/yFBoVkU4EQ3eXzp0sV3WoSNNXumvv397 A1Jk8yyQ/JFVUj8w5WK9I1lJzEETdd5S34lKowysWBtlN1GOVGrFJRwCnpX1b1g/ n3LNAFTY82uZESO1QLXOMc4EmqAJE1zR9nCX6K6a6rwU4t2+FZztakY19t3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1762693635; x=1762780035; bh=gt2sCxQ8/qzKI1trMs2msrNrJkUXeacLX3N GDPXH1Z8=; b=jHmQypijx4E5U1H4x5kq3te6zCzdSQFBjJPmSOFowysdPBs06cZ kAV+Ked/DtfCHYlzfGmQdlivGcrOBAeHYtc4okfwQYTT2ucUWXsPE/u5Z/r01I9Y LcHpuB1NW5ZLp4g7ffX+VZzpPZ95wCyDkdkYac2nJHcjUW6++UnoO+5UakENhuWk 8NTEXndg6pMdbU0V/M5Jn3NOh9myoScMIcPubPV9/+inUX9KTIJcxoFeaqGHS4AZ CPJPonN6Oo/B7ZqPBQ7lNrWYnh85WVbW8vFG+QSA43NKKs1KgCHmUK7VMeVnEt08 7KmAqwhh0ggbj3godBzP8s0PTtWhykeiPZg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduleehhedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffffkgggtsehgtderredttddtnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeetueeuie eltddvgfehheeufeduueefgeetffetiedvgeeuueekhfdvhfeuhfffueenucffohhmrghi nheplhhisgdrihhnpdhgihhthhhusgdrtghomhdpuggvsghirghnrdhorhhgpdhvuhiguh drohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehhihesrghlhihsshgrrdhishdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtph houhhtpdhrtghpthhtohephihurhgvkhgrsegthigsvghrtghhrghoshdruggvvhdprhgt phhtthhopeguvghmihhosggvnhhouhhrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepug gvvhgvlhesshhpvggtthhruhhmqdhoshdrohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 9 Nov 2025 08:07:14 -0500 (EST) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 195DA6918FEB; Sun, 09 Nov 2025 14:07:13 +0100 (CET) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH v6 2/2] host/rootfs: Switch to systemd-udevd In-Reply-To: References: <20251107-udev-v6-0-176246281424@gmail.com> <20251107-udev-v6-2-176246281424@gmail.com> <87seeonw3a.fsf@alyssa.is> <87ecq8tddi.fsf@alyssa.is> <87bjlctbml.fsf@alyssa.is> <878qggtalv.fsf@alyssa.is> <02da1b19-008a-4f49-b9bb-ec1c2a2f5e1d@gmail.com> <875xbkt9wr.fsf@alyssa.is> Date: Sun, 09 Nov 2025 14:07:11 +0100 Message-ID: <87wm3z2w3k.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: GFWJPBV5B6FTCO34WCCNRZ35RWQVXI6N X-Message-ID-Hash: GFWJPBV5B6FTCO34WCCNRZ35RWQVXI6N X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Spectrum OS Development , Yureka Lilian X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > On 11/8/25 17:52, Alyssa Ross wrote: >> Demi Marie Obenour writes: >>=20 >>> On 11/8/25 17:37, Alyssa Ross wrote: >>>> Demi Marie Obenour writes: >>>> >>>>> On 11/8/25 17:14, Alyssa Ross wrote: >>>>>> Alyssa Ross writes: >>>>>> >>>>>>> Demi Marie Obenour writes: >>>>>>> >>>>>>>> On 11/8/25 14:49, Alyssa Ross wrote: >>>>>>>>> Demi Marie Obenour writes: >>>>>>>>> >>>>>>>>>> @@ -113,14 +76,15 @@ let >>>>>>>>>>=20=20 >>>>>>>>>> kernel =3D linux_latest; >>>>>>>>>>=20=20 >>>>>>>>>> - appvm =3D callSpectrumPackage ../../img/app { inherit (foot) = terminfo; }; >>>>>>>>>> - netvm =3D callSpectrumPackage ../../vm/sys/net { inherit (foo= t) terminfo; }; >>>>>>>>>> + appvm =3D callSpectrumPackage ../../img/app { inherit (no_pgo= _foot) terminfo; }; >>>>>>>>>> + netvm =3D callSpectrumPackage ../../vm/sys/net { inherit (no_= pgo_foot) terminfo; }; >>>>>>>>>>=20=20 >>>>>>>>>> # Packages that should be fully linked into /usr, >>>>>>>>>> # (not just their bin/* files). >>>>>>>>>> usrPackages =3D [ >>>>>>>>>> - appvm kernel.modules firmware netvm >>>>>>>>>> - ] ++ (with pkgsGui; [ mesa dejavu_fonts westonLite ]); >>>>>>>>>> + appvm kernel.modules firmware kmod kmod.lib >>>>>>>>>> + netvm mesa dejavu_fonts westonLite >>>>>>>>>> + ]; >>>>>>>>>>=20=20 >>>>>>>>>> appvms =3D { >>>>>>>>>> appvm-firefox =3D callSpectrumPackage ../../vm/app/firefox.= nix {}; >>>>>>>>> >>>>>>>>> So based on what we'd discussed previously, I was ready to just a= pply >>>>>>>>> this and pare down the Nix changes myself since I don't have to w= orry >>>>>>>>> about rebuilds, etc., but in doing so I came across this. Do you= know >>>>>>>>> why kmod.lib is required? Is something impurely dlopening it? S= eems >>>>>>>>> very strange, but I did verify that it's required for Weston to s= tart. >>>>>>>> >>>>>>>> systemd uses dlopen heavily. This allows dependencies to be optio= nal >>>>>>>> at runtime. I remember strace showing that systemd-udevd dlopen's >>>>>>>> kmod.lib. In short, your diagnosis is correct. >>>>>>> >>>>>>> Okay, that's a packaging bug in Nixpkgs then. (See e.g. [1].) I'l= l see >>>>>>> what can be done. >>>>>>> >>>>>>> [1]: https://github.com/NixOS/nixpkgs/commit/2328731ad041735a226069= 8574ce6599591f33ad >>>>>> >>>>>> I have looked into it a bit and am now even more confused. From wha= t I >>>>>> can see, loading libkmod should be done by libsystemd-shared.so, whi= ch >>>>>> has kmod.lib in its RUNPATH. >>>>> >>>>> According to https://wiki.debian.org/RpathIssue, only the RUNPATH of >>>>> the executable is honored. The RUNPATH of libraries is not honored. >>>>> For this to work, libsystemd-shared.so needs to have kmod.lib in its >>>>> RPATH, and udevadm *may* need to not have a RUNPATH. >>>> >>>> Right, so we might need to add --force-rpath to the patchelf invocatio= n. >>>> >>>> I wonder why this doesn't affect every NixOS system, though. They >>>> certainly don't have /usr/lib/libkmod.so.2. >>> >>> Difference between musl and glibc is the first thing that comes to mind. >>=20 >> Was my first thought too, but people (including Yureka, who can maybe >> confirm) have run musl NixOS systems, and I've never heard of this >> problem with them. > > I did the following tests: > > 1. Move kmod and kmod.libs from usrPackages to packages. Module > loading breaks. > > 2. Switch from pkgsGui.systemd (musl) to pkgs.systemd (glibc). > Module loading works again. > > My conclusion is that this problem is specific to musl. > > Would it be okay to merge this with the workaround, and revert it > later when it is no longer needed? You're correct. I asked in #exotic:nixos.org if anybody has encountered anything like this, and I was linked to a musl patch for this very issue[1]. So given there's already been an upstream fixed proposed, I'm fine with adding it to the upstream bug tracking board and doing the workaround for now. [1]: https://inbox.vuxu.org/musl/20251017-dlopen-use-rpath-of-caller-dso-v1= -1-46c69eda1473@iscas.ac.cn/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaRCR/wAKCRBbRZGEIw/w oj4TAQDm/UFveo6M0GAs3ft//1imRWCNrhwI1f0WxazC5Z7IZgD/WesFc+Vm9H4L L5eHRo7tcMcNdWPwEo/bqQ5Yjd+pbw8= =hYfj -----END PGP SIGNATURE----- --=-=-=--