Bug 975619 - [abrt] yum-3.4.3-95.fc19: misc.py:939:unlink_f:OSError: [Errno 13] Permission denied: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'
[abrt] yum-3.4.3-95.fc19: misc.py:939:unlink_f:OSError: [Errno 13] Permission...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
abrt_hash:108b02298aabdae818ef4408cef...
: Reopened
: 1011758 1015647 1031363 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-18 20:21 EDT by Francisco de la Peña
Modified: 2013-11-18 03:54 EST (History)
8 users (show)

See Also:
Fixed In Version: yum-3.4.3-111.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-08 07:32:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (1.59 KB, text/plain)
2013-06-18 20:21 EDT, Francisco de la Peña
no flags Details
File: core_backtrace (1018 bytes, text/plain)
2013-06-18 20:21 EDT, Francisco de la Peña
no flags Details
File: environ (3.15 KB, text/plain)
2013-06-18 20:21 EDT, Francisco de la Peña
no flags Details

  None (edit)
Description Francisco de la Peña 2013-06-18 20:21:38 EDT
Description of problem:
When doing bash completion.

Version-Release number of selected component:
yum-3.4.3-95.fc19

Additional info:
reporter:       libreport-2.1.5
cmdline:        /usr/bin/python -t /usr/share/yum-cli/completion-helper.py -d 0 -C list all firefox
executable:     /usr/share/yum-cli/completion-helper.py
kernel:         3.9.5-301.fc19.x86_64
runlevel:       N 5
uid:            1000

Truncated backtrace:
misc.py:939:unlink_f:OSError: [Errno 13] Permission denied: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'

Traceback (most recent call last):
  File "/usr/share/yum-cli/completion-helper.py", line 95, in <module>
    main(sys.argv[1:])
  File "/usr/share/yum-cli/completion-helper.py", line 88, in main
    base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 522, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/completion-helper.py", line 52, in doCommand
    patterns=[get_pattern(extcmds)])
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2763, in doPackageLists
    avail = self.pkgSack.returnNewestByNameArch(patterns=patterns,
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1030, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 767, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 364, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 237, in populate
    misc.unlink_f(repo.cachedir +'/gen/%s.sqlite' % mydbtype)
  File "/usr/lib/python2.7/site-packages/yum/misc.py", line 939, in unlink_f
    os.unlink(filename)
OSError: [Errno 13] Permission denied: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'

Local variables in innermost frame:
e: OSError(13, 'Permission denied')
filename: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'
Comment 1 Francisco de la Peña 2013-06-18 20:21:45 EDT
Created attachment 762680 [details]
File: backtrace
Comment 2 Francisco de la Peña 2013-06-18 20:21:49 EDT
Created attachment 762681 [details]
File: core_backtrace
Comment 3 Francisco de la Peña 2013-06-18 20:21:53 EDT
Created attachment 762682 [details]
File: environ
Comment 4 Francisco de la Peña 2013-06-18 20:26:52 EDT
Description of problem:
How to reproduce:
$ yum info optionaltext[tab completion]

Version-Release number of selected component:
yum-3.4.3-95.fc19

Additional info:
reporter:       libreport-2.1.5
cmdline:        /usr/bin/python -t /usr/share/yum-cli/completion-helper.py -d 0 -C list all firefo
executable:     /usr/share/yum-cli/completion-helper.py
kernel:         3.9.5-301.fc19.x86_64
runlevel:       N 5
uid:            1000

Truncated backtrace:
misc.py:939:unlink_f:OSError: [Errno 13] Permission denied: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'

Traceback (most recent call last):
  File "/usr/share/yum-cli/completion-helper.py", line 95, in <module>
    main(sys.argv[1:])
  File "/usr/share/yum-cli/completion-helper.py", line 88, in main
    base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 522, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/completion-helper.py", line 52, in doCommand
    patterns=[get_pattern(extcmds)])
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2763, in doPackageLists
    avail = self.pkgSack.returnNewestByNameArch(patterns=patterns,
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1030, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 767, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 364, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 237, in populate
    misc.unlink_f(repo.cachedir +'/gen/%s.sqlite' % mydbtype)
  File "/usr/lib/python2.7/site-packages/yum/misc.py", line 939, in unlink_f
    os.unlink(filename)
OSError: [Errno 13] Permission denied: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'

Local variables in innermost frame:
e: OSError(13, 'Permission denied')
filename: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'
Comment 5 Zdeněk Pavlas 2013-06-19 03:37:36 EDT
The compressed primary_db is valid (matches repomd.xml), but the decompressed file was invalid.  I'm curious how this could happen.  Did You kill Yum while it was retrieving metadata before that?
Comment 6 Francisco de la Peña 2013-06-19 11:04:11 EDT
Not sure, in fact I was trying to get the terminal where it happened, so it could. However, $ yum remove [tab] (instead of info) works fine without rebuilding db. I will try again tonight after rebuilding.
Comment 7 Francisco de la Peña 2013-06-20 20:52:32 EDT
After recreating repo db, it worked fine for yum info completion.
Comment 8 Zdeněk Pavlas 2013-09-25 03:38:59 EDT
*** Bug 1011758 has been marked as a duplicate of this bug. ***
Comment 9 Zdeněk Pavlas 2013-10-07 06:06:00 EDT
*** Bug 1015647 has been marked as a duplicate of this bug. ***
Comment 10 Zdeněk Pavlas 2013-10-07 06:10:31 EDT
Since 3.4.3-99, unlink_f() does handle EPERM.
Comment 11 Fedora Update System 2013-10-07 07:14:19 EDT
yum-3.4.3-111.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/yum-3.4.3-111.fc19
Comment 12 Fedora Update System 2013-10-08 07:32:46 EDT
yum-3.4.3-111.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 13 Zdeněk Pavlas 2013-11-18 03:46:19 EST
*** Bug 1031363 has been marked as a duplicate of this bug. ***
Comment 14 Zdeněk Pavlas 2013-11-18 03:54:52 EST
*** Bug 1015647 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.