Bug 719467 - Yum tracebacks when trying to stat() a yumdb entry and getting EACCES (shouldn't happen).
Summary: Yum tracebacks when trying to stat() a yumdb entry and getting EACCES (should...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 15
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Packaging Toolset Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:8825848aa16b04452acf8ce50aa...
: 719044 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-07 00:05 UTC by Paul DeStefano
Modified: 2014-01-21 23:18 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 17:58:43 UTC
Type: ---


Attachments (Terms of Use)

Description Paul DeStefano 2011-07-07 00:05:56 UTC
abrt version: 2.0.3
architecture:   x86_64
cmdline:        
component:      yum
executable:     /usr/bin/yum
kernel:         2.6.38.8-32.fc15.x86_64
os_release:     Fedora release 15 (Lovelock)
package:        yum-3.2.29-6.fc15
reason:         misc.py:943:stat_f:OSError: [Errno 13] Permission denied: '/var/lib/yum/yumdb/y/d449ffdd4a874c7c398ceb52023d6718aa1876ad-yum-plugin-remove-with-leaves-1.1.30-2.fc15-noarch/from_repo'
time:           Wed Jul  6 16:54:08 2011
uid:            13013
username:       pdestefa

backtrace:
:misc.py:943:stat_f:OSError: [Errno 13] Permission denied: '/var/lib/yum/yumdb/y/d449ffdd4a874c7c398ceb52023d6718aa1876ad-yum-plugin-remove-with-leaves-1.1.30-2.fc15-noarch/from_repo'
:
: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 267, in user_main
:    errcode = main(args)
:  File "/usr/share/yum-cli/yummain.py", line 120, in main
:    result, resultmsgs = base.doCommands()
:  File "/usr/share/yum-cli/cli.py", line 432, in doCommands
:    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
:  File "/usr/share/yum-cli/yumcommands.py", line 341, in doCommand
:    '=' : clir, 'not in' : clie})
:  File "/usr/share/yum-cli/output.py", line 671, in listPkgs
:    self.infoOutput(pkg, highlight=highlight)
:  File "/usr/share/yum-cli/output.py", line 589, in infoOutput
:    if pkg.repoid == 'installed' and 'from_repo' in pkg.yumdb_info:
:  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1833, in __contains__
:    x = self.get(attr)
:  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1863, in get
:    res = self._read(attr)
:  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1780, in _read
:    info = misc.stat_f(fn)
:  File "/usr/lib/python2.7/site-packages/yum/misc.py", line 943, in stat_f
:    return os.stat(filename)
:OSError: [Errno 13] Permission denied: '/var/lib/yum/yumdb/y/d449ffdd4a874c7c398ceb52023d6718aa1876ad-yum-plugin-remove-with-leaves-1.1.30-2.fc15-noarch/from_repo'
:
:Local variables in innermost frame:
:e: OSError(13, 'Permission denied')
:filename: '/var/lib/yum/yumdb/y/d449ffdd4a874c7c398ceb52023d6718aa1876ad-yum-plugin-remove-with-leaves-1.1.30-2.fc15-noarch/from_repo'

