nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed

Bug #1568560 reported by jean-christophe manciot
74
This bug affects 14 people
Affects Status Importance Assigned to Milestone
NetworkManager
New
Undecided
Unassigned
network-manager (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Hello,
On Ubuntu 15.10 4.2.0-35, with network-manager 1.0.4-0ubuntu5.3
My WiFi connection is very unstable and I have to often restart NetworkManager service (~ a dozen times every day...):

sudo systemctl -l status NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since dim. 2016-04-10 18:17:07 CEST; 2min 58s ago
 Main PID: 27832 (NetworkManager)
   Memory: 13.8M
      CPU: 1.729s
   CGroup: /system.slice/NetworkManager.service
           ├─ 2703 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/run/sendsigs.omit.d/network-manager.dnsmasq.pid --listen-address=127.0.1.1 --conf-file=/var/run/NetworkManager/dnsmasq.conf --cache-size=0 --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.d
           ├─27832 /usr/sbin/NetworkManager --no-daemon
           └─30448 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /run/sendsigs.omit.d/network-manager.dhclient-wlan0.pid -lf /var/lib/NetworkManager/dhclient-7ec429cb-9dde-4ea4-8eda-f259b66e38a7-wlan0.lease -cf /var/lib/NetworkManager/dhclient-wlan0.conf wlan0

avril 10 18:17:08 samsung-ubuntu NetworkManager[27832]: <info> keyfile: add connection in-memory (068de9b1-513a-46f0-b4be-93462d19f68b,"lxcbr0")
avril 10 18:17:08 samsung-ubuntu NetworkManager[27832]: <info> (lxcbr0): device state change: unmanaged -> unavailable (reason 'connection-assumed') [10 20 41]
avril 10 18:17:08 samsung-ubuntu NetworkManager[27832]: <info> (lxcbr0): device state change: unavailable -> disconnected (reason 'connection-assumed') [20 30 41]
avril 10 18:17:08 samsung-ubuntu NetworkManager[27832]: <info> (lxcbr0): Activation: starting connection 'lxcbr0' (068de9b1-513a-46f0-b4be-93462d19f68b)
avril 10 18:17:08 samsung-ubuntu NetworkManager[27832]: <info> (virbr1-nic): new Tun device (carrier: OFF, driver: 'tun', ifindex: 34)
avril 10 18:17:08 samsung-ubuntu NetworkManager[27832]: <info> (virbr1): bridge port virbr1-nic was attached
avril 10 18:17:08 samsung-ubuntu NetworkManager[27832]: <info> (virbr1-nic): enslaved to virbr1
avril 10 18:17:08 samsung-ubuntu NetworkManager[27832]: <info> (virbr0): new Bridge device (carrier: OFF, driver: 'bridge', ifindex: 29)
avril 10 18:17:08 samsung-ubuntu NetworkManager[27832]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
avril 10 18:17:08 samsung-ubuntu NetworkManager[27832]: <warn> failed to enumerate oFono devices: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files

Also, each time I restart my desktop, NetworkManager generates a crash report: cf. attached screenshots.
I have tried an Ubuntu VM with the same packages related to networking and the exact same releases (same repositories), the crash never happens; the difference appears to be only the type of network connection: WiFi for the desktop vs Ethernet for the VM.

Any suggestion?

Tags: xenial yakkety
Revision history for this message
jean-christophe manciot (manciot-jeanchristophe) wrote :
affects: ubuntu → network-manager
Revision history for this message
jean-christophe manciot (manciot-jeanchristophe) wrote :
Revision history for this message
jean-christophe manciot (manciot-jeanchristophe) wrote :

The crash report may not be directly linked to the symptom described in the first post.
It says: "Error command: nm-cli... nm object is unknown."

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

I also get the assertion failure on my Ubuntu 16.10 system, but no crash and network is working fine.
So both problems are different problems and I propose that this bug (according to its title) remains on the assertion failure problem.

tags: added: xenial
tags: added: yakkety
Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

The assertion failure is gone in Ubuntu 17.04/zesty.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
Changed in network-manager (Ubuntu):
importance: Undecided → Critical
importance: Critical → Medium
Revision history for this message
Stefano (stefano-d) wrote :

Can confirm this on Ubuntu 16.04

Revision history for this message
kanagaraj (kanagaraj-vp) wrote :

i am having same issue on 16.4. i.e wired connection not connecting when i am booting my machine and if i restart the machine its working file. i was checked the kern.log it shows like

Jun 20 12:24:52 ubuntu NetworkManager[871]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed

Thanks
Kanagaraj Dhanapal

Revision history for this message
Michael F Winthrop (mwinthrop-1) wrote :
Download full text (5.1 KiB)

I am receiving numerous NM errors on startup, that I captured from /var/log for one boot on Aug 16 18:10: I ask if the preserved ".files in the home/user/ directories could be responsible for these errors?

In the captured "fail" list, NM is the main event per this thread
(nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed)

The problem got more pronounced after:

    sudo add-apt-repository ppa:kubuntu-ppa/backports
    sudo apt update

This was added after plasma repeatedly dropped the window ornaments.

    sudo /var/log# grep fail *log| grep 'Aug 16 18:10'

kern.log:Aug 16 18:10:35 dad314159 kernel: [ 0.173985] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
kern.log:Aug 16 18:10:35 dad314159 kernel: [ 4.392621] wl: module verification failed: signature and/or required key missing - tainting kernel
kern.log:Aug 16 18:10:36 dad314159 NetworkManager[997]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
kern.log:Aug 16 18:10:36 dad314159 NetworkManager[997]: <warn> [1502921436.6054] failed to enumerate oFono devices: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files
kern.log:Aug 16 18:10:43 dad314159 NetworkManager[997]: <info> [1502921443.7380] device (wlp12s0): state change: need-auth -> failed (reason 'no-secrets') [60 120 7]
kern.log:Aug 16 18:10:43 dad314159 NetworkManager[997]: <warn> [1502921443.7388] device (wlp12s0): Activation: failed for connection 'Disco'
kern.log:Aug 16 18:10:43 dad314159 NetworkManager[997]: <info> [1502921443.7426] device (wlp12s0): state change: failed -> disconnected (reason 'none') [120 30 0]
syslog:Aug 16 18:10:35 dad314159 kernel: [ 0.173985] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
syslog:Aug 16 18:10:35 dad314159 kernel: [ 4.392621] wl: module verification failed: signature and/or required key missing - tainting kernel
syslog:Aug 16 18:10:35 dad314159 avahi-daemon[988]: chroot.c: open() failed: No such file or directory
syslog:Aug 16 18:10:35 dad314159 thermald[961]: THD engine start failed
syslog:Aug 16 18:10:36 dad314159 NetworkManager[997]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
syslog:Aug 16 18:10:36 dad314159 wpa_supplicant[1334]: dbus: wpa_dbus_get_object_properties: failed to get object properties: (none) none
syslog:Aug 16 18:10:36 dad314159 NetworkManager[997]: <warn> [1502921436.6054] failed to enumerate oFono devices: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files
syslog:Aug 16 18:10:36 dad314159 systemd[1]: networking.service: Unit entered failed state.
syslog:Aug 16 18:10:36 dad314159 systemd[1]: ctdb.service: Unit entered failed state.
syslog:Aug 16 18:10:36 dad314159 colord[1188]: (colord:1188): Cd-WARNING **: failed to get session [pid 1021]: No such device or address
syslog:Aug 16 18:10:39 dad314159 systemd[1]: sddm.service: Unit entered failed state.
syslog:Aug 16 18:10:41 dad314159 colord[1188]: (colord:1188): Cd-WARNING **: failed to get session [pid 1494]: No such device or address
syslog:Aug 16 18:10:42 dad314159 systemd[1]: sddm.service: Unit ente...

Read more...

Revision history for this message
Narcis Garcia (narcisgarcia) wrote :

Ubuntu 16.04 (xenial) amd64

$ sudo journalctl -b -p err
set 28 22:07:52 system NetworkManager[927]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed

Revision history for this message
Diego Diniz L. de Oliveira (diegofoca123) wrote :

$ sudo journalctl -b -p err
-- Logs begin at Sex 2017-09-29 07:50:42 BRT, end at Sex 2017-09-29 07:58:58 BRT. --
Set 29 07:51:03 DTI05 NetworkManager[907]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed

Same error. My computer has no wireless card connected. I've tried a lot of things (changed network card for a new one, changed to a different distribution). Maybe is a hardware (motherboard) problem.

Revision history for this message
Diego Diniz L. de Oliveira (diegofoca123) wrote :

Guys...I got this problem solved by running these commands...

Install WICD to manage the network

sudo apt-get install wicd-gtk

Stop and disable Network-Manager

sudo systemctl stop NetworkManager.service
sudo systemctl disable NetworkManager.service

and uninstall avahi-autoipd and isc-dhcp-client using synaptic

But now I'm having two problems, one, system setting is not working 'cause NetworkManager is disabled, two wicd sets a random ip even it's configured as static so when I turn on the system or restart it, I have to disconnect and connect again to wicd recognize the righ ip.

Revision history for this message
Yovan (navoytak) wrote :

It seems it is a harmless message due to NetworkManager not having connection to any network

Revision history for this message
WinEunuchs2Unix (ricklee518) wrote :

Not sure I agree with #13 because message comes AFTER network is up:

Dec 13 05:52:20 alien NetworkManager[902]: <warn> [1513169540.4985] platform-linux: kernel support for IFLA_INET6_ADDR_GEN_MODE failed to detect; assume no support
Dec 13 05:52:20 alien NetworkManager[902]: <info> [1513169540.4991] manager: (enp59s0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/0)
Dec 13 05:52:20 alien NetworkManager[902]: <info> [1513169540.4998] keyfile: add connection in-memory (f1d049d0-ad20-3201-ac70-5cb8cc06a6e5,"Wired connection 1")
Dec 13 05:52:20 alien NetworkManager[902]: <info> [1513169540.5001] settings: (enp59s0): created default wired connection 'Wired connection 1'
Dec 13 05:52:20 alien NetworkManager[902]: <info> [1513169540.5007] device (enp59s0): state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Dec 13 05:52:20 alien NetworkManager[902]: <info> [1513169540.5025] device (enp59s0): link connected
Dec 13 05:52:20 alien kernel: alx 0000:3b:00.0 enp59s0: NIC Up: 1 Gbps Full
Dec 13 05:52:20 alien NetworkManager[902]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
D

Ubuntu 16.04.3, Kernel 4.14.4, Skylake laptop. IPv6 disabled with kernel command line in grub just because it life seems simpler that way. Only a couple of minor network interruptions requiring reboot over the last month.

Revision history for this message
KF Lee (kflee2000-0) wrote :

My network consists of:
2: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet 10.1.1.1/24 brd 10.1.1.255 scope global enp8s0
3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet 192.168.99.2/24 brd 192.168.99.255 scope global wlp4s0
5: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1484 qdisc pfifo_fast state UNKNOWN group default qlen 3
    inet 220.132.100.42 peer 168.95.98.254/32 scope global ppp0

and it seems all work ok except the service networking status keep showing:
   Active: failed (Result: exit-code) since Sun 2018-03-25 20:47:42 CST; 53min ago
     Docs: man:interfaces(5)
  Process: 953 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 859 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)"
 Main PID: 953 (code=exited, status=1/FAILURE)

