GNU bug report logs - #38524
'dhcp-client-service' crash when non-libre networking interface is present

Previous Next

Package: guix;

Reported by: Brice Waegeneire <brice <at> waegenei.re>

Date: Sun, 8 Dec 2019 09:00:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38524 in the body.
You can then email your comments to 38524 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#38524; Package guix. (Sun, 08 Dec 2019 09:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brice Waegeneire <brice <at> waegenei.re>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 08 Dec 2019 09:00:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: bug-guix <at> gnu.org
Subject: 'dhcp-client-service' crash when non-libre networking interface is
 present
Date: Sun, 08 Dec 2019 09:59:08 +0100
The 'dhcp-client-service' fail to start when a non-libre network 
interface (here 148f:3070) is plugged-in even though there is an libre 
networking interface (here 01:00.0) available.
Removing the non-libre networking interface from the system allow 
'dhcp-client-service' to start correctly on the libre networking 
interface.

I think the service shouldn't crash when there is an non-libre network 
interface connected, it should just skip it and maybe throw an error 
message. Allowing to specify the network interfaces on which 
'dhcp-client-service' should run can also somewhat resolve the issue.


#+begin_src sh
$ sudo herd start networking
[ 2758.305139] 1-3:1.0: Missing Free firmware (non-Free firmware loading 
is disabled)
[ 2758.395791] ieee80211 phy0: rt2x00lib_request_firmware: Error - 
Failed to request Firmware
herd: exception caught while executing 'start' on service 'networking':
In procedure set-network-interface-flags: set-network-interface-flags on 
wlp0s20f0u3: No such file or directory

$ ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast 
state DOWN group default qlen 1000
    link/ether 00:e0:4c:68:67:77 brd ff:ff:ff:ff:ff:ff
3: wlp0s20f0u3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN 
group default qlen 1000
    link/ether 00:c0:ca:77:05:e7 brd ff:ff:ff:ff:ff:ff

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 
Wireless Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core 
Processor Host Bridge/DRAM Registers (rev 02)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 
(rev 02)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / 
E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI 
Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP 
Thermal subsystem (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA 
Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root 
Port #3 (rev f1)
00:1e.0 Signal processing controller: Intel Corporation Sunrise Point-LP 
Serial IO UART Controller #0 (rev 21)
00:1e.4 SD Host controller: Intel Corporation Device 9d2b (rev 21)
00:1e.6 SD Host controller: Intel Corporation Sunrise Point-LP Secure 
Digital IO Controller (rev 21)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller 
(rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 
21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 
21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. 
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07)
#+end_src

#+begin_src scheme
(services
    (append
      (list (service openssh-service-type)
            (service dhcp-client-service-type))
      %base-services)))
#+end_src




Information forwarded to bug-guix <at> gnu.org:
bug#38524; Package guix. (Tue, 10 Dec 2019 17:12:02 GMT) Full text and rfc822 format available.

Message #8 received at 38524 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brice Waegeneire <brice <at> waegenei.re>
Cc: 38524 <at> debbugs.gnu.org
Subject: Re: bug#38524: 'dhcp-client-service' crash when non-libre networking
 interface is present
Date: Tue, 10 Dec 2019 18:11:41 +0100
Hi Brice,

Brice Waegeneire <brice <at> waegenei.re> skribis:

> The 'dhcp-client-service' fail to start when a non-libre network 
> interface (here 148f:3070) is plugged-in even though there is an libre 
> networking interface (here 01:00.0) available.
> Removing the non-libre networking interface from the system allow 
> 'dhcp-client-service' to start correctly on the libre networking 
> interface.

By “non-libre interface”, I guess you mean a network interface that
relies on non-free firmware, right?

> $ sudo herd start networking
> [ 2758.305139] 1-3:1.0: Missing Free firmware (non-Free firmware loading 
> is disabled)
> [ 2758.395791] ieee80211 phy0: rt2x00lib_request_firmware: Error - 
> Failed to request Firmware
> herd: exception caught while executing 'start' on service 'networking':

So here the problem is that Linux-libre fails to load the non-free
firmware.  Could you bring it up on the Linux-libre development mailing
list?

I believe Linux-libre aims to allow people who want it to use non-free
firmware—it just disables it by default.  Now, I’d encourage you to
consider using hardware that does not rely on non-free firmware.  :-)

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#38524; Package guix. (Tue, 10 Dec 2019 21:26:02 GMT) Full text and rfc822 format available.

