networkmanager crashes on configuring wireguard connection via nm-connection-editor

Bug #2044014 reported by Sebastian Werner
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

when configuring a new wireguard connection both via nm-connection-editor and the settings app, NetworkManager crashes and restarts, with the error message "Message recipient disconnected from message bus without replying".
Currently, I'm unable to add wireguard connections at all.
Also, I have netplan.io/now 0.107-5ubuntu1~ppa3 installed to outrule https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2039821

Ubuntu 23.10
network-manager/mantic-updates,now 1.44.2-1ubuntu1.2 amd64
netplan.io/now 0.107-5ubuntu1~ppa3

ProblemType: Bug
DistroRelease: Ubuntu 23.10
Package: network-manager 1.44.2-1ubuntu1.2
ProcVersionSignature: Ubuntu 6.5.0-10.10-generic 6.5.3
Uname: Linux 6.5.0-10-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.27.0-0ubuntu5
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Mon Nov 20 20:10:40 2023
IfupdownConfig:
 # interfaces(5) file used by ifup(8) and ifdown(8)
 auto lo
 iface lo inet loopback
InstallationDate: Installed on 2018-05-15 (2015 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
IpRoute:
 default via <retracted> dev enp0s31f6 proto dhcp src <retracted> metric 100
 <retracted>/24 dev enp0s31f6 proto kernel scope link src <retracted> metric 100
 169.254.0.0/16 dev enp0s31f6 scope link metric 1000
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=false
 WWANEnabled=false
ProcEnviron:
 LANG=de_DE.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
SourcePackage: network-manager
UpgradeStatus: Upgraded to mantic on 2023-11-05 (15 days ago)
http_proxy: http://<retracted>:3128
nmcli-nm:
 RUNNING VERSION STATE STARTUP CONNECTIVITY NETWORKING WIFI-HW WIFI WWAN-HW WWAN
 running 1.44.2 connected started full enabled enabled disabled missing disabled
no_proxy: 127.0.0.1,172.16.0.0/12,10.0.0.0/8,192.168.0.0/16,<retracted>

Revision history for this message
Sebastian Werner (bastolino) wrote :
description: updated
Revision history for this message
Sebastian Werner (bastolino) wrote :

(had to remove a lot of auto-uploaded files due to privacy)
relevant loglines from syslog attached.

Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

Hi Sebastian, thanks for your bug report.

I can see the following error in your syslog.log:

<error> [1700508393.5530] BUG: the profile cannot be stored in keyfile format without becoming unusable: invalid connection: ipv4.dns: This property is not allowed for "method=disabled"

What steps did you follow to setup the connection? I want to understand how you managed to set the ipv4.dns property with ipv4.method set to disabled using the GUI interface.

May I ask you to watch the Network Manager's journal while you reproduce the crash and add the relevant part of the logs here?

journalctl -u NetworkManager.service -f

Also, you will probably find a YAML in /etc/netplan that was created for the problematic connection. Can you find it, remove all the keys and IPs from it, and paste it here?

I'm running netplan.io 0.107-5ubuntu0.1 and I can create Wireguard connections just fine. But maybe you are using some settings that's triggering another bug that we are not aware of.

Thank you.

Changed in network-manager (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Sebastian Werner (bastolino) wrote :

Hello Danilo,
yes I am aware of that; actually I can't tell from where this is set as actually I did not set any dns configuration. Please see attached log and screenshots.
Yes, a netplan file has been created. I just retracted all the sensible information. Quotes and double quotes were set correctly, have just been "overwritten" by my retraction.
If you need any further logs just give me a hint how I can create them.
Thanks a lot!

Revision history for this message
Sebastian Werner (bastolino) wrote :
Revision history for this message
Sebastian Werner (bastolino) wrote :
Revision history for this message
Sebastian Werner (bastolino) wrote :
Revision history for this message
Sebastian Werner (bastolino) wrote :
Revision history for this message
Sebastian Werner (bastolino) wrote :
Revision history for this message
Sebastian Werner (bastolino) wrote :

actually, it doesn't matter if any dns setting is set or left empty => the message stays the same.

Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

Hi,

I can't find anything wrong in your configuration. And that makes me wonder if you have another YAML with the same wg0 interface in it. We recently fixed a bug in Network Manager that was leading to duplication in the configuration. You might have been affected by this bug when you upgraded to Mantic.

If you grep /etc/netplan by the interface name, do you see more than one file? Something like this "sudo grep wg0 /etc/netplan/*". If you find the same interface in more than one file, try to remove them and create the connection again using the GUI. The problem might be that you have multiple YAMLs with the same interface. Netplan will merge them in a single configuration and the result might be a broken config.

Let me know if it helps.

Thanks!

Revision history for this message
Sebastian Werner (bastolino) wrote :

Hello Danilo,

sorry for the late reply - yes, there are more than one connections with wg0. But this should not be an issue as long as only one connection is enabled at a time.
Yes, it's very likely that I was hit by this bug. Do you think it's a good idea to remove all the wireguard-config-files from /etc/netplan and recreate them?

Is it possible to use wg0 multiple times then?

Thank you!

Revision history for this message
Sebastian Werner (bastolino) wrote :

I just did remove all the wireguard connections and recreated them. Actually I found out that as long as I keep counting up on the wgX, everything works smooth. But whenever I reuse a wg, it messes it all up and nm is dying.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.