Bug 378911 - yum-updatesd: local variable 'result' referenced before assignment
Summary: yum-updatesd: local variable 'result' referenced before assignment
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-rhn-plugin
Version: 5.1
Hardware: All
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: Justin Sherrill
QA Contact:
URL:
Whiteboard: GSSApproved ResovleBy=02/28/2008
: 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
TreeView+ depends on / blocked
 
Reported: 2007-11-12 22:06 UTC by daryl herzmann
Modified: 2018-11-14 13:14 UTC (History)
34 users (show)

Fixed In Version: RHBA-2008-0360
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-21 14:27:32 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0360 0 normal SHIPPED_LIVE yum-rhn-plugin bug fix update 2008-05-20 12:45:04 UTC

Description daryl herzmann 2007-11-12 22:06:40 UTC
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 14:43:00 UTC
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 11:59:30 UTC
Is this RHN (rhn.redhat.com) or RHN Satellite registered system?

Comment 3 daryl herzmann 2007-11-16 12:56:20 UTC
Hi Jan,

RHN hosted via a proxy.

daryl

Comment 4 Dave Miller 2007-11-17 20:34:26 UTC
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 20:35:53 UTC
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 20:39:10 UTC
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 08:13:20 UTC
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 08:21:13 UTC
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 21:36:45 UTC
*** Bug 384071 has been marked as a duplicate of this bug. ***

Comment 10 Justin Sherrill 2007-11-26 15:48:43 UTC
*** Bug 372811 has been marked as a duplicate of this bug. ***

Comment 11 Justin Sherrill 2007-11-26 18:00:08 UTC
*** Bug 370151 has been marked as a duplicate of this bug. ***

Comment 12 Justin Sherrill 2007-11-27 14:52:44 UTC
*** Bug 375151 has been marked as a duplicate of this bug. ***

Comment 13 Justin Sherrill 2007-11-27 16:52:50 UTC
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 06:48:28 UTC
QE ack for RHEL5.2.

Comment 16 Justin Sherrill 2007-12-04 15:45:35 UTC
*** Bug 407061 has been marked as a duplicate of this bug. ***

Comment 17 Need Real Name 2007-12-04 16:42:22 UTC
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 16:37:51 UTC
Created attachment 281351 [details]
Test package with fix

non-supported, non-signed test package

Comment 22 daryl herzmann 2007-12-07 16:56:01 UTC
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 09:18:53 UTC
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 13:16:26 UTC
(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 14:49:33 UTC
*** Bug 419541 has been marked as a duplicate of this bug. ***

Comment 28 Jan Hutař 2007-12-20 22:13:42 UTC
*** Bug 426381 has been marked as a duplicate of this bug. ***

Comment 29 Justin Sherrill 2007-12-21 22:07:50 UTC
*** Bug 426544 has been marked as a duplicate of this bug. ***

Comment 36 Justin Sherrill 2008-01-07 22:39:00 UTC
*** Bug 427848 has been marked as a duplicate of this bug. ***

Comment 37 Clifford Perry 2008-01-08 02:01:34 UTC
*** Bug 352641 has been marked as a duplicate of this bug. ***

Comment 41 daryl herzmann 2008-01-11 23:45:38 UTC
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 10:20:39 UTC
*** Bug 360031 has been marked as a duplicate of this bug. ***

Comment 43 AJ Hettema 2008-01-14 14:48:24 UTC
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 15:01:10 UTC
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 16:42:39 UTC
(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 19:34:52 UTC
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 19:28:26 UTC
*** Bug 426261 has been marked as a duplicate of this bug. ***

Comment 52 John Duncan 2008-02-21 18:25:51 UTC
Created attachment 295546 [details]
yum update fails 'local variable 'result' referenced before assignment'

Comment 57 John Matthews 2008-03-05 20:47:41 UTC
*** Bug 416271 has been marked as a duplicate of this bug. ***

Comment 58 John Matthews 2008-03-05 20:48:24 UTC
*** Bug 432099 has been marked as a duplicate of this bug. ***

Comment 60 Justin Sherrill 2008-03-07 15:04:48 UTC
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 11:26:23 UTC
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 14:15:38 UTC
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 15:46:38 UTC
Daryl, this bug is still being tested by QE. It should be verified and closed
very soon.

Comment 70 Cameron Meadors 2008-04-22 15:10:19 UTC
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 14:11:36 UTC
*** Bug 443784 has been marked as a duplicate of this bug. ***

Comment 72 Justin Sherrill 2008-04-23 16:28:54 UTC
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 16:30:32 UTC
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 14:27:32 UTC
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 15:36:25 UTC
*** Bug 426190 has been marked as a duplicate of this bug. ***

Comment 80 John Matthews 2008-06-11 15:37:31 UTC
*** Bug 421051 has been marked as a duplicate of this bug. ***

Comment 81 John Matthews 2008-06-11 15:52:19 UTC
*** Bug 413591 has been marked as a duplicate of this bug. ***

Comment 83 Pradeep Kilambi 2008-08-05 19:47:16 UTC
*** Bug 420671 has been marked as a duplicate of this bug. ***

Comment 84 Miroslav Suchý 2010-04-28 08:46:53 UTC
*** 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.