Bug 22332 - rhn_register fails on unknown CPU speed
Summary: rhn_register fails on unknown CPU speed
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rhn_register
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact: Jay Turner
URL:
Whiteboard:
: 22820 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-12-15 07:15 UTC by Andrew Baumann
Modified: 2015-01-07 23:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-12-25 13:57:21 UTC
Embargoed:


Attachments (Terms of Use)

Description Andrew Baumann 2000-12-15 07:15:20 UTC
My CPU (Cyrix 6x86) doesn't report a clock rate ("cpu MHz") in /proc/cpuinfo. It seems that rhn_register tries to read it anyway and falls over when converting the empty string to a float:

Traceback (innermost last):
  File "/usr/lib/python1.5/site-packages/libglade.py", line 28, in __call__
    ret = apply(self.func, a)
  File "/usr/share/rhn/register/gui.py", line 447, in onProfilePagePrepare
    hardware.read_cpuinfo()
  File "/usr/share/rhn/register/hardware.py", line 106, in read_cpuinfo
    hwdict['speed']         = int(round(float(mhz_speed)))
ValueError: empty string for float()

Comment 1 Larry Fahnoe 2000-12-16 22:25:36 UTC
On an Alpha with rhn_register-1.0-7

Traceback (innermost last):
  File "/usr/share/rhn/register/tui.py", line 1080, in ?
    main()
  File "/usr/share/rhn/register/tui.py", line 1076, in main
    tui.run()
  File "/usr/share/rhn/register/tui.py", line 1033, in run
    win = self.windows[index](self.screen, self)
  File "/usr/share/rhn/register/tui.py", line 627, in __init__
    hardware.read_cpuinfo()
  File "/usr/share/rhn/register/hardware.py", line 133, in read_cpuinfo
    hwdict['speed']         = int(round(float(hz_speed))) / 1000000
ValueError: invalid literal for float(): 233357768 est.

here is proc/cpuinfo:
cpu                     : Alpha
cpu model               : EV45
cpu variation           : 7
cpu revision            : 0
cpu serial number       : 
system type             : Avanti
system variation        : 0
system revision         : 0
system serial number    : 
cycle frequency [Hz]    : 233357768 est.
timer frequency [Hz]    : 1024.00
page size [bytes]       : 8192
phys. address bits      : 34
max. addr. space #      : 63
BogoMIPS                : 230.16
kernel unaligned acc    : 4 (pc=fffffc00003c46b8,va=11ffffeb5)
user unaligned acc      : 0 (pc=0,va=0)
platform string         : AlphaStation 200 4/233
cpus detected           : 1


Comment 2 Jacek Cio3ek 2000-12-25 13:57:17 UTC
*** Bug 22820 has been marked as a duplicate of this bug. ***

Comment 3 Jay Turner 2001-03-02 17:54:14 UTC
Issue is resolved in the latest cut of the code available in beta and to be
shipped in the next public release.


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