GNU bug report logs - #70165
D-Bus system service breaks reconfiguration when /var/run/dbus is present + /run and /var/run are on separate file systems.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Hilton Chain <hako@HIDDEN>; dated Wed, 3 Apr 2024 16:39:03 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 70165 <at> debbugs.gnu.org:


Received: (at 70165) by debbugs.gnu.org; 6 Apr 2024 06:43:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 06 02:43:47 2024
Received: from localhost ([127.0.0.1]:38049 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rszmD-0007YI-On
	for submit <at> debbugs.gnu.org; Sat, 06 Apr 2024 02:43:47 -0400
Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]:46107)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1rszmA-0007X8-Dp
 for 70165 <at> debbugs.gnu.org; Sat, 06 Apr 2024 02:43:44 -0400
Received: by mail-ej1-x643.google.com with SMTP id
 a640c23a62f3a-a46a7208eedso405572166b.0
 for <70165 <at> debbugs.gnu.org>; Fri, 05 Apr 2024 23:43:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1712385810; x=1712990610; darn=debbugs.gnu.org;
 h=mime-version:user-agent:content-transfer-encoding:references
 :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject
 :date:message-id:reply-to;
 bh=rXpm8eMfdCZXUAhSj9L1evdaKc3FPEwGT4ek8Eqm/BU=;
 b=axE21ktFTMw8xwKdBkOTb+gFypywPo1O3CzadAe2jDPYmgGogN1VkTPOAYZPv5rfPQ
 JVLZs4mq44hYKr0rzyrXeZ5XCOcnp9DY/feztjR6uGACaF0wY8uNbRgI2Ki5WHgEnKF1
 IS5NXSy1vlYvi719gHQMqBtPC9M4S7jI1187WlDAA/RnfLZju8qiRJ+Jq8vFNMZ6FYRH
 7zwe/aq/Ph81PtV0RkDR20iTf5+Ph7oSCqlSKLIJnG7nI6SReAXGvl0q+mSQUXScrrR6
 zQooIJy+zLtA1EEY0ig/cSD1XlXpUQL7dzBw155xrDrB87h3TAeswoK7ulhYOAqEgUme
 BqVA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1712385810; x=1712990610;
 h=mime-version:user-agent:content-transfer-encoding:references
 :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=rXpm8eMfdCZXUAhSj9L1evdaKc3FPEwGT4ek8Eqm/BU=;
 b=CLOiMvPI3WCDJXiAIBQVTlQInXGYJo/GPIKRswAZKePNL5zVraRCgpqnEgDCQmQuyg
 RhMYIOFHDHwpa3/giudPKALubhdubHvB1YqLFUczYuJEFSQ8X6ZNjNYE8c9u8CFEh/3S
 HiMb3th1zsrxwL0Uah0cJ/z5JgGOcfVY3HXZWMqtofcWC9f2i47CyjagP5/DBPKuXPEL
 86n/Lg3VmfALc5CTCJHjuBJ8MKSn+TYqpZo4rvRw4k5amAQIXu9XEJOyC8RYYxuPlUam
 a9rFCJU9Iy5Ylhd12cCs3pOl0pdkDnw26ectstZXTcFHAGuFWjF0IbVkkkElLecXJr1D
 5YFA==
X-Gm-Message-State: AOJu0YwwbumnsFISIzaUcVP1oVQFG9T6kR4R+fyDoZpcTuXztACoLOcp
 YKp5yoc607bTeTCA5QE5s3XZMcVQQWxO1KiTUakbCoryMeIttAOg
