This bug has been created based on an anonymous crash report requested by the package maintainer.
Report URL: http://faf.lab.eng.brq.redhat.com/faf/reports/bthash/a9e753ef2ca0c30fb9148f56e4654cff1cdf60ce/
the issue is, that NMDefaultRouteManager has a reference to a NMDeviceMacvlan.
Upon exit of the program, the NMDefaultRouteManager is destroyed, which then triggers a destroy of the NMDeviceMacvlan instance.
The issue then is that NMDevice:dispose then accesses nm_route_manger_get(), which is already destroyed at the point.
See th/netns-singleton-rh1440089, which causes the device to have a (indirect) reference to NMDefaultRouteManager and NMRouteManager. This keeps those instances alive and prevents the crash.
Note that we already have a leak during shutdown, in that we don't properly disconnect devices -- resulting in most singleton instances to leak. That eventually should be fixed. The branch only makes NMDefaultRouteManager and NMRouteManager leak too. But first we have to propertly track + extend the lifetime (to avoid the crash), later we shall see how to order shutdown to free all instances.
Also, the branch also removes some uses of singleton instances (which are difficult to coordinate during shutdown).
> device: keep NMNetns instance per device
+ if (!nm_ip4_config_commit (existing, NM_PLATFORM_GET, route_manager_get(), ...
Nitpick: missing space before ().
The rest looks good.
(as said, this does not fix the leaks on shutdown. That would be a larger effort).
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.