Bug 1579858 - [NMCI] Failed assertion on NM shutdown
Summary: [NMCI] Failed assertion on NM shutdown
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Beniamino Galvani
QA Contact: Desktop QE
URL:
Whiteboard:
: 1568387 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-18 13:53 UTC by Beniamino Galvani
Modified: 2018-06-08 12:13 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-03 14:51:23 UTC
Target Upstream Version:


Attachments (Terms of Use)
[PATCH] settings: remove connections from list on finalize() (1.31 KB, patch)
2018-05-18 17:01 UTC, Beniamino Galvani
no flags Details | Diff
[PATCH v2] settings: let connections keep NMSettings alive (3.24 KB, patch)
2018-06-01 17:00 UTC, Beniamino Galvani
no flags Details | Diff

Description Beniamino Galvani 2018-05-18 13:53:36 UTC
Description of problem:

  <trace> [1526650954.1491] dbus-object[0x2387170]: unexport: "/org/freedesktop/NetworkManager/Settings"
  NetworkManager:ERROR:src/settings/nm-settings.c:1939:finalize: assertion failed: (c_list_is_empty (&priv->connections_lst_head))
  NetworkManager.service: Main process exited, code=dumped, status=6/ABRT

Version-Release number of selected component (if applicable):

 git master (5e8c12eecefb18cd335e24d46a38f66210e6b8e9)

Steps to Reproduce:
 1. Disconnect all devices
 2. Stop NM

Comment 3 Beniamino Galvani 2018-05-18 17:01:03 UTC
Created attachment 1438738 [details]
[PATCH] settings: remove connections from list on finalize()

Comment 4 Thomas Haller 2018-05-23 13:48:46 UTC
(In reply to Beniamino Galvani from comment #3)
> Created attachment 1438738 [details]
> [PATCH] settings: remove connections from list on finalize()

the fact that we still have connections at the end is a bug on it's own.

It's not enough to just unlink them, you should at least try to unregister as well as possibly (by doing in parts what connection_removed() does).

But until we fix shutdown properly, maybe a simpler solution is that whenever a connection is added/remove in NMSettings, it references also NMSettings. Of course, this means, at exit we will now also leak NMSettings. But that is a good enough workaround for the moment. Obviously, we don't properly tear down our stuff at the end anyway.

Comment 5 Beniamino Galvani 2018-06-01 17:00:53 UTC
Created attachment 1446757 [details]
[PATCH v2] settings: let connections keep NMSettings alive

Comment 6 Beniamino Galvani 2018-06-02 08:54:37 UTC
How about now?

Comment 7 Beniamino Galvani 2018-06-03 14:51:23 UTC
Applied to master with Thomas' ack:

https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=3fb4eed3ef19806f497076e1a94b5a7418ab8d7d

Comment 8 Beniamino Galvani 2018-06-08 12:13:17 UTC
*** Bug 1568387 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.