Bug 29780 - config/hal leaks dbus match rules on server regeneration
Summary: config/hal leaks dbus match rules on server regeneration
Status: RESOLVED DUPLICATE of bug 27681
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-24 08:21 UTC by Aaron Plattner
Modified: 2010-08-25 14:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Aaron Plattner 2010-08-24 08:21:53 UTC
Configure the server with HAL support and without udev support.  Start X and make sure it actually connected to dbus and configured the input devices via HAL.  Run "while true; do xrefresh; done" to make the server regenerate constantly.  Eventually, it will fail to add a match rule:

[config/dbus] couldn't add match: org.freedesktop.DBus.Error.LimitsExceeded (Connection ":1.7" is not allowed to add more match rules (increase limits in configuration file if required)) 
process 1392: arguments to dbus_bus_release_name() were incorrect, assertion "(error) == NULL || !dbus_error_is_set ((error))" failed in file dbus-bus.c line 1149. 
This is normally a bug in some application using the D-Bus library. 
[config/hal] couldn't add match rule: org.freedesktop.DBus.Error.LimitsExceeded (Connection ":1.7" is not allowed to add more match rules (increase limits in configuration file if required)) 
[config/hal] cannot detect a HAL startup.

The problem appears to be that dbus-core uses  dbus_bus_get instead of dbus_connection_open, so the connection it gets has a refcount of 2 and is not disconnected when the config/dbus-core code shuts down.  The config/hal code adds the match rule in listen_for_startup (called from connect_hook), but never removes it.  Since the connection is not closed when dbus-core unrefs it in teardown, the match rule is not automatically garbage-collected by dbus.
Comment 1 Jesse Adkins 2010-08-25 14:11:05 UTC

*** This bug has been marked as a duplicate of bug 27681 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.