comment:
:yum erase of a single leave with a single dependancy 
:did not remove the non-leaf package as expected.  So I tried
:to get information about the remove-with-leaves plugin using:
:
: yum info yum-plugin-remove-with-leaves
:
:This command produces this error:
:
:Loaded plugins: changelog, langpacks, presto, refresh-packagekit, remove-with-leaves, show-leaves
:Installed Packages
:Name        : yum-plugin-remove-with-leaves
:Arch        : noarch
:Version     : 1.1.30
:Release     : 2.fc15
:Size        : 26 k
:Repo        : installed
: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 267, in user_main
:    errcode = main(args)
:  File "/usr/share/yum-cli/yummain.py", line 120, in main
:    result, resultmsgs = base.doCommands()
:  File "/usr/share/yum-cli/cli.py", line 432, in doCommands
:    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
:  File "/usr/share/yum-cli/yumcommands.py", line 341, in doCommand
:    '=' : clir, 'not in' : clie})
:  File "/usr/share/yum-cli/output.py", line 671, in listPkgs
:    self.infoOutput(pkg, highlight=highlight)
:  File "/usr/share/yum-cli/output.py", line 589, in infoOutput
:    if pkg.repoid == 'installed' and 'from_repo' in pkg.yumdb_info:
:  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1833, in __contains__
:    x = self.get(attr)
:  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1863, in get
:    res = self._read(attr)
:  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1780, in _read
:    info = misc.stat_f(fn)
:  File "/usr/lib/python2.7/site-packages/yum/misc.py", line 943, in stat_f
:    return os.stat(filename)
:OSError: [Errno 13] Permission denied: '/var/lib/yum/yumdb/y/d449ffdd4a874c7c398ceb52023d6718aa1876ad-yum-plugin-remove-with-leaves-1.1.30-2.fc15-noarch/from_repo'
:
:Now, ALL yum info commands for installed packages crash yum
:
:yum info installed |grep leaves
:              : leaves, show-leaves
: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 267, in user_main
:    errcode = main(args)
:  File "/usr/share/yum-cli/yummain.py", line 120, in main
:    result, resultmsgs = base.doCommands()
:  File "/usr/share/yum-cli/cli.py", line 432, in doCommands
:    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
:  File "/usr/share/yum-cli/yumcommands.py", line 341, in doCommand
:    '=' : clir, 'not in' : clie})
:  File "/usr/share/yum-cli/output.py", line 671, in listPkgs
:    self.infoOutput(pkg, highlight=highlight)
:  File "/usr/share/yum-cli/output.py", line 589, in infoOutput
:    if pkg.repoid == 'installed' and 'from_repo' in pkg.yumdb_info:
:  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1833, in __contains__
:    x = self.get(attr)
:  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1863, in get
:    res = self._read(attr)
:  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1780, in _read
:    info = misc.stat_f(fn)
:  File "/usr/lib/python2.7/site-packages/yum/misc.py", line 943, in stat_f
:    return os.stat(filename)
:OSError: [Errno 13] Permission denied: '/var/lib/yum/yumdb/G/7f38cd79a6b04cdcedc50377033720762098a99c-GraphicsMagick-1.3.12-4.fc15-x86_64/from_repo'
:
:
:running as root produces no error

Comment 1 James Antill 2011-07-07 16:10:56 UTC
*** Bug 719044 has been marked as a duplicate of this bug. ***

Comment 2 James Antill 2011-07-07 16:15:07 UTC
Can either of you give me a "ls -ld" on the filename, and all preceeding paths?

Eg. using /var/lib/yum/yumdb/y/d449ffdd4a874c7c398ceb52023d6718aa1876ad-yum-plugin-remove-with-leaves-1.1.30-2.fc15-noarch/from_repo as an example:

ls -ld /var/lib/yum/yumdb/y/d449ffdd4a874c7c398ceb52023d6718aa1876ad-yum-plugin-remove-with-leaves-1.1.30-2.fc15-noarch/from_repo
ls -ld /var/lib/yum/yumdb/y/d449ffdd4a874c7c398ceb52023d6718aa1876ad-yum-plugin-remove-with-leaves-1.1.30-2.fc15-noarch
ls -ld /var/lib/yum/yumdb/y
ls -ld /var/lib/yum/yumdb
ls -ld /var/lib/yum
ls -ld /var/lib
ls -ld /var

Comment 3 long 2011-07-07 17:19:25 UTC
I think this is what you wanted:

[root@raptor /]# ls -ld /var/lib/yum/yumdb/x/4b4b0ba029e841511ccfc325d93171af4dc488c0-xorg-x11-xkb-extras-7.5-3.fc15-x86_64/from_repo
-rw-------. 1 root root 6 Jul  5 10:07 /var/lib/yum/yumdb/x/4b4b0ba029e841511ccfc325d93171af4dc488c0-xorg-x11-xkb-extras-7.5-3.fc15-x86_64/from_repo
[root@raptor /]# ls -ld /var/lib/yum/yumdb/x/4b4b0ba029e841511ccfc325d93171af4dc488c0-xorg-x11-xkb-extras-7.5-3.fc15-x86_64/
drwx------. 2 root root 4096 Jul  5 10:07 /var/lib/yum/yumdb/x/4b4b0ba029e841511ccfc325d93171af4dc488c0-xorg-x11-xkb-extras-7.5-3.fc15-x86_64/
[root@raptor /]# ls -ld /var/lib/yum/yumd^C
[root@raptor /]# ls -ld /var/lib/yum/yumdb/x/
drwxr-xr-x. 92 root root 16384 Jul  5 10:07 /var/lib/yum/yumdb/x/
[root@raptor /]# ls -ld /var/lib/yum/yumdb/
drwxr-xr-x. 36 root root 4096 May 26 17:29 /var/lib/yum/yumdb/
[root@raptor /]# ls -ld /var/lib/yum/
drwxr-xr-x. 6 root root 4096 Jul  5 10:07 /var/lib/yum/
[root@raptor /]# ls -ld /var/lib/
drwxr-xr-x. 45 root root 4096 Jun 28 08:50 /var/lib/
[root@raptor /]# ls -ld /var/
drwxr-xr-x. 18 root root 4096 May 26 17:25 /var/
[root@raptor /]# ls -ld /
dr-xr-xr-x. 24 root root 4096 Jul  6 15:08 /

