Bug 1378903 - rhn_check cannot report 'idle' time for PC with high CPU count
Summary: rhn_check cannot report 'idle' time for PC with high CPU count
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rhn-client-tools
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 7.4
Assignee: Gennadii Altukhov
QA Contact: Pavel Studeník
URL:
Whiteboard:
: 1766722 (view as bug list)
Depends On:
Blocks: 1395284
TreeView+ depends on / blocked
 
Reported: 2016-09-23 13:25 UTC by Marcel Gazdík
Modified: 2021-06-10 11:33 UTC (History)
8 users (show)

Fixed In Version: rhn-client-tools-2.0.2-15-el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 22:19:00 UTC
Target Upstream Version:


Attachments (Terms of Use)
workaround patch (470 bytes, patch)
2016-09-23 13:25 UTC, Marcel Gazdík
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2039 0 normal SHIPPED_LIVE rhn-client-tools, rhnlib, rhnsd, and yum-rhn-plugin bug fix update 2017-08-01 19:33:28 UTC

Description Marcel Gazdík 2016-09-23 13:25:48 UTC
Created attachment 1204157 [details]
workaround patch

Description of problem:
  Computer with high count of CPU with low usage will have a huge idle time which can be read from /proc/uptime. The problem is not with the high number itself but with the xml rpclib Marshaller which is not able to send long instead of int when it is necessary thus the rhn_check fails on <type 'exceptions.OverflowError'> error.

Version-Release number of selected component (if applicable):
rhn-check-2.0.2-6.el7.noarch

How reproducible:
Have a PC with 240 CPU and let it sit for 160 days, or just simply fake second value in /proc/uptime


Actual results:
rhn_check will fail to report the values.

Expected results:
data will be reported

Workaround:
  The attached patch set the idle time to 0 to workaround the issue with too high number.

Comment 1 Tomas Lestach 2016-09-26 09:40:22 UTC
Switching to the right component.

Comment 9 Pavel Studeník 2017-06-22 10:52:49 UTC
When system runs more then 68 years, the rhn_check start failing with following error:

<type 'exceptions.OverflowError'>
Více informací naleznete ve /var/log/up2date

<type 'exceptions.OverflowError'>
Více informací naleznete ve /var/log/up2date
[root@kvm-02-guest05 ~]# tail /var/log/up2date
  File "/usr/lib64/python2.7/xmlrpclib.py", line 655, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 715, in dump_array
    dump(v, write)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 655, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 666, in dump_int
    raise OverflowError, "int exceeds XML-RPC limits"
<type 'exceptions.OverflowError'>: int exceeds XML-RPC limits

>> cat /proc/uptime
2148000000.83 214800000.83

Comment 10 Pavel Studeník 2017-06-22 11:04:29 UTC
>> cat /proc/uptime
882642.20 3306190.66

first number - the total number of seconds the system has been up
second number - how much of that time the machine has spent idle, in seconds

when second number is more than 2147483000.00, the rhn_check doesn't work and I receive traceback:

>> rhn_check -vv
An error has occurred:
<type 'exceptions.OverflowError'>
See /var/log/up2date for more information
>> /var/log/up2date
<type 'exceptions.OverflowError'>
See /var/log/up2date for more information
[root@kvm-02-guest05 ~]# tail /var/log/up2date
  File "/usr/lib64/python2.7/xmlrpclib.py", line 655, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 715, in dump_array
    dump(v, write)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 655, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 666, in dump_int
    raise OverflowError, "int exceeds XML-RPC limits"
<type 'exceptions.OverflowError'>: int exceeds XML-RPC limits

Comment 11 Gennadii Altukhov 2017-06-28 13:22:52 UTC
the bug is fixed in upstream. spacewalk.git master: b258e06ea3329b6782fdd21db77939380b3a85ca

Comment 16 Pavel Studeník 2017-06-30 12:45:53 UTC
Verified with rhn-check-2.0.2-17.el7.noarch

Comment 17 errata-xmlrpc 2017-08-01 22:19:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2039

Comment 18 Tomas Lestach 2019-10-30 14:09:56 UTC
*** Bug 1766722 has been marked as a duplicate of this bug. ***


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