Red Hat Bugzilla – Bug 976865
gui blocks waiting for result from sending dbus event
Last modified: 2013-10-01 09:50:23 EDT
Created attachment 763913 [details]
pycallgraph pdf of subscription-manager-gui registration
Description of problem:
mysubstabt.update_subscription blocks on dbus. In particular, it:
dbus_iface = get_dbus_iface()
Both those calls block, and can timeout in some cases. In the normal case,
it blocks a little getting dbus_iface, and blocks some more waiting for check_status result.
The dbus interface probably only needs to be created once per invocation of that widget (or really, once per invocation of subscription-manager) and can be reused.
The check_status call on the dbus interface ends up invoking /usr/libexec/rhsmd,
which isn't particularly quick, since it initializes alot of the subman stuff again, and makes another server call to check status.
MySubscriptionsTab.update_subscriptions() can end up getting called alot if there are many changes to entitlement status.
It is run at MySubscriptionsTab init, as well as anytime the entitlement cert file monitor is triggered. It is also involved on unsubscribe.
(And it seems like those cases can race a little bit, and potentially invoke each other...)
See attached "pycallgraph-gui-register.pdf" for an example of the dbus taking a lot of time.
Version-Release number of selected component (if applicable):
versions using server side status (1.8+ more or less)
1. Reuse that dbus_iface instead of creating a new one each time
Author: ckozak <firstname.lastname@example.org>
Date: Tue Jul 2 09:32:47 2013 -0400
976865: dbus iface singleton for gui
This is an optimization bug/fix, if it is implemented properly, QA tests should not detect any difference.
I do not have any explicit test coverage to confirm that comment 0 was a problem nor assert that comment 0 is now fixed.
I also do not have any metrics to confirm that performance has improved with this bug fix.
As suggested in comment 3, I can say that our automated tests have not revealed a regression in behavior with respect to compliance status that has not already been addressed in other bugzillas. Therefore, I am flipping this bug to VERIFIED without any adverse regression.
[root@jsefler-5 ~]# rpm -q subscription-manager
No comment on that pycallgraph attachment.