Bug 1440089

Summary: [NMCI] [abrt] [faf] NetworkManager: unknown function(): /usr/sbin/NetworkManager killed by 6
Product: Red Hat Enterprise Linux 7 Reporter: Vladimir Benes <vbenes>
Component: NetworkManagerAssignee: Thomas Haller <thaller>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: atragler, bgalvani, fgiudici, lrintel, rkhan, sukulkar, thaller
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://faf.lab.eng.brq.redhat.com/faf/reports/bthash/a9e753ef2ca0c30fb9148f56e4654cff1cdf60ce/
Whiteboard:
Fixed In Version: NetworkManager-1.8.0-0.4.rc3.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 09:27:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vladimir Benes 2017-04-07 09:31:58 UTC
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/

Comment 1 Thomas Haller 2017-04-18 11:08:25 UTC
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).

Comment 2 Beniamino Galvani 2017-04-18 12:46:37 UTC
> 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.

Comment 3 Thomas Haller 2017-04-18 14:01:34 UTC
merged upstream:

master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=a31ddcfca5abf13d5a6522615d2411692167eadf

nm-1-8: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=6d3ce7557e0c3046e0cd05b833caeceacd436042




(as said, this does not fix the leaks on shutdown. That would be a larger effort).

Comment 5 errata-xmlrpc 2017-08-01 09:27:08 UTC
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.

https://access.redhat.com/errata/RHSA-2017:2299