RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 723051 - subscription refresh hangs gui
Summary: subscription refresh hangs gui
Keywords:
Status: CLOSED DUPLICATE of bug 720465
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Michael Stead
QA Contact: J.C. Molet
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel62
TreeView+ depends on / blocked
 
Reported: 2011-07-18 20:43 UTC by J.C. Molet
Modified: 2011-07-19 19:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-19 19:27:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description J.C. Molet 2011-07-18 20:43:01 UTC
Description of problem:
When there are more than a few products on the system, subscription-manager-gui seems to hang in an infinite loop whenever it has to refresh its certificate staus/my-installed-software views.

Version-Release number of selected component (if applicable):
subscription-manager-firstboot-0.96.4-1.git.34.850053a.el6.x86_64
python-rhsm-0.96.7-1.git.3.f3ce5d1.el6.noarch
subscription-manager-gnome-0.96.4-1.git.34.850053a.el6.x86_64
subscription-manager-0.96.4-1.git.34.850053a.el6.x86_64

How reproducible:
most times

Steps to Reproduce:
There are a few ways to cause this, this is the most consistent:

1. start up subscription-manager-gui
2. register subscription manager (i used testuser1 with the admin org)
3. subscription-manager subscribe --auto on the cli

(this also happens when you autosubscribe it entirely in the gui)
  
Actual results:
There is an infinite loop of this in the rhsm.log:

2011-07-18 16:38:00,841 [DEBUG]  @cert_sorter.py:71 - Sorting product and entitlement cert status for: 2011-07-18 16:38:00.841410
2011-07-18 16:38:00,880 [DEBUG]  @cert_sorter.py:95 - Installed product IDs: ['100000000000060', '1000000041', '1144', '100000000000011', '100000000000010', '100000000000013', '100000000000012', '100000000000015', '10000000000043', '27060', '917571', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000006', '100000000000007', '100000000000004', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '100000000000008', '100000000000009', '100000000000022', '38', '37', '42001', '42000', '37090', '37070']
2011-07-18 16:38:01,057 [DEBUG]  @cert_sorter.py:82 - valid entitled products: ['100000000000011', '100000000000010', '100000000000013', '100000000000012', '100000000000015', '27060', '37069', '37068', '37080', '37065', '37067', '37060', '100000000000006', '100000000000007', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '100000000000022', '100000000000009', '100000000000008', '37090', '37070']
2011-07-18 16:38:01,058 [DEBUG]  @cert_sorter.py:83 - expired entitled products: []
2011-07-18 16:38:07,015 [DEBUG]  @cert_sorter.py:71 - Sorting product and entitlement cert status for: 2011-07-18 16:38:07.015657
2011-07-18 16:38:07,056 [DEBUG]  @cert_sorter.py:95 - Installed product IDs: ['100000000000060', '1000000041', '1144', '100000000000011', '100000000000010', '100000000000013', '100000000000012', '100000000000015', '10000000000043', '27060', '917571', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000006', '100000000000007', '100000000000004', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '100000000000008', '100000000000009', '100000000000022', '38', '37', '42001', '42000', '37090', '37070']
2011-07-18 16:38:07,246 [DEBUG]  @cert_sorter.py:82 - valid entitled products: ['100000000000011', '100000000000010', '100000000000013', '100000000000012', '100000000000015', '27060', '37069', '37068', '37080', '37065', '37067', '37060', '100000000000006', '100000000000007', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '100000000000022', '100000000000009', '100000000000008', '37090', '37070']
2011-07-18 16:38:07,247 [DEBUG]  @cert_sorter.py:83 - expired entitled products: []
2011-07-18 16:38:13,090 [DEBUG]  @cert_sorter.py:71 - Sorting product and entitlement cert status for: 2011-07-18 16:38:13.090339
2011-07-18 16:38:13,129 [DEBUG]  @cert_sorter.py:95 - Installed product IDs: ['100000000000060', '1000000041', '1144', '100000000000011', '100000000000010', '100000000000013', '100000000000012', '100000000000015', '10000000000043', '27060', '917571', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000006', '100000000000007', '100000000000004', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '100000000000008', '100000000000009', '100000000000022', '38', '37', '42001', '42000', '37090', '37070']
2011-07-18 16:38:13,308 [DEBUG]  @cert_sorter.py:82 - valid entitled products: ['100000000000011', '100000000000010', '100000000000013', '100000000000012', '100000000000015', '27060', '37069', '37068', '37080', '37065', '37067', '37060', '100000000000006', '100000000000007', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '100000000000022', '100000000000009', '100000000000008', '37090', '37070']
2011-07-18 16:38:13,308 [DEBUG]  @cert_sorter.py:83 - expired entitled products: []

Expected results:
This shouldn't take any longer than it does when the my-installed-software tab is generated when the gui first starts up.

Additional info:
For an added bonus, killall subscription-manager-gui, then restart it.  Then click the unregister button.  It doesn't completely hang, but it does lock up for a good 5 minutes.

Comment 1 Michael Stead 2011-07-19 19:23:49 UTC
I've determined that we are not caught in an infinite loop, and it will end eventually.

The problem is that changes are being detected in entitlement cert directory multiple times per file (including any key files that exist as well). Looks like approx 3 change detections per file. So for me that was 90 changes detected.

For EACH change that is detected, ALL product certs are read from the disk and are sorted (CertSorter). Then the UI is updated with info from the sorter. This is very expensive, and i would guess that with a large number of products, on a slower machine, this would take quite some time.

Comment 2 Michael Stead 2011-07-19 19:27:08 UTC
Marking as duplicate of #720465

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


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