Message #11 received at 38524 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 38524 <at> debbugs.gnu.org
Subject: Re: bug#38524: 'dhcp-client-service' crash when non-libre networking
 interface is present
Date: Tue, 10 Dec 2019 22:25:34 +0100
On 2019-12-10 18:11, Ludovic Courtès wrote:
> So here the problem is that Linux-libre fails to load the non-free
> firmware.  Could you bring it up on the Linux-libre development mailing
> list?
Doing some research on how linux-libre behave it seems normal that it
doesn't allow the loading of non-free firmware. So I think the issue is
on the Guix side; in dhcp-client-service stopping on an error and not
continuing to try other interface. If you don't think so what should I
bring up to the linux-libre mailing list?





Information forwarded to bug-guix <at> gnu.org:
bug#38524; Package guix. (Thu, 12 Dec 2019 13:08:01 GMT) Full text and rfc822 format available.

Message #14 received at 38524 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brice Waegeneire <brice <at> waegenei.re>
Cc: 38524 <at> debbugs.gnu.org
Subject: Re: bug#38524: 'dhcp-client-service' crash when non-libre networking
 interface is present
Date: Thu, 12 Dec 2019 14:07:40 +0100
Hello,

Brice Waegeneire <brice <at> waegenei.re> skribis:

> On 2019-12-10 18:11, Ludovic Courtès wrote:
>> So here the problem is that Linux-libre fails to load the non-free
>> firmware.  Could you bring it up on the Linux-libre development mailing
>> list?
> Doing some research on how linux-libre behave it seems normal that it
> doesn't allow the loading of non-free firmware.

It obviously doesn’t do it by default, but my understanding is that the
goal is to allow it (you could check with them).

> So I think the issue is on the Guix side; in dhcp-client-service
> stopping on an error and not continuing to try other interface. If you
> don't think so what should I bring up to the linux-libre mailing list?

‘dhcp-client-service’ passes the DHCP client the list of interfaces that
are “valid” (see gnu/services/networking.scm).  Could you find out why
yours is considered “valid” when it shouldn’t?

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#38524; Package guix. (Fri, 13 Dec 2019 21:57:01 GMT) Full text and rfc822 format available.

Message #17 received at 38524 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 38524 <at> debbugs.gnu.org
Subject: [PATCH] services: dhcp-client: Ignore interfaces that need non-free
Date: Fri, 13 Dec 2019 22:56:07 +0100
This patch allow dhcp-client-service to start even when an interface that
require non free-software is present; such device will be skipped.





Information forwarded to bug-guix <at> gnu.org:
bug#38524; Package guix. (Fri, 13 Dec 2019 21:57:02 GMT) Full text and rfc822 format available.

Message #20 received at 38524 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 38524 <at> debbugs.gnu.org
Subject: [PATCH] services: dhcp-client: Ignore interfaces that need non-free
 firmware.
Date: Fri, 13 Dec 2019 22:56:08 +0100
* gnu/services/networking.scm (dhcp-client-service-type): Filter interfaces
that need non-free firmware.
---
 gnu/services/networking.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 93d9b6a15e..7a57e33974 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -223,14 +223,14 @@ fe80::1%lo0 apps.facebook.com\n")
                  (define valid?
                    (lambda (interface)
                      (and (arp-network-interface? interface)
-                          (not (loopback-network-interface? interface)))))
+                          (not (loopback-network-interface? interface))
+                          ;; XXX: Make sure the interfaces are up so that
+                          ;; 'dhclient' can actually send/receive over them.
+                          (false-if-exception
+                           (set-network-interface-up interface)))))
                  (define ifaces
                    (filter valid? (all-network-interface-names)))
 
