This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 378911 - yum-updatesd: local variable 'result' referenced before assignment
yum-updatesd: local variable 'result' referenced before assignment
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-rhn-plugin (Show other bugs)
5.1
All Linux
urgent Severity high
: rc
: ---
Assigned To: Justin Sherrill
GSSApproved ResovleBy=02/28/2008
: ZStream
: 352641 360031 370151 372811 375151 384071 407061 413591 416271 419541 420671 421051 426190 426261 426381 426544 427848 432099 443784 586531 (view as bug list)
Depends On:
Blocks: 428323
  Show dependency treegraph
 
Reported: 2007-11-12 17:06 EST by daryl herzmann
Modified: 2015-01-29 06:12 EST (History)
34 users (show)

See Also:
Fixed In Version: RHBA-2008-0360
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-21 10:27:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Python traceback (1.50 KB, text/plain)
2007-11-15 09:43 EST, daryl herzmann
no flags Details
python traceback trying to use yum (821 bytes, text/plain)
2007-11-17 15:34 EST, Dave Miller
no flags Details
this is traceback of system-config-packages command (2.00 KB, application/octet-stream)
2007-12-04 11:42 EST, Need Real Name
no flags Details
Test package with fix (49.45 KB, application/x-rpm)
2007-12-07 11:37 EST, Justin Sherrill
no flags Details
traceback of system-config-packages (3.33 KB, text/plain)
2007-12-10 04:18 EST, Need Real Name
no flags Details
logfile of rhn_check (3.53 KB, text/plain)
2008-01-14 10:01 EST, AJ Hettema
no flags Details
yum update fails 'local variable 'result' referenced before assignment' (1.89 KB, application/octet-stream)
2008-02-21 13:25 EST, John Duncan
no flags Details
traceback error (3.97 KB, application/octet-stream)
2008-04-15 07:26 EDT, Need Real Name
no flags Details

  None (edit)
Description daryl herzmann 2007-11-12 17:06:40 EST
Since upgrading to RHEL5.1, I have been seeing these occasionally in my log files:

Nov 12 15:39:29 XXXXX yum-updatesd: error getting update info: local variable
'result' referenced before assignment

Looking at the source code, it is not clear to me where this could be happening.
Sorry that I am not of much more help.  Since the RHEL5.1 update, it has
happened only a few times on each machine.  Must be due to some transient
failure with RHN or the local network?

Thought I would bz it regardless.  thanks!
Comment 1 daryl herzmann 2007-11-15 09:43:00 EST
Created attachment 259841 [details]
Python traceback

While doing random machine install of a package, I got a traceback!
Comment 2 Jan Pazdziora 2007-11-16 06:59:30 EST
Is this RHN (rhn.redhat.com) or RHN Satellite registered system?
Comment 3 daryl herzmann 2007-11-16 07:56:20 EST
Hi Jan,

RHN hosted via a proxy.

daryl
Comment 4 Dave Miller 2007-11-17 15:34:26 EST
Created attachment 262481 [details]
python traceback trying to use yum

