Bug 832195 - Yum fails to print an error message with a non-ascii filename
Yum fails to print an error message with a non-ascii filename
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Fedora Packaging Toolset Team
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-14 15:50 EDT by Göran Uddeborg
Modified: 2014-01-21 18:22 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-09 03:12:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Göran Uddeborg 2012-06-14 15:50:15 EDT
Description of problem:
When running a yum which fails because another yum has a lock, I get a Python traceback rather than an error message explaining the problem.

Version-Release number of selected component (if applicable):
yum-3.4.3-23.fc17.noarch

How reproducible:
Every time.

Steps to Reproduce:
1. yum list & # Or something else that will lock for a while
2. LANG=sv_SE.utf8 yum info nettle
  
Actual results:
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 321, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 124, in main
    base.doLock()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1976, in doLock
    msg = _('Existing lock %s: another copy is running as pid %s.') % (lockfile, oldpid)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128)
Exit 1


Expected results:
A message
  Existerande lås <someFile>: en annan kopia kör som pid <pid>
for some values of someFile and pid.

Additional info:
There are a couple of similar reports already, but most of them have been closed.  Since this still happens, I guess this is in some way different.
Comment 1 Zdeněk Pavlas 2012-06-15 06:26:07 EDT
Hi, I think you may have non-ascii characters in your userid.
Could you run this and post the result?  Thanks!

~$ python -c 'import os,pwd;print repr(pwd.getpwuid(os.geteuid())[0])'
Comment 2 Göran Uddeborg 2012-06-15 15:36:13 EDT
I do indeed; I use my first name as userid:

mimmi$ python -c 'import os,pwd;print repr(pwd.getpwuid(os.geteuid())[0])'
'g\xc3\xb6ran'

I'm surprised that fact related to the error I reported here.  The Swedish translation of

  Existing lock %s: another copy is running as pid %s.

is

  Existerande lås %s: en annan kopia kör som pid %s.

The fourteenth character is indeed non-ascii.  So I thought it was that string it failed to decode.

But when testing on another account, it does indeed work as expected.  I get the Swedish translation of the error message printed, and yum keeps waiting rather than crashing.
Comment 3 Fedora Update System 2012-06-25 04:31:43 EDT
yum-3.4.3-28.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/yum-3.4.3-28.fc17
Comment 4 Fedora Update System 2012-06-27 23:41:21 EDT
yum-3.4.3-28.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Göran Uddeborg 2012-07-02 12:05:09 EDT
The problem is gone in -28.

Is this bugzilla waiting for something more?  Most of the time I see bugzillas closed automatically when an updated goes from testing to stable.  But this update went directly to stable, and doesn't seem to have been automatically closed.

If it waits for me, I'm saying I'm happy with the fix! :-)
Comment 6 Zdeněk Pavlas 2012-07-09 03:12:13 EDT
Thanks, closing!

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