Bug 108961

Summary: The up2date program is failing with a Python stack trace.
Product: Red Hat Enterprise Linux 4 Reporter: Narsi Subramanian <narsis>
Component: up2dateAssignee: Adrian Likins <alikins>
Status: CLOSED CURRENTRELEASE QA Contact: Fanny Augustin <fmoquete>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: rhn-bugs, smartin, tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-02 16:26:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
rhn logs none

Description Narsi Subramanian 2003-11-03 20:01:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Description of problem:
 Running the up2date command returns the stack trace:

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/up2date_client/gui.py", line 404, in
onChannelsPageNext
   refreshCallback = self.__refreshCallback)
 File "/usr/share/rhn/up2date_client/up2date.py", line 1771, in  
getUpdatedPackageList
   refreshCallback)
 File "/usr/share/rhn/up2date_client/up2date.py", line 1002, in getHeaders
   hdr, sourcetype = doCall(headerSource.getHeader, pkg)
 File "/usr/share/rhn/up2date_client/up2date.py", line 426, in doCall
   (errCode, errMsg ) = rhnHTTPlib.reportError(e.headers)
 File "/usr/share/rhn/up2date_client/rhnHTTPlib.py", line 314, in
reportError
   if headers.has_key(s):
AttributeError: 'None' object has no attribute 'has_key'
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/up2date_client/gui.py", line 444, in  
onSkippedPagePrepare
   maxlength = max(map(lambda x: len(x[0][0]), self.skipPkgList)) * 8
ValueError: min() or max() of empty sequence

root@qaunixsa1:/people/ssimpson# uname -a
Linux qaunixsa1 2.4.9-e.3 #1 Fri May 3 17:02:43 EDT 2002 i686 unknown 
 I removed all the files from /var/spool/up2date and I got the exact
same  
problem. I still think the problem is an error in the python code. The
python  
code should NEVER create a stack trace when an array has 0 elements in
it.  
Anyways, here is the output of "rpm -V up2date up2date-gnome":

SM5....T c /etc/sysconfig/rhn/up2date
S.5....T   /usr/share/rhn/up2date_client/bootloadercfg.pyc
S.5....T   /usr/share/rhn/up2date_client/checkbootloader.pyc
S.5....T   /usr/share/rhn/up2date_client/clap.pyc
S.5....T   /usr/share/rhn/up2date_client/config.pyc
S.5....T   /usr/share/rhn/up2date_client/depSolver.pyc
S.5....T   /usr/share/rhn/up2date_client/getMethod.pyc
S.5....T   /usr/share/rhn/up2date_client/gpgUtils.pyc
S.5....T   /usr/share/rhn/up2date_client/hardware.pyc
S.5....T   /usr/share/rhn/up2date_client/headers.pyc
S.5....T   /usr/share/rhn/up2date_client/iutil.pyc
S.5....T   /usr/share/rhn/up2date_client/lilo.pyc
S.5....T   /usr/share/rhn/up2date_client/newelilocfg.pyc
S.5....T   /usr/share/rhn/up2date_client/newgrubcfg.pyc
S.5....T   /usr/share/rhn/up2date_client/newlilocfg.pyc
S.5....T   /usr/share/rhn/up2date_client/packageList.pyc
S.5....T   /usr/share/rhn/up2date_client/rhnChannel.pyc
S.5....T   /usr/share/rhn/up2date_client/rhnDefines.pyc
S.5....T   /usr/share/rhn/up2date_client/rhnErrata.pyc
S.5....T   /usr/share/rhn/up2date_client/rhnHTTPlib.pyc
S.5....T   /usr/share/rhn/up2date_client/rhnHardware.pyc
S.5....T   /usr/share/rhn/up2date_client/rhnPackageInfo.pyc
S.5....T   /usr/share/rhn/up2date_client/rpcServer.pyc
S.5....T   /usr/share/rhn/up2date_client/rpmSource.pyc
S.5....T   /usr/share/rhn/up2date_client/rpmUtils.pyc
S.5....T   /usr/share/rhn/up2date_client/translate.pyc
S.5....T   /usr/share/rhn/up2date_client/up2date.pyc
S.5....T   /usr/share/rhn/up2date_client/up2dateAuth.pyc
S.5....T   /usr/share/rhn/up2date_client/up2dateBatch.pyc
S.5....T   /usr/share/rhn/up2date_client/up2dateErrors.pyc
S.5....T   /usr/share/rhn/up





Version-Release number of selected component (if applicable):
up2date-2.8.46.3-1.2.1AS

How reproducible:
Always

Steps to Reproduce:
1.Run up2date.
2.
3.
    

Additional info:

Comment 1 Adrian Likins 2003-11-04 19:03:04 UTC
its a python bug, long since fixed in current code.

But there still something wrong with that machines setup to be
getting empty packages list.

Comment 2 Narsi Subramanian 2003-11-17 20:50:11 UTC
Created attachment 96027 [details]
rhn logs

Comment 3 Narsi Subramanian 2003-11-17 20:50:53 UTC
Adrian: What do you advise?. In the mean time the customer blew the
system and re-registered the box. They still see the trace and
appreciate any feedback. Also, attaching the rhn.tar file that was
included.

-narsi

root@qaunixsa2:/people/ssimpson# rpm -qa |grep rhn
rhn_register-2.7.9-7.x.2
rhn_register-gnome-2.7.9-7.x.2
root@qaunixsa2:/people/ssimpson#  
Also, deleting the profile on the RedHat site and re-registering it
and then trying to get the updates gave me the same stack trace. Note
that I am not using the https URL for up2date; I'm using the http URL.
You should see this in the previous rhn_register file I sent you. I
don't know if this makes any difference.