Getting errors here too.  RHEL 5.1 behind a local RHN proxy.
Comment 5 John T. Rose 2007-11-17 15:35:53 EST
Jan, I'm seeing these errors on all my 5.1 systems. Some use a proxy and others
don't but all are hosted.
Comment 6 Dave Miller 2007-11-17 15:39:10 EST
I just switched the machine I was playing with off our proxy onto the central
RHN server, and I'm still getting this error, so I can confirm it's not limited
to proxy.
Comment 7 Dave Miller 2007-11-21 03:13:20 EST
ok, so troubleshooting this on IRC (#rhel on freenode), the following seems to
clear this up:

1) on the proxy server:
   a) add "range_offset_limit -1 KB" to /etc/squid/squid.conf
   b) service rhn-proxy stop
   c) rm -rf /var/spool/squid/*
   d) service rhn-proxy start
2) on the affected machines:
   a) yum clean all

step 2 is what I missed when testing the previously-on-proxy machine on hosted.

So I have a workaround that gets my machines working again, but something in the
RHEL 5.1 update apparently caused this.

I've got RHN Proxy 4.2.2.  Did it need to be updated to handle 5.1?
Comment 8 John T. Rose 2007-11-21 03:21:13 EST
Just so that everyone is clear the above fix corrects a known problem that
persistently causes the python traceback but it does not relate in any way I
know to the original bz problem described in this bug. I still see apparently
random occurrences of this traceback on both systems talking directly to RHN and
on systems going through an RHN proxy server.
Comment 9 Justin Sherrill 2007-11-21 16:36:45 EST
*** Bug 384071 has been marked as a duplicate of this bug. ***
Comment 10 Justin Sherrill 2007-11-26 10:48:43 EST
*** Bug 372811 has been marked as a duplicate of this bug. ***
Comment 11 Justin Sherrill 2007-11-26 13:00:08 EST
*** Bug 370151 has been marked as a duplicate of this bug. ***
Comment 12 Justin Sherrill 2007-11-27 09:52:44 EST
*** Bug 375151 has been marked as a duplicate of this bug. ***
Comment 13 Justin Sherrill 2007-11-27 11:52:50 EST
Committed in rev 134216.

Modified code such that if an URLGrab exception is received when trying to grab
a file, the next mirror is tried.  If all mirrors are exhausted, then the last
exception thrown is raised. 

If it is not a URLGrab exception being thrown, then it is not caught by the
problematic function, but by the calling function. (For example if ctrl-c is
hit).    For these cases, the next mirrors are not tried.
Comment 15 Jay Turner 2007-12-04 01:48:28 EST
QE ack for RHEL5.2.
Comment 16 Justin Sherrill 2007-12-04 10:45:35 EST
*** Bug 407061 has been marked as a duplicate of this bug. ***
Comment 17 Need Real Name 2007-12-04 11:42:22 EST
Created attachment 277141 [details]
this is traceback of system-config-packages command

I'm using yum under proxy internet connection,
i have two node cluster registered and cannot upgrade system software via rhn.
Comment 21 Justin Sherrill 2007-12-07 11:37:51 EST
Created attachment 281351 [details]
Test package with fix

non-supported, non-signed test package
Comment 22 daryl herzmann 2007-12-07 11:56:01 EST
This package resolved the "duplicate messages" bug mentioned in bz #415801 ,
I'll let it run for a while and see if the "result" bug mentioned here is now
fixed as well.  thanks!
Comment 23 Need Real Name 2007-12-10 04:18:53 EST
Created attachment 282541 [details]
traceback of system-config-packages

After apply upgrade of new yum-rhn-plugin still doesn't work; I'm behind http
squid proxy to reach rhn.
Comment 24 Justin Sherrill 2007-12-10 08:16:26 EST
(In reply to comment #23)
> Created an attachment (id=282541) [edit]
> traceback of system-config-packages
> 
> After apply upgrade of new yum-rhn-plugin still doesn't work; I'm behind http
> squid proxy to reach rhn.

The problem you are seeing now is an SSL/Connection issue that is separate from
the problem reported in this bug.  The only reason you would have seen this
"result" error is if you were having a 2nd connection issue that this was
covering up.  This bug merely concealed a connection problem (and it's
backtrace).  Now that it is fixed, you are seeing the true cause of your
connection problem.  I recommend you contact support about your SSL issue.

Thanks!
-Justin
Comment 25 Justin Sherrill 2007-12-11 09:49:33 EST
*** Bug 419541 has been marked as a duplicate of this bug. ***
Comment 28 Jan Hutař 2007-12-20 17:13:42 EST
*** Bug 426381 has been marked as a duplicate of this bug. ***
Comment 29 Justin Sherrill 2007-12-21 17:07:50 EST
*** Bug 426544 has been marked as a duplicate of this bug. ***
Comment 36 Justin Sherrill 2008-01-07 17:39:00 EST
*** Bug 427848 has been marked as a duplicate of this bug. ***
Comment 37 Clifford Perry 2008-01-07 21:01:34 EST
*** Bug 352641 has been marked as a duplicate of this bug. ***
Comment 41 daryl herzmann 2008-01-11 18:45:38 EST
Will an errata be pushed for this regression?  The big problem is that when the
bug hits during errata install, it will cause the errata install to fail and yum
won't retry the failed action.  Example:

https://rhn.redhat.com/network/systems/details/history/event.pxt?sid=1006860625&hid=153352961

This action's status is: Failed.
The client picked up this action on 2008-01-11 06:43:17 CST.
The client completed this action on 2008-01-11 06:43:52 CST.
Client execution returned "Fatal error in Python code occured [[6]]" (code -1)

On the system itself, you get the traceback from this bug's error.

Glancing at this bug's history, it is not clear redhat understands that this bug
will cause errata application to fail thus leaving systems vulnerable.

thanks!
Comment 42 Jan Hutař 2008-01-14 05:20:39 EST
*** Bug 360031 has been marked as a duplicate of this bug. ***
Comment 43 AJ Hettema 2008-01-14 09:48:24 EST
hi guys,

after searching for exactly the same problem, I found this bz. It's exactly the 
same problem as I have, and I have tried the patch, but it didn't resolve 
anything. Still got the same error: Client execution returned "Fatal error in 
Python code occured [[6]]" (code -1)

Could someone please help me along with this?
Comment 44 AJ Hettema 2008-01-14 10:01:10 EST
Created attachment 291590 [details]
logfile of rhn_check

after installing the non-verified patch I still cannot run rhn_check. This
attachment of the rhn_check -v that I ran.
Comment 45 Justin Sherrill 2008-01-15 11:42:39 EST
(In reply to comment #44)
> Created an attachment (id=291590) [edit]
> logfile of rhn_check
> 
> after installing the non-verified patch I still cannot run rhn_check. This
> attachment of the rhn_check -v that I ran.

Aj, 

The fact you are seeing the new error means that the patch worked correctly and
you are seeing a 2nd issue.  Try running 'yum clean all' and then try updating
again.

-Justin
Comment 48 Dag Wieers 2008-01-18 14:34:52 EST
At a customer site we have experienced the same problem caused by a BlueCoat
contentfilter. We suspect that the BlueCoat is doing something man-in-the-middle
that breaks SSL in peculiar ways.

Besides having this bug in the code, the patch did not fix the real issue that
triggers this bug. Our work-around was to disable SSL (or the https) connection
the way that up2date used to do in the past.

To do this, go into the file:

    /etc/sysconfig/rhn/up2date

and change the entry:

    serverURL=https://xmlrpc.rhn.redhat.com/XMLRPC

into:

    serverURL=http://xmlrpc.rhn.redhat.com/XMLRPC

This will effectively disable the SSL connection.

Beware however that you are susceptible for man-in-the-middle attacks and even
though the RPM packages are signed, people could be feeding you different Red
Hat signed packages than you would expect or something :-)

Let me know if this works for you as well.
Comment 51 Pradeep Kilambi 2008-01-30 14:28:26 EST
*** Bug 426261 has been marked as a duplicate of this bug. ***
Comment 52 John Duncan 2008-02-21 13:25:51 EST
Created attachment 295546 [details]
yum update fails 'local variable 'result' referenced before assignment'
Comment 57 John Matthews 2008-03-05 15:47:41 EST
*** Bug 416271 has been marked as a duplicate of this bug. ***
Comment 58 John Matthews 2008-03-05 15:48:24 EST
*** Bug 432099 has been marked as a duplicate of this bug. ***
Comment 60 Justin Sherrill 2008-03-07 10:04:48 EST
Just so everyone is clear, this has been released as an Async errata and is
available (fully supported) here:

https://rhn.redhat.com/rhn/errata/details/Details.do?eid=6568
Comment 65 Need Real Name 2008-04-15 07:26:23 EDT
Created attachment 302436 [details]
traceback error

Behind BluCoat :After change up2date file and substitute https with http still
doesn't work
Comment 67 daryl herzmann 2008-04-16 10:15:38 EDT
Hi Justin,

I am probably missing something, but why is this bug still open and in ON_QA
state? Can't it be closed?

thanks,
  daryl
Comment 68 Chris Ward 2008-04-16 11:46:38 EDT
Daryl, this bug is still being tested by QE. It should be verified and closed
very soon.
Comment 70 Cameron Meadors 2008-04-22 11:10:19 EDT
I have only ever seen this bug when trying to communicate with an RHN server
that was broken.  I saw the error again last week, but could not reproduce it. 
Is there a definitive way to reproduce this error?
Comment 71 John Matthews 2008-04-23 10:11:36 EDT
*** Bug 443784 has been marked as a duplicate of this bug. ***
Comment 72 Justin Sherrill 2008-04-23 12:28:54 EDT
Cameron,

The error would occur whenever there was a communication error with rhn.  One
way to reproduce is to hit ctrl-c in the middle of a package transfer, or use
the wrong SSL CA Certificate when connecting to hosted or a sat.

-Justin
Comment 73 Justin Sherrill 2008-04-23 12:30:32 EDT
Daryl,

Sadly this bz can't be closed yet since 5.2 hasn't been released.  It should be
closed upon 5.2's release.

-Justin
Comment 76 errata-xmlrpc 2008-05-21 10:27:32 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0360.html
Comment 79 John Matthews 2008-06-11 11:36:25 EDT
*** Bug 426190 has been marked as a duplicate of this bug. ***
Comment 80 John Matthews 2008-06-11 11:37:31 EDT
*** Bug 421051 has been marked as a duplicate of this bug. ***
Comment 81 John Matthews 2008-06-11 11:52:19 EDT
*** Bug 413591 has been marked as a duplicate of this bug. ***
Comment 83 Pradeep Kilambi 2008-08-05 15:47:16 EDT
*** Bug 420671 has been marked as a duplicate of this bug. ***
Comment 84 Miroslav Suchý 2010-04-28 04:46:53 EDT
*** Bug 586531 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.