X-Google-Smtp-Source: AGHT+IG0oifyHgMyRhYUxKxkzD4lk++mHip4H8r18lDqEsew4iHy2CEjbOQKhjsbs3OBSHJK4Y12cQ==
X-Received: by 2002:a17:907:9443:b0:a51:b23c:1102 with SMTP id
 dl3-20020a170907944300b00a51b23c1102mr1343380ejc.14.1712385810258; 
 Fri, 05 Apr 2024 23:43:30 -0700 (PDT)
Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 dq2-20020a170907734200b00a51b8e8c8besm448882ejc.86.2024.04.05.23.43.29
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 05 Apr 2024 23:43:29 -0700 (PDT)
Message-ID: <359765bed179300f3ed4da2b3d1bf8032bb8bc7d.camel@HIDDEN>
Subject: Re: bug#70165: D-Bus system service breaks reconfiguration when
 /var/run/dbus is present + /run and /var/run are on separate file systems.
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
To: Hilton Chain <hako@HIDDEN>
Date: Sat, 06 Apr 2024 08:43:28 +0200
In-Reply-To: <8734s0wp62.wl-hako@HIDDEN>
References: <87frw2mmix.wl-hako@HIDDEN>
 <4420d6a7c4845c60cec8884066bf15b0d5b4c5fc.camel@HIDDEN>
 <8734s0wp62.wl-hako@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.48.4 
MIME-Version: 1.0
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70165
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
 Vivien Kraus <vivien@HIDDEN>, 70165 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Am Freitag, dem 05.04.2024 um 09:53 +0800 schrieb Hilton Chain:
