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'
[abrt] mock-1.1.32-1.fc19: backend.py:540:_nuke_rpm_db:OSError: [Errno 13] Pe...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Clark Williams
Fedora Extras Quality Assurance
abrt_hash:13974a5ff6f6343b772e19807df...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-12 07:08 EDT by Björn 'besser82' Esser
Modified: 2014-06-19 06:21 EDT (History)
6 users (show)

See Also:
Fixed In Version: mock-1.1.38-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-10 01:37:22 EST
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 (2.80 KB, text/plain)
2013-06-12 07:08 EDT, Björn 'besser82' Esser
no flags Details
File: core_backtrace (1.82 KB, text/plain)
2013-06-12 07:08 EDT, Björn 'besser82' Esser
no flags Details
File: environ (167 bytes, text/plain)
2013-06-12 07:08 EDT, Björn 'besser82' Esser
no flags Details
raise privileges before removing rpm db files from chroot (1.92 KB, patch)
2013-10-24 13:42 EDT, Clark Williams
no flags Details | Diff
raise privileges before removing rpm db files from chroot (1.92 KB, patch)
2013-10-28 14:58 EDT, Clark Williams
no flags Details | Diff

  None (edit)
Description Björn 'besser82' Esser 2013-06-12 07:08:16 EDT
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 07:08:20 EDT
Created attachment 760093 [details]
File: backtrace
Comment 2 Björn 'besser82' Esser 2013-06-12 07:08:24 EDT
Created attachment 760094 [details]
File: core_backtrace
Comment 3 Björn 'besser82' Esser 2013-06-12 07:08:27 EDT
Created attachment 760095 [details]
File: environ
Comment 4 Jerry James 2013-06-21 12:52:47 EDT
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 13:07:03 EDT
See bug 976863 for the cause of the luatex crash.
Comment 6 Clark Williams 2013-10-24 13:42:58 EDT
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 14:58:21 EDT
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 10:58:32 EDT
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 11:00:04 EDT
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 11:02:39 EDT
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 11:04:44 EDT
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 13:12:35 EDT
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 00:32:56 EST
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 00:34:27 EST
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 00:35:47 EST
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 00:37:03 EST
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 01:37:22 EST
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-05 21:09:50 EST
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-05 21:11:30 EST
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-05 21:12:56 EST
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 00:03:45 EST
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 16:25:55 EDT
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 16:28:16 EDT
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 16:30:09 EDT
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 13:48:42 EDT
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 13:50:36 EDT
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 13:52:30 EDT
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 15:05:31 EDT
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 15:07:40 EDT
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 15:09:37 EDT
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 09:19:56 EDT
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 11:38:41 EDT
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 05:20:56 EDT
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 06:21:28 EDT
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.