Bug 976865 - gui blocks waiting for result from sending dbus event
gui blocks waiting for result from sending dbus event
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
5.10
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Carter Kozak
IDM QE LIST
:
Depends On:
Blocks: rhsm-rhel510
  Show dependency treegraph
 
Reported: 2013-06-21 13:15 EDT by Adrian Likins
Modified: 2013-10-01 09:50 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-01 09:50:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
pycallgraph pdf of subscription-manager-gui registration (162.23 KB, application/pdf)
2013-06-21 13:15 EDT, Adrian Likins
no flags Details

  None (edit)
Description Adrian Likins 2013-06-21 13:15:25 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()
        dbus_iface.check_status(ignore_reply=True)

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)


Possible fixes:

1. Reuse that dbus_iface instead of creating a new one each time
Comment 1 Carter Kozak 2013-07-02 16:33:23 EDT
commit 0a95a841719210e2b6b244377d926a6eab9cf535
Author: ckozak <ckozak@redhat.com>
Date:   Tue Jul 2 09:32:47 2013 -0400

    976865: dbus iface singleton for gui
Comment 3 Carter Kozak 2013-07-15 12:08:38 EDT
This is an optimization bug/fix, if it is implemented properly, QA tests should not detect any difference.
Comment 4 John Sefler 2013-07-17 14:54:14 EDT
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
subscription-manager-1.8.13-1.el5

Additional Info:
No comment on that pycallgraph attachment.

Note You need to log in before you can comment on or make changes to this bug.