-                 ;; XXX: Make sure the interfaces are up so that 'dhclient' can
-                 ;; actually send/receive over them.
-                 (for-each set-network-interface-up ifaces)
-
                  (false-if-exception (delete-file #$pid-file))
                  (let ((pid (fork+exec-command
                              (cons* #$dhclient "-nw"
-- 
2.19.2





Information forwarded to bug-guix <at> gnu.org:
bug#38524; Package guix. (Sat, 14 Dec 2019 04:40:02 GMT) Full text and rfc822 format available.

Message #23 received at 38524 <at> debbugs.gnu.org (full text, mbox):

From: Brett Gilio <brettg <at> posteo.net>
To: Brice Waegeneire <brice <at> waegenei.re>
Cc: 38524 <at> debbugs.gnu.org
Subject: Re: bug#38524: [PATCH] services: dhcp-client: Ignore interfaces
 that need non-free firmware.
Date: Sat, 14 Dec 2019 04:39:33 +0000 (UTC)
This LGTM, though I'd add a comment noting this bug report or something so it is known why this behavior was adjusted.

Dec 13, 2019 3:57:14 PM Brice Waegeneire <brice <at> waegenei.re>:

> * gnu/services/networking.scm (dhcp-client-service-type): Filter interfaces
> that need non-free firmware.
> ---
> gnu/services/networking.scm | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
> index 93d9b6a15e..7a57e33974 100644
> --- a/gnu/services/networking.scm
> +++ b/gnu/services/networking.scm
> @@ -223,14 +223,14 @@ fe80::1%lo0 apps.facebook.com\n")
> (define valid?
> (lambda (interface)
> (and (arp-network-interface? interface)
> - (not (loopback-network-interface? interface)))))
> + (not (loopback-network-interface? interface))
> + ;; XXX: Make sure the interfaces are up so that
> + ;; 'dhclient' can actually send/receive over them.
> + (false-if-exception
> + (set-network-interface-up interface)))))
> (define ifaces
> (filter valid? (all-network-interface-names)))
> 
> - ;; XXX: Make sure the interfaces are up so that 'dhclient' can
> - ;; actually send/receive over them.
> - (for-each set-network-interface-up ifaces)
> -
> (false-if-exception (delete-file #$pid-file))
> (let ((pid (fork+exec-command
> (cons* #$dhclient "-nw"
> -- 
> 2.19.2
> 





Information forwarded to bug-guix <at> gnu.org:
bug#38524; Package guix. (Sat, 14 Dec 2019 07:24:01 GMT) Full text and rfc822 format available.

Message #26 received at 38524 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 38524 <at> debbugs.gnu.org
Subject: [PATCH v2] services: dhcp-client: Ignore interfaces that need
 non-free firmware.
Date: Sat, 14 Dec 2019 08:23:26 +0100
Fixes bug #38524 (see: https://bugs.gnu.org/38524).

* gnu/services/networking.scm (dhcp-client-service-type): Filter interfaces
that need non-free firmware.
---
This patch version contains a link to the issue as Brett asked.

 gnu/services/networking.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 93d9b6a15e..7a57e33974 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -223,14 +223,14 @@ fe80::1%lo0 apps.facebook.com\n")
                  (define valid?
                    (lambda (interface)
                      (and (arp-network-interface? interface)
-                          (not (loopback-network-interface? interface)))))
+                          (not (loopback-network-interface? interface))
+                          ;; XXX: Make sure the interfaces are up so that
+                          ;; 'dhclient' can actually send/receive over them.
+                          (false-if-exception
+                           (set-network-interface-up interface)))))
                  (define ifaces
                    (filter valid? (all-network-interface-names)))
 
-                 ;; XXX: Make sure the interfaces are up so that 'dhclient' can
-                 ;; actually send/receive over them.
-                 (for-each set-network-interface-up ifaces)
-
                  (false-if-exception (delete-file #$pid-file))
                  (let ((pid (fork+exec-command
                              (cons* #$dhclient "-nw"
-- 
2.19.2





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 29 Dec 2019 16:51:01 GMT) Full text and rfc822 format available.

Notification sent to Brice Waegeneire <brice <at> waegenei.re>:
bug acknowledged by developer. (Sun, 29 Dec 2019 16:51:01 GMT) Full text and rfc822 format available.

Message #31 received at 38524-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brice Waegeneire <brice <at> waegenei.re>
Cc: 38524-done <at> debbugs.gnu.org
Subject: Re: bug#38524: [PATCH v2] services: dhcp-client: Ignore interfaces
 that need non-free firmware.
Date: Sun, 29 Dec 2019 17:50:15 +0100
Hello Brice,

Brice Waegeneire <brice <at> waegenei.re> skribis:

> Fixes bug #38524 (see: https://bugs.gnu.org/38524).
>
> * gnu/services/networking.scm (dhcp-client-service-type): Filter interfaces
> that need non-free firmware.

I adjusted the commit log (I’m not applying it just because it helps
with non-free firmware but rather because it seems more accurate and
generally useful), and finally committed.

Thank you!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 27 Jan 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 84 days ago.

Previous Next


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