cant find a fix and lead to also see in service NetworkManager status:
NetworkManager[933]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed

but the point is the network function normally, are these two issues related and what's the cause ?

Revision history for this message
axel (axel334) wrote :

There is a fix for this:
https://ubuntuforums.org/showthread.php?t=2305819

add a file to the /etc/modules-load.d directory to have the modules loaded into the kernel at boot. I just created a file called netfilter.conf and put the following in it:

nf_nat_pptp
nf_conntrack_pptp
nf_conntrack_proto_gre

Is it safe to use this solution? I don't know what those three entries mean.

Revision history for this message
axel (axel334) wrote :

I created this file with the above mentioned content but it doesn't work for me. I still get error messages:

ntpdate[954]: name server cannot be used: Temporary failure in name resolution (-3)
cze 29 16:34:21 NetworkManager[879]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed

Revision history for this message
axel (axel334) wrote :

On the same machine but on another disk with Manjaro I don't have these errors. I think the problem can be solved by upgrading to the new version of network-manager.

I installed new realtec driver but still no result.

Can you please upgrade network manager in Kubuntu 16.04? It slows down my system start.

Revision history for this message
Chad Peterson (wombatpandaa) wrote :

I have the same problem on GalliumOS running on an Acer Chromebook R11. I tried the above method (#16) and it did not work.

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.