Bug 1378903

Summary: rhn_check cannot report 'idle' time for PC with high CPU count
Product: Red Hat Enterprise Linux 7 Reporter: Marcel Gazdík <mgazdik>
Component: rhn-client-toolsAssignee: Gennadii Altukhov <galtukho>
Status: CLOSED ERRATA QA Contact: Pavel Studeník <pstudeni>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: galtukho, jhutar, lmiksik, mdekan, myoder, pstudeni, tlestach, xdmoon
Target Milestone: rc   
Target Release: 7.4   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rhn-client-tools-2.0.2-15-el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 22:19:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1395284    
Attachments:
Description Flags
workaround patch none

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. ***