Comment 4 Paul DeStefano 2011-07-07 17:43:15 UTC
Sure:

> ls -ld /var
drwxr-xr-x. 19 root root 4096 Jun 26 01:49 /var/
> ls -ld /var/lib
drwxr-xr-x. 42 root root 4096 Jul  1 13:15 /var/lib/
> ls -ld /var/lib/yum
drwxr-xr-x. 6 root root 4096 Jul  6 16:52 /var/lib/yum/
> ls -ld /var/lib/yum/yumdb
drwxrwxr-x. 37 root root 4096 Jul  6 16:21 /var/lib/yum/yumdb/
> ls -ld /var/lib/yum/yumdb/y
drwxrwxr-x. 15 root root 4096 Jun 29 22:03 /var/lib/yum/yumdb/y/
> ls -ld /var/lib/yum/yumdb/y/d449ffdd4a874c7c398ceb52023d6718aa1876ad-yum-plugin-remove-with-leaves-1.1.30-2.fc15-noarch
drwx------. 2 root root 4096 Jun 26 15:51 /var/lib/yum/yumdb/y/d449ffdd4a874c7c398ceb52023d6718aa1876ad-yum-plugin-remove-with-leaves-1.1.30-2.fc15-noarch/
> ls -ld /var/lib/yum/yumdb/y/d449ffdd4a874c7c398ceb52023d6718aa1876ad-yum-plugin-remove-with-leaves-1.1.30-2.fc15-noarch/from_repo
ls: cannot access /var/lib/yum/yumdb/y/d449ffdd4a874c7c398ceb52023d6718aa1876ad-yum-plugin-remove-with-leaves-1.1.30-2.fc15-noarch/from_repo: Permission denied

Thanks for your help.  I have a couple theories, but nothing fits perfectly.

Comment 5 James Antill 2011-07-08 18:26:28 UTC
Ok, so it's just the last directories ... can you run the "umask" command, and tell me what it says ... or tell me if you know you do anything to that as root?

Comment 6 long 2011-07-08 19:38:00 UTC
All of my umasks are 077.  I don't believe I've done anything as root to those directories in particular.

Comment 7 Paul DeStefano 2011-07-08 20:25:34 UTC
:-) Yep, same here.

Well, *my normal user* umask is 077.   I use sudo, so when I run 'sudo yum install ...' it runs with umask 077.

But, it only fits if yum doesn't control permissions on it's database, which would be unexpected.  This isn't a problem with RPM is it?  If it is--if rpm also does not control it's database permissions--then we have an even bigger problem.

Comment 8 James Antill 2011-07-11 18:43:36 UTC
 Yeh, I just wanted to make sure that this was another umask bug ... and not something else. I've changed yum upstream to reset umask on mkdir() as well as open(), when it's creating yumdb stuff.

 rpm should have fixed any umask problems long ago ... but then it doesn't really go creating new files much, so it's somewhat easier :).

Comment 9 Paul DeStefano 2011-07-12 02:45:59 UTC
Awesome!  Many thanks!

Is it safe to assume the correct permissions are 775 for directories and 664 for files under yumdb/ ?

Comment 10 James Antill 2011-07-13 16:48:42 UTC
 Yeh, those should work. Although we change the umask to 022, so you get 755 and 644.

Comment 11 Paul DeStefano 2011-07-13 17:25:32 UTC
Got it.  Thanks.

Comment 12 Fedora Admin XMLRPC Client 2012-04-27 15:39:57 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 13 Fedora End Of Life 2012-08-07 17:58:45 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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