> [H]ere's a reproducer:
>=20
> --8<---------------cut here---------------start------------->8---
> test_dir=3D"$(mktemp --directory)"
>=20
> sudo mount --type tmpfs none "$test_dir"
> touch "$test_dir/test"
>=20
> guile -c "(rename-file \"$test_dir/test\" \"/tmp/test\")"
>=20
> sudo umount "$test_dir"
> rmdir "$test_dir"
> --8<---------------cut here---------------end--------------->8---
>=20
> --8<---------------cut here---------------start------------->8---
> Backtrace:
> In ice-9/boot-9.scm:
> =C2=A0 1752:10=C2=A0 6 (with-exception-handler _ _ #:unwind? _ # _)
> In unknown file:
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 5 (apply-smo=
b/0 #<thunk 7061ede8c300>)
> In ice-9/boot-9.scm:
> =C2=A0=C2=A0=C2=A0 724:2=C2=A0 4 (call-with-prompt ("prompt") #<procedure=
 7061ede99320 =E2=80=A6>
> =E2=80=A6)
> In ice-9/eval.scm:
> =C2=A0=C2=A0=C2=A0 619:8=C2=A0 3 (_ #(#(#<directory (guile-user) 7061ede8=
fc80>)))
> In ice-9/command-line.scm:
> =C2=A0=C2=A0 185:19=C2=A0 2 (_ #<input: string 7061ede89850>)
> In unknown file:
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1 (eval (ren=
ame-file "/tmp/tmp.9wyzRfQ28l/test" "/tmp/=E2=80=A6")
> #)
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0 (rename-fi=
le "/tmp/tmp.9wyzRfQ28l/test" "/tmp/test")
>=20
> ERROR: In procedure rename-file:
> In procedure rename-file: Invalid cross-device link
> --8<---------------cut here---------------end--------------->8---
If I understand this reproducer correctly, there aren't even symbolic
links involved, are there?

Adding Ludo to CC, because this looks like a Guile bug to me.

Cheers




Information forwarded to bug-guix@HIDDEN:
bug#70165; Package guix. Full text available.

Message received at 70165 <at> debbugs.gnu.org:


Received: (at 70165) by debbugs.gnu.org; 5 Apr 2024 01:54:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 04 21:54:19 2024
Received: from localhost ([127.0.0.1]:35023 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rsYmY-0001V9-J5
	for submit <at> debbugs.gnu.org; Thu, 04 Apr 2024 21:54:19 -0400
Received: from mail.boiledscript.com ([144.168.59.46]:34928)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hako@HIDDEN>) id 1rsYmS-0001UI-T6
 for 70165 <at> debbugs.gnu.org; Thu, 04 Apr 2024 21:54:16 -0400
Date: Fri, 05 Apr 2024 09:53:25 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=dkim; t=1712281954;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=zAnTaF9ReignyxR2l9TxNeahg+53q2SWOc5kkrbCrUc=;
 b=ubJxAd60eTVZIJOf2KM9dwKRwe7ur9Kn/Vj+Wn5Ub/vNYoheS8ygPTphIgXwNlVvP++AVi
 svmvZS/Tydix18a7agMY6zaNlSWx5gQMKhYlFPGTtw9cj/bMIGsIyrd5wDX/XWHSu82dPs
 rvkx8yF+fq5XEyyzdEMETVWZvtDFdMEdXlwB8RC19yQGew67NBv/7JHbPhxKsNkATHY1lh
 yO+fsvP/KHeVDCZJUAx+vyXPl7qh8BUskncxswbUlkLN40NVVvZf49+Ojd8IMSJ7nt/yff
 W7VWm+siCWMUeDT/dooKU9Gz83yKE2a2K7ow81TQtxoW0RKbZVlpeiE2m3R3yw==
Authentication-Results: mail.boiledscript.com;
 auth=pass smtp.mailfrom=hako@HIDDEN
Message-ID: <8734s0wp62.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Subject: Re: bug#70165: D-Bus system service breaks reconfiguration when
 /var/run/dbus is present + /run and /var/run are on separate file systems.
In-Reply-To: <4420d6a7c4845c60cec8884066bf15b0d5b4c5fc.camel@HIDDEN>
References: <87frw2mmix.wl-hako@HIDDEN>	<4420d6a7c4845c60cec8884066bf15b0d5b4c5fc.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spamd-Bar: --
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70165
Cc: Vivien Kraus <vivien@HIDDEN>, 70165 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Fri, 05 Apr 2024 02:52:09 +0800,
Liliana Marie Prikler wrote:
>
> Am Donnerstag, dem 04.04.2024 um 00:36 +0800 schrieb Hilton Chain:
> > Hi,
> >
> > I have /var/run and /run on separate file systems, recently I noticed
> > system reconfiguration stopped with "guix system: error: rename-file:
> > Invalid cross-device link":
> >
> > --8<---------------cut here---------------start------------->8---
> > newfstatat(AT_FDCWD, "/run", {st_mode=3DS_IFDIR|0755, st_size=3D440,
> > ...}, AT_SYMLINK_NOFOLLOW) =3D 0
> > newfstatat(AT_FDCWD, "/run/dbus", {st_mode=3DS_IFDIR|0700, st_size=3D40,
> > ...}, AT_SYMLINK_NOFOLLOW) =3D 0
> > mkdir("/run", 0777)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D -=
1 EEXIST (File exists)
> > mkdir("/run/dbus", 0777)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D -1 EEXIST (File exists)
> > chown("/run/dbus", 988, 983)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0
> > chmod("/run/dbus", 0755)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0
> > symlink("/run/dbus", "/var/run/dbus")=C2=A0=C2=A0 =3D -1 EEXIST (File e=
xists)
> > readlink("/var/run/dbus", 0x1634730, 100) =3D -1 EINVAL (Invalid
> > argument)
> > openat(AT_FDCWD, "/var/run/dbus",
> > O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) =3D 17
> > newfstatat(17, "", {st_mode=3DS_IFDIR|0755, st_size=3D80, ...},
> > AT_EMPTY_PATH) =3D 0
> > getdents64(17, 0x16dfe10 /* 4 entries */, 32768) =3D 112
> > rename("/var/run/dbus/system_bus_socket",
> > "/run/dbus/system_bus_socket") =3D -1 EXDEV (Invalid cross-device link)
> > close(13)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0
> > write(2, "\33[1m\33[0mguix system: error: rena"..., 67=1B[1m=1B[0mguix
> > system: error: rename-file: Invalid cross-device link
> > ) =3D 67
> > exit_group(1)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 =3D ?
> > +++ exited with 1 +++
> > --8<---------------cut here---------------end--------------->8---
> >
> > It's because /var/run/dbus was used for dbus service before, and now
> > migration to /run/dbus is done with =E2=80=98rename-file=E2=80=99:
> >
> > --8<---------------cut here---------------start------------->8---
> > (rename-file (string-append "/var/run/dbus/" next)
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 (string-append "/run/dbus/" next))
> > --8<---------------cut here---------------end--------------->8---
> >
> > I think the logic can be improved for this case, but not sure how at
> > the moment.
> > What do you think?
> Is there a *good* reason to have those be separate file systems? :D
> What does the FHS say?
>
> Anyhow, cross-fs symlinks and rename-file ought to work assuming that
> both file-systems are already mounted.  Is one of them not needed for
> boot?

Specifically, I'm using tmpfs for them:

--8<---------------cut here---------------start------------->8---
(file-system
  (type "tmpfs")
  (mount-point "/run")
  (device "tmpfs")
  (flags '(no-dev strict-atime))
  (options "mode=3D0755,nr_inodes=3D800k,size=3D20%")
  (needed-for-boot? #t)
  (check? #f))

(file-system
  (type "tmpfs")
  (mount-point "/var/run")
  (device "tmpfs")
  (flags '(no-suid no-dev strict-atime))
  (options "mode=3D0755,nr_inodes=3D800k,size=3D20%")
  (needed-for-boot? #t)
  (check? #f))
--8<---------------cut here---------------end--------------->8---


And here's a reproducer:

--8<---------------cut here---------------start------------->8---
test_dir=3D"$(mktemp --directory)"

sudo mount --type tmpfs none "$test_dir"
touch "$test_dir/test"

guile -c "(rename-file \"$test_dir/test\" \"/tmp/test\")"

sudo umount "$test_dir"
rmdir "$test_dir"
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
Backtrace:
In ice-9/boot-9.scm:
  1752:10  6 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
           5 (apply-smob/0 #<thunk 7061ede8c300>)
In ice-9/boot-9.scm:
    724:2  4 (call-with-prompt ("prompt") #<procedure 7061ede99320 =E2=80=
=A6> =E2=80=A6)
In ice-9/eval.scm:
    619:8  3 (_ #(#(#<directory (guile-user) 7061ede8fc80>)))
In ice-9/command-line.scm:
   185:19  2 (_ #<input: string 7061ede89850>)
In unknown file:
           1 (eval (rename-file "/tmp/tmp.9wyzRfQ28l/test" "/tmp/=E2=80=A6"=
) #)
           0 (rename-file "/tmp/tmp.9wyzRfQ28l/test" "/tmp/test")

ERROR: In procedure rename-file:
In procedure rename-file: Invalid cross-device link
--8<---------------cut here---------------end--------------->8---




Information forwarded to bug-guix@HIDDEN:
bug#70165; Package guix. Full text available.

Message received at 70165 <at> debbugs.gnu.org:


Received: (at 70165) by debbugs.gnu.org; 4 Apr 2024 18:52:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 04 14:52:27 2024
Received: from localhost ([127.0.0.1]:34713 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rsSCI-0008Ol-Rp
	for submit <at> debbugs.gnu.org; Thu, 04 Apr 2024 14:52:27 -0400
Received: from mail-ua1-x944.google.com ([2607:f8b0:4864:20::944]:44368)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1rsSCF-0008No-HF
 for 70165 <at> debbugs.gnu.org; Thu, 04 Apr 2024 14:52:25 -0400
Received: by mail-ua1-x944.google.com with SMTP id
 a1e0cc1a2514c-7e406a195f9so317657241.1
 for <70165 <at> debbugs.gnu.org>; Thu, 04 Apr 2024 11:52:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1712256732; x=1712861532; darn=debbugs.gnu.org;
 h=mime-version:user-agent:content-transfer-encoding:references
 :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject
 :date:message-id:reply-to;
 bh=MeQY2j7QvttnuIZd3sG/strSVdHXA7Cjr+VhGqYmPMc=;
 b=NKnrkvkB+uAeua5ejEMnBqWDIJlw9nZ37G7Zsw+BsU1imMm1lvpUeR7LbiXhkMTCs2
 SHXlXgZk8nHDYIOpg3Eg8ZcJUbkRRykRZh0SCF6uMEoBxn7x9UgjY+Og1FYh/sMKPAsL
 xWRCH2ZnvCuf9rawPhDksa3gYvM59t810x3oBPZySXLsLu9FsISIZUdyRb3phqPvCcJc
 AHlpLLR3kwt3+JY2x5JcPNARQ61hk/n3ahkoay8vBV6uKU/JmWvrB2TNmcd6wEKq98mM
 k/1oGPQUDgr+t2pdth0Boqo6YNofly4h/maAHDMyKpg5HVWABW25ZQgBHLodX9iI5g5C
 cuAw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1712256732; x=1712861532;
 h=mime-version:user-agent:content-transfer-encoding:references
 :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=MeQY2j7QvttnuIZd3sG/strSVdHXA7Cjr+VhGqYmPMc=;
 b=fr6NMYvJFRgELq8sTrbaybHHM4jk+IPUPoIHjyy3c32+lCOo6PYb+oxx3Uethr7jXB
 HWE0JBxx8Z6T79qVrSL38JwWGRBDdUQU3ISAxktyMUs9/0eTldxoK18bJFVBrkLFrnC2
 jN/KAF0eCKLVuEePbNN1eiwJLr/+J6dRvUocWzzsP/rAuP9sbrB3U44ID01xL1oP08v9
 cxm6paXkD5Tnj0+CV9uBaJZ+TAOhf6cqGQ7Hoq/BLyZ2XnNHX37DZvZOkWlcdUFP3c6t
 VfZdW3qNzrLviVAr2esLU4QxD/TT1dS6JbQCapPEBIILY8ql5/gQA5T25acl8iGziXSY
 Te0A==
X-Forwarded-Encrypted: i=1;
 AJvYcCWcJceiwgGiO6RtVk2ba3FqSFlaz0icAZfn9DCG5fNlbJwxaN2ungdwtVbfKvrH9L6HjAlepyKodNVmwv6v3by7JU2mLgk=
X-Gm-Message-State: AOJu0YwkIfg6qAHZYurW34jYilr6oDRS5mhuxFijq5VSEZcsoxBLrZjQ
 CcXLpjeUn/Z1iYYSKLKutLLyCbLUB/lrkUPC5fPn272sW5NXrihL
X-Google-Smtp-Source: AGHT+IHJpMulqKQac/aIJR8z23/c98XxBSRpTzarIDeVnhwWZ+0iOv0UML/Ay09ncjMZTsd8XYVdeg==
X-Received: by 2002:a67:fb93:0:b0:476:121:ff28 with SMTP id
 n19-20020a67fb93000000b004760121ff28mr2996168vsr.33.1712256732535; 
 Thu, 04 Apr 2024 11:52:12 -0700 (PDT)
Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 t25-20020a67ad19000000b00476e73a1243sm6918vsl.16.2024.04.04.11.52.11
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 04 Apr 2024 11:52:12 -0700 (PDT)
Message-ID: <4420d6a7c4845c60cec8884066bf15b0d5b4c5fc.camel@HIDDEN>
Subject: Re: bug#70165: D-Bus system service breaks reconfiguration when
 /var/run/dbus is present + /run and /var/run are on separate file systems.
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
To: Hilton Chain <hako@HIDDEN>, 70165 <at> debbugs.gnu.org
Date: Thu, 04 Apr 2024 20:52:09 +0200
In-Reply-To: <87frw2mmix.wl-hako@HIDDEN>
References: <87frw2mmix.wl-hako@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.48.4 
MIME-Version: 1.0
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70165
Cc: Vivien Kraus <vivien@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Am Donnerstag, dem 04.04.2024 um 00:36 +0800 schrieb Hilton Chain:
> Hi,
>=20
> I have /var/run and /run on separate file systems, recently I noticed
> system reconfiguration stopped with "guix system: error: rename-file:
> Invalid cross-device link":
>=20
> --8<---------------cut here---------------start------------->8---
> newfstatat(AT_FDCWD, "/run", {st_mode=3DS_IFDIR|0755, st_size=3D440,
> ...}, AT_SYMLINK_NOFOLLOW) =3D 0
> newfstatat(AT_FDCWD, "/run/dbus", {st_mode=3DS_IFDIR|0700, st_size=3D40,
> ...}, AT_SYMLINK_NOFOLLOW) =3D 0
> mkdir("/run", 0777)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D -1 E=
EXIST (File exists)
> mkdir("/run/dbus", 0777)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D -1 EEXIST (File exists)
> chown("/run/dbus", 988, 983)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 =3D 0
> chmod("/run/dbus", 0755)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0
> symlink("/run/dbus", "/var/run/dbus")=C2=A0=C2=A0 =3D -1 EEXIST (File exi=
sts)
> readlink("/var/run/dbus", 0x1634730, 100) =3D -1 EINVAL (Invalid
> argument)
> openat(AT_FDCWD, "/var/run/dbus",
> O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) =3D 17
> newfstatat(17, "", {st_mode=3DS_IFDIR|0755, st_size=3D80, ...},
> AT_EMPTY_PATH) =3D 0
> getdents64(17, 0x16dfe10 /* 4 entries */, 32768) =3D 112
> rename("/var/run/dbus/system_bus_socket",
> "/run/dbus/system_bus_socket") =3D -1 EXDEV (Invalid cross-device link)
> close(13)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0
> write(2, "\33[1m\33[0mguix system: error: rena"..., 67=1B[1m=1B[0mguix
> system: error: rename-file: Invalid cross-device link
> ) =3D 67
> exit_group(1)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 =3D ?
> +++ exited with 1 +++
> --8<---------------cut here---------------end--------------->8---
>=20
> It's because /var/run/dbus was used for dbus service before, and now
> migration to /run/dbus is done with =E2=80=98rename-file=E2=80=99:
>=20
> --8<---------------cut here---------------start------------->8---
> (rename-file (string-append "/var/run/dbus/" next)
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
(string-append "/run/dbus/" next))
> --8<---------------cut here---------------end--------------->8---
>=20
> I think the logic can be improved for this case, but not sure how at
> the moment.
> What do you think?
Is there a *good* reason to have those be separate file systems? :D
What does the FHS say?

Anyhow, cross-fs symlinks and rename-file ought to work assuming that
both file-systems are already mounted.  Is one of them not needed for
boot?

Cheers




Information forwarded to bug-guix@HIDDEN:
bug#70165; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Apr 2024 16:38:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 03 12:38:08 2024
Received: from localhost ([127.0.0.1]:59395 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rs3cl-0002tK-ML
	for submit <at> debbugs.gnu.org; Wed, 03 Apr 2024 12:38:07 -0400
Received: from lists.gnu.org ([2001:470:142::17]:54416)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hako@HIDDEN>) id 1rs3ch-0002s3-If
 for submit <at> debbugs.gnu.org; Wed, 03 Apr 2024 12:38:05 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hako@HIDDEN>)
 id 1rs3cW-0006EG-GB
 for bug-guix@HIDDEN; Wed, 03 Apr 2024 12:37:52 -0400
Received: from mail.boiledscript.com ([144.168.59.46])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hako@HIDDEN>)
 id 1rs3cP-0000ab-LR
 for bug-guix@HIDDEN; Wed, 03 Apr 2024 12:37:51 -0400
Date: Thu, 04 Apr 2024 00:36:06 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=dkim; t=1712162173;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding;
 bh=bzoGZUDVpI9tYSCYVc0N4gHjkydAEcAYU+depu5a9VE=;
 b=OoP+IHDDcWY1t+wE/aG1ck8SLZLfPJnSGvCJasREaBwoEV5rstL/UNviiAAVgxmMbsjvck
 hy8dFOr5aPtPhtLNeOicGFb7aqm90H+G//3+XU2qGn8uTZP0cz0sNhmp9MNn7KMIxBtjm0
 VygAkl5hABXxnmP56h8xWN68i+6acJe4EdchiLWpXrpLpIOQkzHogYE9DeqcERUcGPzYzW
 L9eRn//B4/q7BFzFob/oBjaeCQBc3+aRGQ/+AUuFuMg0MWQVxqAvWTJJXxMgegTxIaBmgJ
 jsYsLryLLgZ9F+/wHDdlgxeiiUHpqUzTBVtyI3JdyEG/Y3zaiOVi56l3owNkhA==
Authentication-Results: mail.boiledscript.com;
 auth=pass smtp.mailfrom=hako@HIDDEN
Message-ID: <87frw2mmix.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: bug-guix@HIDDEN
X-Debbugs-Cc: Vivien Kraus <vivien@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>
Subject: D-Bus system service breaks reconfiguration when /var/run/dbus is
 present + /run and /var/run are on separate file systems.
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-7
Content-Transfer-Encoding: quoted-printable
X-Spamd-Bar: --
Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@HIDDEN;
 helo=mail.boiledscript.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi,

I have /var/run and /run on separate file systems, recently I noticed system
reconfiguration stopped with "guix system: error: rename-file: Invalid
cross-device link":

--8<---------------cut here---------------start------------->8---
newfstatat(AT_FDCWD, "/run", {st_mode=3DS_IFDIR|0755, st_size=3D440, ...}, =
AT_SYMLINK_NOFOLLOW) =3D 0
newfstatat(AT_FDCWD, "/run/dbus", {st_mode=3DS_IFDIR|0700, st_size=3D40, ..=
.}, AT_SYMLINK_NOFOLLOW) =3D 0
mkdir("/run", 0777)                     =3D -1 EEXIST (File exists)
mkdir("/run/dbus", 0777)                =3D -1 EEXIST (File exists)
chown("/run/dbus", 988, 983)            =3D 0
chmod("/run/dbus", 0755)                =3D 0
symlink("/run/dbus", "/var/run/dbus")   =3D -1 EEXIST (File exists)
readlink("/var/run/dbus", 0x1634730, 100) =3D -1 EINVAL (Invalid argument)
openat(AT_FDCWD, "/var/run/dbus", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY=
) =3D 17
newfstatat(17, "", {st_mode=3DS_IFDIR|0755, st_size=3D80, ...}, AT_EMPTY_PA=
TH) =3D 0
getdents64(17, 0x16dfe10 /* 4 entries */, 32768) =3D 112
rename("/var/run/dbus/system_bus_socket", "/run/dbus/system_bus_socket") =
=3D -1 EXDEV (Invalid cross-device link)
close(13)                               =3D 0
write(2, "\33[1m\33[0mguix system: error: rena"..., 67=1B[1m=1B[0mguix syst=
em: error: rename-file: Invalid cross-device link
) =3D 67
exit_group(1)                           =3D ?
+++ exited with 1 +++
--8<---------------cut here---------------end--------------->8---

It's because /var/run/dbus was used for dbus service before, and now migrat=
ion
to /run/dbus is done with =A1rename-file=A2:

--8<---------------cut here---------------start------------->8---
(rename-file (string-append "/var/run/dbus/" next)
             (string-append "/run/dbus/" next))
--8<---------------cut here---------------end--------------->8---

I think the logic can be improved for this case, but not sure how at the mo=
ment.
What do you think?

Thanks




Acknowledgement sent to Hilton Chain <hako@HIDDEN>:
New bug report received and forwarded. Copy sent to vivien@HIDDEN, liliana.prikler@HIDDEN, bug-guix@HIDDEN. Full text available.
Report forwarded to vivien@HIDDEN, liliana.prikler@HIDDEN, bug-guix@HIDDEN:
bug#70165; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 6 Apr 2024 06:45:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.