Bug 1168657 - nmcli hangs when deleting profile two times
Summary: nmcli hangs when deleting profile two times
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager
Version: 7.2
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Jirka Klimes
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-27 14:04 UTC by Vladimir Benes
Modified: 2015-11-19 10:58 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Multiple bugs that could cause the client tools to become unresponsive or terminate unexpectedly have been fixed. (BZ#1168657, BZ#1182575, BZ#1197203)
Clone Of:
Environment:
Last Closed: 2015-11-19 10:58:05 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2315 normal SHIPPED_LIVE Moderate: NetworkManager security, bug fix, and enhancement update 2015-11-19 10:06:58 UTC

Description Vladimir Benes 2014-11-27 14:04:40 UTC
Description of problem:
deleting profile two times hangs nmcli.

Version-Release number of selected component (if applicable):
NetworkManager-0.9.11.0-6.git20141125.f32075d2.el7.x86_64

How reproducible:
always

Steps to Reproduce:
[vbenes@trautenberg ~]$ nmcli connection add type ethernet con-name tralala ifname \*
Connection 'tralala' (ee254b08-b73e-41b0-8c55-b8972e70e590) successfully added.
[vbenes@trautenberg ~]$ nmcli connection delete id tralala tralala


Actual results:
Error: Connection deletion failed: Timeout was reached


Expected results:
no error

Additional info:

Comment 1 Jirka Klimes 2014-11-27 17:15:26 UTC
The error seems to be in the daemon. nmcli sends too Delete() D-Bus calls, but it doesn't get any response/error for the second. Investigating...

Comment 3 Jirka Klimes 2015-03-13 09:46:00 UTC
I have fixed nmcli not to call delete (or down) for the same connection multiple times. The change is in upstream branch jk/nmcli-con-delete-rh1168657. That will fix the bug.

Nevertheless, we still should look into NetworkManager itself to fix the D-Bus responses.

Comment 4 Thomas Haller 2015-03-13 10:53:01 UTC
(In reply to Jirka Klimes from comment #3)
> I have fixed nmcli not to call delete (or down) for the same connection
> multiple times. The change is in upstream branch
> jk/nmcli-con-delete-rh1168657. That will fix the bug.
> 
> Nevertheless, we still should look into NetworkManager itself to fix the
> D-Bus responses.

could this hanging be caused libnm? ( https://bugzilla.redhat.com/show_bug.cgi?id=1079353#c41 )

Comment 5 Dan Williams 2015-03-13 21:56:35 UTC
I'd rather have the:

g_signal_handlers_disconnect_by_func (G_OBJECT (connection),
                                      down_active_connection_state_cb,
                                      info);

be done in down_active_connection_state_cb(), since connection_cb_info_finish() is called in two paths, and this disconnect is only relevant in one of them.  The other caller of the connection_cb_info_finish() in that path (connection_op_timeout_cb()) passes a NULL connection so the code there wouldn't hit anyway.

The rest looks good.

Comment 6 Jirka Klimes 2015-03-16 16:03:59 UTC
(In reply to Thomas Haller from comment #4)
> (In reply to Jirka Klimes from comment #3)
> > I have fixed nmcli not to call delete (or down) for the same connection
> > multiple times. The change is in upstream branch
> > jk/nmcli-con-delete-rh1168657. That will fix the bug.
> > 
> > Nevertheless, we still should look into NetworkManager itself to fix the
> > D-Bus responses.
> 
> could this hanging be caused libnm? (
> https://bugzilla.redhat.com/show_bug.cgi?id=1079353#c41 )

I don't think so. I think it was caused by NM not sending any response to D-Bus call.

(In reply to Dan Williams from comment #5)
> I'd rather have the:
> 
> g_signal_handlers_disconnect_by_func (G_OBJECT (connection),
>                                       down_active_connection_state_cb,
>                                       info);
> 
> be done in down_active_connection_state_cb(), since
> connection_cb_info_finish() is called in two paths, and this disconnect is
> only relevant in one of them.  The other caller of the
> connection_cb_info_finish() in that path (connection_op_timeout_cb()) passes
> a NULL connection so the code there wouldn't hit anyway.
> 
Fixed.

Pushed to upstream master as:
f52e6bb cli: do not stall in 'nmcli connection delete/down' (rh #1168657)

Comment 7 Lubomir Rintel 2015-06-15 08:29:29 UTC
Cherry-picked into nm-1-0:

1203f22 cli: do not stall in 'nmcli connection delete/down' (rh #1168657)

Comment 9 Vladimir Benes 2015-09-04 12:28:36 UTC
No hangs occur anymore. Verified on all supported architectures.

Comment 10 errata-xmlrpc 2015-11-19 10:58:05 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://rhn.redhat.com/errata/RHSA-2015-2315.html


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