After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 752481 - Network Manager fails to list all configured network connections (128+)
Network Manager fails to list all configured network connections (128+)
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-07-16 12:23 UTC by Dariusz Gadomski
Modified: 2017-08-10 19:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for retrying failed dbus calls (3.71 KB, patch)
2015-07-30 15:44 UTC, Dariusz Gadomski
none Details | Review

Description Dariusz Gadomski 2015-07-16 12:23:37 UTC
If a large number of networks is configured it may be impossible to connect to some of them as a regular user, because they are not listed.

It affects all the versions I tested: trusty, utopic, vivid and wily.

Steps to reproduce:
1. Configure a large number of networks (in my case it was 250).
2. Run nmcli c.

Expected result:
nmcli should list all available networks.

Actual result:
Only a random (yes, it changes a bit with every call) subset of all connection is displayed - about 130 connections.

If there are e.g. VPN connections among all connections you may end up with being not able to connect to them until you get lucky and the connection you need will be "drawn" to the available pool.

Running nmcli c as root displays all connections correctly.

I was able to detect that this is related to value of DBus max_replies_per_connection parameter. It's default value of 128 more-less corresponds to the number of displayed connections. Increasing that value hides the issue, but it's just a workaround.

A proper way would be to handle DBus error 8 ("The maximum number of pending replies per connection has been reached") specially e.g. waiting and retrying the call (to avoid endless calls a retry limit may be used).

This error is reported in libnm-glib/nm-remote-connection.c:685 (function :init_get_settings_cb).
Comment 1 Dariusz Gadomski 2015-07-30 15:44:13 UTC
Created attachment 308473 [details] [review]
Patch for retrying failed dbus calls

I believe that retrying DBus calls is more appropriate than globally increasing replies limits for the whole system bus on DBus.
Comment 3 Beniamino Galvani 2017-08-10 19:41:29 UTC
nmcli was converted to use the ObjectManager D-Bus interface and this problem should not happen anymore, thus I'm closing the bug. Please reopen it if you experience the same issue with NM >= 1.8, thank you.