GNOME Bugzilla – Bug 758749
[PATCH] GDBusProxy: add G_DBUS_PROXY_FLAGS_NO_MATCH_RULE flag
Last modified: 2018-05-24 18:22:11 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.
Hello? Is there anybody out there? Just nod if you can hear me.
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.
-- 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.