Bug 617170 - [abrt] yum-3.2.27-18.fc14: __init__.py:1583:doLock:IOError: [Errno 13] Permission denied: '/var/run/yum.pid'
Summary: [abrt] yum-3.2.27-18.fc14: __init__.py:1583:doLock:IOError: [Errno 13] Permis...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: rawhide
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:48838eab
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-22 11:35 UTC by Michal Nowak
Modified: 2014-01-21 23:16 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-26 14:25:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (678 bytes, text/plain)
2010-07-22 11:36 UTC, Michal Nowak
no flags Details

Description Michal Nowak 2010-07-22 11:35:58 UTC
abrt version: 1.1.5
architecture: x86_64
cmdline: /usr/bin/python /usr/bin/yum -C --disablerepo=* --enablerepo=*-debug* --showduplicates --quiet provides /usr/lib/debug/.build-id/40/94ecbf6b2b507424b0d962f7d67367e875a8e0.debug /usr/lib/debug/.build-id/57/543dccefd2e4a9cb2a68c3fa01c8f84d2e1cc1.debug /usr/lib/debug/.build-id/72/f663595b703189b09e6b2d3790f858d4aa8ba9.debug /usr/lib/debug/.build-id/f4/b7ffd7ec22ff3356bfc5c34b9776a0dbe88593.debug
component: yum
executable: /usr/bin/yum
kernel: 2.6.35-0.49.rc5.git2.fc14.x86_64
package: yum-3.2.27-18.fc14
reason: __init__.py:1583:doLock:IOError: [Errno 13] Permission denied: '/var/run/yum.pid'
release: Fedora release 14 (Rawhide)
time: 1279797568
uid: 0

backtrace
-----
__init__.py:1583:doLock:IOError: [Errno 13] Permission denied: '/var/run/yum.pid'

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 258, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 97, in main
    base.doLock()
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1583, in doLock
    fd = open(lockfile, 'r')
IOError: [Errno 13] Permission denied: '/var/run/yum.pid'

Local variables in innermost frame:
root: '/'
self: <cli.YumBaseCli object at 0x18992d0>
lockfile: '/var/run/yum.pid'
mypid: '25841'

Comment 1 Michal Nowak 2010-07-22 11:36:00 UTC
Created attachment 433673 [details]
File: backtrace

Comment 2 seth vidal 2010-07-22 11:54:05 UTC
were you running that command as a user or as root?

Comment 3 Michal Nowak 2010-07-22 13:11:36 UTC
I *think* it came out of abrt which tried to create backtrace. `abrt-cli` was started as root and then the context may have changed to "abrtd". On the other hand it seems yum may had been blocked by SELinux:

type=AVC msg=audit(1279797567.933:21612): avc:  denied  { read } for  pid=25841 comm="yum" name="yum.pid" dev=dm-0 ino=2236729 scontext=unconfined_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file
type=SYSCALL msg=audit(1279797567.933:21612): arch=c000003e syscall=2 success=no exit=-13 a0=179be20 a1=0 a2=1b6 a3=0 items=0 ppid=25840 pid=25841 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=19 comm="yum" exe="/usr/bin/python" subj=unconfined_u:system_r:abrt_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1279797568.545:21613): avc:  denied  { read } for  pid=25855 comm="yum" name="yum.pid" dev=dm-0 ino=2236729 scontext=unconfined_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file
type=SYSCALL msg=audit(1279797568.545:21613): arch=c000003e syscall=2 success=no exit=-13 a0=15e18d0 a1=0 a2=1b6 a3=0 items=0 ppid=25854 pid=25855 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=19 comm="yum" exe="/usr/bin/python" subj=unconfined_u:system_r:abrt_t:s0-s0:c0.c1023 key=(null)

But sure yum should not traceback.

Comment 4 seth vidal 2010-07-22 14:32:14 UTC
could you try with this patch

http://fpaste.org/sm6w/

thanks

Comment 5 Michal Nowak 2010-07-22 14:50:03 UTC
I am not able to reproduce it anymore but that patch seem to me reasonable to catch exception I saw. Thanks.


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