Skip to content

device: keep a NMDevice reference during a deferred state set

Lubomir Rintel requested to merge lr/set-state-ref into master

When the device has been surprise removed, it could be that all the live references will go away during the state change:

[manager abruptly removes enp0s26u1u2i19 device, because a modem claims it] [1558090169.7758] device (enp0s26u1u2i19): state change: activated -> deactivating (reason 'connection-removed', sys-iface-state: 'managed') [1558090169.8108] device (enp0s26u1u2i19): state change: deactivating -> disconnected (reason 'connection-removed', sys-iface-state: 'managed') [1558090170.3252] dhcp4 (enp0s26u1u2i19): canceled DHCP transaction, DHCP client pid 954 [1558090170.3253] dhcp4 (enp0s26u1u2i19): state changed bound -> done ((src/nm-dispatcher.c:543)): assertion '' failed g_object_notify_by_pspec: assertion 'G_IS_OBJECT (object)' failed g_object_notify_by_pspec: assertion 'G_IS_OBJECT (object)' failed g_object_notify_by_pspec: assertion 'G_IS_OBJECT (object)' failed g_object_notify_by_pspec: assertion 'G_IS_OBJECT (object)' failed ((src/devices/nm-device.c:1391)): assertion '' failed g_object_notify_by_pspec: assertion 'G_IS_OBJECT (object)' failed [1558090170.3296] device [null]: remove_pending_action (1): 'queued-state-change-disconnected' not pending file src/devices/nm-device.c: line 14244 (): should not be reached

Merge request reports