Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1058843

Summary: [abrt] NetworkManager: nm_active_connection_export(): NetworkManager killed by SIGABRT
Product: Red Hat Enterprise Linux 7 Reporter: Martin <mholec>
Component: NetworkManagerAssignee: Dan Williams <dcbw>
Status: CLOSED CURRENTRELEASE QA Contact: Desktop QE <desktop-qa-list>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.0CC: danw, dcbw, jgrulich, jklimes, nstraz, tpelka
Target Milestone: rc   
Target Release: 7.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:36c2159ffcc8a9d6088e0f81917bf589be32bfa5
Fixed In Version: NetworkManager-0.9.9.1-0.git20140228.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 13:24:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 916275    
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: dso_list
none
File: environ
none
File: limits
none
File: maps
none
File: open_fds
none
File: proc_pid_status
none
File: var_log_messages
none
Backtrace with installed debuginfo none

Description Martin 2014-01-28 15:43:52 UTC
Version-Release number of selected component:
NetworkManager-0.9.9.0-36.git20140122.el7

Additional info:
reporter:       libreport-2.1.11
backtrace_rating: 4
cmdline:        /usr/sbin/NetworkManager --no-daemon
crash_function: nm_active_connection_export
executable:     /usr/sbin/NetworkManager
kernel:         3.10.0-79.el7.x86_64
runlevel:       N 5
type:           CCpp
uid:            0

Truncated backtrace:
Thread no. 1 (6 frames)
 #4 nm_active_connection_export
 #5 _internal_activate_generic
 #6 activation_auth_done
 #7 auth_done
 #8 auth_chain_finish
 #10 g_main_context_iterate.isra.22 at /lib64/libglib-2.0.so.0

Comment 1 Martin 2014-01-28 15:43:55 UTC
Created attachment 856676 [details]
File: backtrace

Comment 2 Martin 2014-01-28 15:43:57 UTC
Created attachment 856677 [details]
File: cgroup

Comment 3 Martin 2014-01-28 15:44:02 UTC
Created attachment 856678 [details]
File: core_backtrace

Comment 4 Martin 2014-01-28 15:44:06 UTC
Created attachment 856679 [details]
File: dso_list

Comment 5 Martin 2014-01-28 15:44:08 UTC
Created attachment 856680 [details]
File: environ

Comment 6 Martin 2014-01-28 15:44:11 UTC
Created attachment 856681 [details]
File: limits

Comment 7 Martin 2014-01-28 15:44:19 UTC
Created attachment 856682 [details]
File: maps

Comment 8 Martin 2014-01-28 15:44:21 UTC
Created attachment 856683 [details]
File: open_fds

Comment 9 Martin 2014-01-28 15:44:25 UTC
Created attachment 856684 [details]
File: proc_pid_status

Comment 10 Martin 2014-01-28 15:44:30 UTC
Created attachment 856685 [details]
File: var_log_messages

Comment 13 Jan Grulich 2014-01-29 15:42:10 UTC
I'm able to reproduce it even in F20, but only with the old KDE applet, which is in RHEL 7. It looks like the old applet is calling something wrongly, but I haven't found where could be a problem. It's also reproducible with wireless networks secured with WPA2. I remember it worked, so maybe some change in NM causes this problem, but weird is that the crash is in NetworkManager.

Comment 14 Jan Grulich 2014-01-29 16:36:41 UTC
I've just tested the new update of NM in Fedora and it looks it was related to https://bugzilla.gnome.org/show_bug.cgi?id=723163 and seems to be fixed.

Comment 15 Dan Williams 2014-01-29 21:17:28 UTC
Could be fixed by ff350c04c0546383841126ea43bed93d302482fb upstream, but the backtrace doesn't implicate AddAndActivate.  I'd like to dig further into this though.

If you can easily reproduce on *RHEL7*, please install the debuginfo so we can grab a better backtrace if possible.  Also, if possible, could you reproduce the issue under valgrind and attach the result?

Comment 16 Jan Grulich 2014-01-30 09:51:36 UTC
Created attachment 857415 [details]
Backtrace with installed debuginfo

Adding a backtrace with installed debuginfo

Comment 17 Jan Grulich 2014-01-30 09:58:44 UTC
I tried to run NetworkManager under valgrind, but probably not properly, because  I got a lot of errors about connecting to dbus, but I reproduced the issue and the only thing I see is: 

ERROR:nm-active-connection.c:288:nm_active_connection_export: assertion failed: (priv->device || priv->vpn)

Comment 18 Dan Williams 2014-01-30 17:13:22 UTC
Looks like an auto-activated request is then superceded by a manual request for the same device.  The new request already has the INT_DEVICE set on it, and thus is watching for device state events.  When the device state changes to DISCONNECTED to clean up the old request, the new request is listening and calls _device_cleanup(), but then proceeds and hits the assertion because priv->device is NULL.

