Bug 973617 - [abrt] mock-1.1.32-1.fc19: backend.py:540:_nuke_rpm_db:OSError: [Errno 13] Permission denied: '/var/lib/mock/fedora-rawhide-x86_64/root/var/lib/rpm/__db.001'
Summary: [abrt] mock-1.1.32-1.fc19: backend.py:540:_nuke_rpm_db:OSError: [Errno 13] Pe...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:13974a5ff6f6343b772e19807df...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-12 11:08 UTC by Björn 'besser82' Esser
Modified: 2014-06-19 10:21 UTC (History)
6 users (show)

Fixed In Version: mock-1.1.38-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-10 06:37:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (2.80 KB, text/plain)
2013-06-12 11:08 UTC, Björn 'besser82' Esser
no flags Details
File: core_backtrace (1.82 KB, text/plain)
2013-06-12 11:08 UTC, Björn 'besser82' Esser
no flags Details
File: environ (167 bytes, text/plain)
2013-06-12 11:08 UTC, Björn 'besser82' Esser
no flags Details
raise privileges before removing rpm db files from chroot (1.92 KB, patch)
2013-10-24 17:42 UTC, Clark Williams
no flags Details | Diff
raise privileges before removing rpm db files from chroot (1.92 KB, patch)
2013-10-28 18:58 UTC, Clark Williams
no flags Details | Diff

Description Björn 'besser82' Esser 2013-06-12 11:08:16 UTC
Description of problem:
I invoked `fedora-review -m fedora-rawhide-x86_64 -b 972431` with clean mock-cache/-root.  texlive-luatex-bin.f20 crashed with signal 6 shortly before.

Version-Release number of selected component:
mock-1.1.32-1.fc19

Additional info:
reporter:       libreport-2.1.4
cmdline:        /usr/bin/python -tt /usr/sbin/mock -r fedora-rawhide-x86_64 --no-cleanup-after --no-clean --resultdir=/home/bjoern.esser/fedora/review/972431-airtsp/results --rebuild /home/bjoern.esser/fedora/review/972431-airtsp/srpm/airtsp-1.01.0-1.fc18.src.rpm
executable:     /usr/sbin/mock
kernel:         3.9.4-301.fc19.x86_64
runlevel:       N 5
uid:            0

Truncated backtrace:
backend.py:540:_nuke_rpm_db:OSError: [Errno 13] Permission denied: '/var/lib/mock/fedora-rawhide-x86_64/root/var/lib/rpm/__db.001'

Traceback (most recent call last):
  File "/usr/sbin/mock", line 561, in <module>
    def do_buildsrpm(config_opts, chroot, options, args):
  File "/usr/sbin/mock", line 880, in main
    do_rebuild(config_opts, chroot, args)
  File "<peak.util.decorators.rewrap wrapping __main__.do_rebuild at 0x029FFA28>", line 3, in do_rebuild
    def do_rebuild(config_opts, chroot, srpms): return __decorated(config_opts, chroot, srpms)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/sbin/mock", line 533, in do_rebuild
    chroot.build(srpm, timeout=config_opts['rpmbuild_timeout'])
  File "<peak.util.decorators.rewrap wrapping mockbuild.backend.build at 0x029A6758>", line 3, in build
    def build(self, srpm, timeout): return __decorated(self, srpm, timeout)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 705, in build
    self._callHooks('prebuild')
  File "<peak.util.decorators.rewrap wrapping mockbuild.backend._callHooks at 0x029BCED8>", line 3, in _callHooks
    def _callHooks(self, stage): return __decorated(self, stage)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 879, in _callHooks
    hook()
  File "<peak.util.decorators.rewrap wrapping ccache._ccacheBuildHook at 0x02A0DB90>", line 3, in _ccacheBuildHook
    def _ccacheBuildHook(self): return __decorated(self)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/plugins/ccache.py", line 44, in _ccacheBuildHook
    self.rootObj.doChroot(["ccache", "-M", str(self.ccache_opts['max_cache_size'])], shell=False)
  File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 547, in doChroot
    self._nuke_rpm_db()
  File "<peak.util.decorators.rewrap wrapping mockbuild.backend._nuke_rpm_db at 0x029B5938>", line 3, in _nuke_rpm_db
    def _nuke_rpm_db(self): return __decorated(self)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 540, in _nuke_rpm_db
    os.unlink(tmp)
OSError: [Errno 13] Permission denied: '/var/lib/mock/fedora-rawhide-x86_64/root/var/lib/rpm/__db.001'

Local variables in innermost frame:
tmp: '/var/lib/mock/fedora-rawhide-x86_64/root/var/lib/rpm/__db.001'
self: <mockbuild.backend.Root object at 0x29fda10>

Comment 1 Björn 'besser82' Esser 2013-06-12 11:08:20 UTC
Created attachment 760093 [details]
File: backtrace

Comment 2 Björn 'besser82' Esser 2013-06-12 11:08:24 UTC
Created attachment 760094 [details]
File: core_backtrace

Comment 3 Björn 'besser82' Esser 2013-06-12 11:08:27 UTC
Created attachment 760095 [details]
File: environ

Comment 4 Jerry James 2013-06-21 16:52:47 UTC
Almost the same crash for me while building frama-c, and I also saw a texlive-luatex-bin crash immediately beforehand.  For me, it is __db.002 where permission is denied.  I see this:

# ls -al /var/lib/mock/fedora-rawhide-x86_64/root/var/lib/rpm
total 39688
drwxr-xr-x.  2 root root     4096 Jun 21 10:37 .
drwxr-xr-x. 14 root root     4096 Jun 21 10:39 ..
-rw-r--r--.  1 root mock  2519040 Jun 21 10:40 Basenames
-rw-r--r--.  1 root mock     8192 Jun 21 10:39 Conflictname
-rw-r--r--.  1 root root   352256 Jun 21 10:41 __db.001
-rw-r--r--.  1 root root    98304 Jun 21 10:41 __db.002
-rw-r--r--.  1 root root  1318912 Jun 21 10:41 __db.003
-rw-r--r--.  1 root mock   458752 Jun 21 10:40 Dirnames
-rw-r--r--.  1 root mock    12288 Jun 21 10:40 Group
-rw-r--r--.  1 root mock    16384 Jun 21 10:40 Installtid
-rw-r--r--.  1 root mock    28672 Jun 21 10:40 Name
-rw-r--r--.  1 root mock    40960 Jun 21 10:40 Obsoletename
-rw-r--r--.  1 root mock 35278848 Jun 21 10:40 Packages
-rw-r--r--.  1 root mock   311296 Jun 21 10:40 Providename
-rw-r--r--.  1 root mock   208896 Jun 21 10:40 Requirename
-rw-r--r--.  1 root mock        0 Jun 21 10:35 .rpm.lock
-rw-r--r--.  1 root mock    45056 Jun 21 10:40 Sha1header
-rw-r--r--.  1 root mock    36864 Jun 21 10:40 Sigmd5
-rw-r--r--.  1 root mock     8192 Jun 21 10:39 Triggername

Note that the __db.* files are owned by root:root, not root:mock.  The texlive-luatex-bin crash does not appear in any of the mock logs.

Comment 5 Jerry James 2013-06-21 17:07:03 UTC
See bug 976863 for the cause of the luatex crash.

Comment 6 Clark Williams 2013-10-24 17:42:58 UTC
Created attachment 815874 [details]
raise privileges before removing rpm db files from chroot

Not sure if you're still seeing this problem, but here's a patch to raise privileges before removing the chroot RPM db files. Can you try this and let me know the results?

Comment 7 Clark Williams 2013-10-28 18:58:21 UTC
Created attachment 816877 [details]
raise privileges before removing rpm db files from chroot

Grrrr. That will teach me to post a patch before running it through my test suite. 

Fixed stupid typo.

Comment 8 Fedora Update System 2013-10-30 14:58:32 UTC
mock-1.1.34-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mock-1.1.34-1.fc18

Comment 9 Fedora Update System 2013-10-30 15:00:04 UTC
mock-1.1.34-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.34-1.el6

Comment 10 Fedora Update System 2013-10-30 15:02:39 UTC
mock-1.1.34-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.34-1.fc20

Comment 11 Fedora Update System 2013-10-30 15:04:44 UTC
mock-1.1.34-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.34-1.fc19

Comment 12 Fedora Update System 2013-10-30 17:12:35 UTC
Package mock-1.1.34-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mock-1.1.34-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-20329/mock-1.1.34-1.fc20
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2013-11-05 05:32:56 UTC
mock-1.1.35-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.35-1.fc19

Comment 14 Fedora Update System 2013-11-05 05:34:27 UTC
mock-1.1.35-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mock-1.1.35-1.fc18

Comment 15 Fedora Update System 2013-11-05 05:35:47 UTC
mock-1.1.35-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.35-1.el6

Comment 16 Fedora Update System 2013-11-05 05:37:03 UTC
mock-1.1.35-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.35-1.fc20

Comment 17 Fedora Update System 2013-11-10 06:37:22 UTC
mock-1.1.35-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2014-02-06 02:09:50 UTC
mock-1.1.36-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.36-1.fc19

Comment 19 Fedora Update System 2014-02-06 02:11:30 UTC
mock-1.1.36-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.36-1.fc20

Comment 20 Fedora Update System 2014-02-06 02:12:56 UTC
mock-1.1.36-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.36-1.el6

Comment 21 Fedora Update System 2014-02-08 05:03:45 UTC
mock-1.1.36-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2014-03-25 20:25:55 UTC
mock-1.1.37-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.37-1.fc19

Comment 23 Fedora Update System 2014-03-25 20:28:16 UTC
mock-1.1.37-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.37-1.fc20

Comment 24 Fedora Update System 2014-03-25 20:30:09 UTC
mock-1.1.37-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.37-1.el6

Comment 25 Fedora Update System 2014-03-27 17:48:42 UTC
mock-1.1.37-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.37-2.fc20

Comment 26 Fedora Update System 2014-03-27 17:50:36 UTC
mock-1.1.37-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.37-2.fc19

Comment 27 Fedora Update System 2014-03-27 17:52:30 UTC
mock-1.1.37-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.37-2.el6

Comment 28 Fedora Update System 2014-03-31 19:05:31 UTC
mock-1.1.38-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.38-1.fc19

Comment 29 Fedora Update System 2014-03-31 19:07:40 UTC
mock-1.1.38-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.38-1.el6

Comment 30 Fedora Update System 2014-03-31 19:09:37 UTC
mock-1.1.38-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.38-1.fc20

Comment 31 Fedora Update System 2014-04-09 13:19:56 UTC
mock-1.1.38-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 32 Fedora Update System 2014-04-18 15:38:41 UTC
mock-1.1.38-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 33 Fedora Update System 2014-04-19 09:20:56 UTC
mock-1.1.38-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 34 Björn 'besser82' Esser 2014-06-19 10:21:28 UTC
With the recent version in fc19 this problem seems to be fixed.


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