Bug 798215 - yum update crashes due to UTF-8 char
Summary: yum update crashes due to UTF-8 char
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-28 10:59 UTC by Didier Couderc
Modified: 2018-11-28 20:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:53:55 UTC
Target Upstream Version:


Attachments (Terms of Use)
abrt crash report (5.33 KB, text/plain)
2012-02-28 10:59 UTC, Didier Couderc
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0857 0 normal SHIPPED_LIVE yum bug fix and enhancement update 2012-06-19 20:48:27 UTC

Description Didier Couderc 2012-02-28 10:59:49 UTC
Created attachment 566291 [details]
abrt crash report

Description of problem:
yum update crashes with the following backtrace

Version-Release number of selected component (if applicable):
_init__.py:2000:downloadPkgs:UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 52: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 276, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 211, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 498, in doTransaction
    problems = self.downloadPkgs(downloadpkgs, callback_total=self.download_callback_total_cb)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 2000, in downloadPkgs
    adderror(po, str(e))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 52: ordinal not in range(128)

Setting LANG=C instead of fr_FR@euro and restarting the update worked.

Comment 2 James Antill 2012-03-02 21:55:36 UTC
 This is a simple str => exception2msg upstream. Should fix it.

Comment 6 Karel Srot 2012-03-06 13:53:01 UTC
In which scenario is the updated function adderror(po, str(e)) used? 
I tried to reproduce the bug with the same update and LANG settings but it didn't work. Seems that it was some occasional error.

Comment 7 Zdeněk Pavlas 2012-03-06 14:13:28 UTC
That piece of code handles mostly messages from urlgrabber, these are AFAIK not localized. 'Insufficient space in download directory' from Yum is localized, so that should trigger the bug.

Comment 10 errata-xmlrpc 2012-06-20 13:53:55 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.

http://rhn.redhat.com/errata/RHBA-2012-0857.html


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