NetworkManager[3324]: <info> NetworkManager state is now CONNECTING
NetworkManager[3324]: <info> Activation (wlp3s0) Stage 1 of 5 (Device Prepare) scheduled...
NetworkManager[3324]: <info> Activation (wlp3s0) Stage 1 of 5 (Device Prepare) started...
NetworkManager[3324]: <info> Activation (wlp3s0) Stage 2 of 5 (Device Configure) scheduled...
NetworkManager[3324]: <info> Activation (wlp3s0) Stage 1 of 5 (Device Prepare) complete.
NetworkManager[3324]: <info> (wlp3s0): disconnecting for new activation request.
NetworkManager[3324]: <info> (wlp3s0): device state change: prepare -> disconnected (reason 'none') [40 30 0]
NetworkManager[3324]: <info> (wlp3s0): deactivating device (reason 'none') [0]
NetworkManager[3324]: <info> NetworkManager state is now DISCONNECTED
NetworkManager[3324]: <info> Activation (wlp3s0) starting connection 'Red Hat'
NetworkManager[3324]: <info> (wlp3s0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
NetworkManager[3324]: <info> Activation (wlp3s0) Stage 1 of 5 (Device Prepare) scheduled...
**
ERROR:nm-active-connection.c:288:nm_active_connection_export: assertion failed: (priv->device || priv->vpn)

Comment 19 Jirka Klimes 2014-02-11 14:49:41 UTC
Similar or the same issue is Fedora bug 1062984.

Comment 20 Dan Williams 2014-02-20 01:56:22 UTC
Fixes pushed to dcbw/reactivate upstream.

Comment 21 Dan Winship 2014-02-21 15:26:03 UTC
> core: queue re-activations to allow DEACTIVATING state

any reason for the clear_act_request() rewrite? It seems less clear this way to me.

The commit message doesn't explain the "HACK..." that you removed in nm_device_activate().


> core: better ignore deactivations before a new activation starts (rh #1058843)

The AC could also just check if nm_device_get_act_request() returns itself (well, assuming the AC is an NMActRequest and not an NMVpnConnection)?

But this way works too.

Comment 22 Dan Williams 2014-02-21 18:15:42 UTC
(In reply to Dan Winship from comment #21)
> > core: queue re-activations to allow DEACTIVATING state
> 
> any reason for the clear_act_request() rewrite? It seems less clear this way
> to me.

Reverted.

> The commit message doesn't explain the "HACK..." that you removed in
> nm_device_activate().

Archaeology time!  This was fun, back to 2007.  Updated the commit message.

> > core: better ignore deactivations before a new activation starts (rh #1058843)
> 
> The AC could also just check if nm_device_get_act_request() returns itself
> (well, assuming the AC is an NMActRequest and not an NMVpnConnection)?

This is why we have code review :)  I like your way better, though it is a bit less explicit.  Updated.

Comment 23 Dan Winship 2014-02-22 14:45:16 UTC
(In reply to Dan Williams from comment #22)
> Archaeology time!  This was fun, back to 2007.  Updated the commit message.

OK. That's more explanation than I was expecting. :)

everything looks good now

Comment 24 Nate Straz 2014-02-25 15:56:59 UTC
Another user experienced a similar problem:

NetworkManager crashed during boot preventing network from coming online.

reporter:       libreport-2.1.11
backtrace_rating: 4
cmdline:        /usr/sbin/NetworkManager --no-daemon
crash_function: nm_active_connection_export
executable:     /usr/sbin/NetworkManager
kernel:         3.10.0-93.el7.revolver.x86_64
package:        NetworkManager-0.9.9.0-39.git20140131.el7
reason:         NetworkManager killed by SIGABRT
runlevel:       unknown
type:           CCpp
uid:            0

Comment 25 Dan Williams 2014-02-26 00:06:11 UTC
Merged to git master.

Comment 26 Jirka Klimes 2014-02-27 12:57:59 UTC
e19f48ec2601a37641cfbcd4cc4b0c63b407c7a2 brings a regression in that active connections are not removed any more, but stuck in deactivating state.

Test:
$ nmcli device
DEVICE  TYPE      STATE      CONNECTION
ens3    ethernet  connected  c3
ens4    ethernet  connected  c4
ens5    ethernet  connected  c5

$ nmcli connection
NAME  TYPE      UUID                                  TYPE            DEVICE
c3    ethernet  cfac552d-710a-4ff7-9ef1-0edd218e52e8  802-3-ethernet  ens3
c4    ethernet  3cde06c2-735c-41e3-a316-ad4a9d2c27dd  802-3-ethernet  ens4
c5    ethernet  b3007cf2-f1b4-49a4-af76-32afd8bb49d8  802-3-ethernet  ens5

$ nmcli dev disc ens4
$ nmcli dev disc ens5

$ nmcli device
DEVICE  TYPE      STATE         CONNECTION
ens3    ethernet  connected     c3
ens4    ethernet  disconnected  --
ens5    ethernet  disconnected  --

$ nmcli connection
NAME  TYPE      UUID                                  TYPE            DEVICE
c3    ethernet  cfac552d-710a-4ff7-9ef1-0edd218e52e8  802-3-ethernet  ens3
c4    ethernet  3cde06c2-735c-41e3-a316-ad4a9d2c27dd  802-3-ethernet  ens4
c5    ethernet  b3007cf2-f1b4-49a4-af76-32afd8bb49d8  802-3-ethernet  ens5

I pushed a fix to jk/acon-remove-fix upstream branch.

Comment 27 Dan Winship 2014-02-27 16:24:36 UTC
seems right to me, but it would be good to get dcbw's input

Comment 28 Dan Williams 2014-02-27 18:03:55 UTC
Yeah, I tracked this down yesterday and today too.  Your fix is correct, but I'd prefer one that makes the decision clearer.

I pushed dcbw/acon-remove-fix with my version of the patch isolated.  Would this be OK instead?

Comment 29 Dan Winship 2014-02-27 18:22:42 UTC
also looks good

Comment 30 Dan Williams 2014-02-27 18:57:28 UTC
after acks from thaller and danw, merged dcbw/acon-remove-fix to master

Comment 32 Ludek Smid 2014-06-13 13:24:04 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.