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 758749 - [PATCH] GDBusProxy: add G_DBUS_PROXY_FLAGS_NO_MATCH_RULE flag
[PATCH] GDBusProxy: add G_DBUS_PROXY_FLAGS_NO_MATCH_RULE flag
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-11-27 16:58 UTC by Lubomir Rintel
Modified: 2018-05-24 18:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A fix (4.30 KB, patch)
2015-11-27 16:58 UTC, Lubomir Rintel
reviewed Details | Review

Description Lubomir Rintel 2015-11-27 16:58:26 UTC
Created attachment 316409 [details] [review]
A fix

D-Bus has an upper limit on number of Match rules and it's rather easy to hit
with a big number of proxies with signal subscriptions. This happens with
NetworkManager with hundreds of devices or connection settings. By passing
G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE to g_dbus_connection_signal_subscribe(), the
user can call AddMatch with a less granular match instead of a match per every
proxy.
Comment 1 Lubomir Rintel 2016-01-06 11:25:02 UTC
Hello?

Is there anybody out there?

Just nod if you can hear me.
Comment 2 Colin Walters 2016-01-06 14:23:20 UTC
Review of attachment 316409 [details] [review]:

First I'd say this is really a DBus (daemon) bug - there's no really good reason it couldn't consolidate match rules, and the match rule limits are rather arbitrary to begin with.  Anyways, that doesn't help us now.

Could use a test.

::: gio/gioenums.h
@@ +995,3 @@
  * autostarted by a method call. This flag is only meaningful in proxies for well-known names,
  * and only if %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is not also specified.
+ * @G_DBUS_PROXY_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch D-Bus call for this signal subscription.

I'd elaborate a little bit more here; say e.g. you must call AddMatch on your own, possibly with a broader match.  And that this is a workaround for DBus limits on match rules.
Comment 3 GNOME Infrastructure Team 2018-05-24 18:22:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/1109.