Bug 972868 - [abrt] mock-1.1.32-1.fc18: shutil.py:252:rmtree:OSError: [Errno 16] Device or resource busy: '/var/lib/mock/epel-6-x86_64/root/dev/shm'
[abrt] mock-1.1.32-1.fc18: shutil.py:252:rmtree:OSError: [Errno 16] Device or...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
18
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Clark Williams
Fedora Extras Quality Assurance
abrt_hash:3b688e43a8814f5325cd418383f...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-10 13:02 EDT by Eric Harney
Modified: 2014-04-19 05:21 EDT (History)
2 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:30 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.83 KB, text/plain)
2013-06-10 13:02 EDT, Eric Harney
no flags Details
File: core_backtrace (1.91 KB, text/plain)
2013-06-10 13:02 EDT, Eric Harney
no flags Details
File: environ (189 bytes, text/plain)
2013-06-10 13:02 EDT, Eric Harney
no flags Details
call orphan cleanup routine even if the chroot is not cleaned (1.40 KB, patch)
2013-10-24 16:21 EDT, Clark Williams
no flags Details | Diff

  None (edit)
Description Eric Harney 2013-06-10 13:02:07 EDT
Version-Release number of selected component:
mock-1.1.32-1.fc18

Additional info:
reporter:       libreport-2.1.4
cmdline:        /usr/bin/python -tt /usr/sbin/mock -r epel-6-x86_64 --no-clean --rebuild /home/eharney/rpmbuild/SRPMS/openstack-cinder-2013.1.2-1.el6.src.rpm
dso_list:       python-libs-2.7.3-13.fc18.x86_64
executable:     /usr/sbin/mock
kernel:         3.9.4-200.fc18.x86_64
runlevel:       N 5
uid:            0

Truncated backtrace:
shutil.py:252:rmtree:OSError: [Errno 16] Device or resource busy: '/var/lib/mock/epel-6-x86_64/root/dev/shm'

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 0x01B5E5F0>", 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 532, in do_rebuild
    chroot.init()
  File "<peak.util.decorators.rewrap wrapping mockbuild.backend.init at 0x01B1BAA0>", line 3, in init
    def init(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 302, in init
    self._init()
  File "<peak.util.decorators.rewrap wrapping mockbuild.backend._init at 0x01B1BE60>", line 3, in _init
    def _init(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 420, in _init
    self._setupDev()
  File "<peak.util.decorators.rewrap wrapping mockbuild.backend._setupDev at 0x01B1E398>", line 3, in _setupDev
    def _setupDev(self, interactive): return __decorated(self, interactive)
  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 457, in _setupDev
    mockbuild.util.rmtree(self.makeChrootPath("dev"), selinux=self.selinux)
  File "<peak.util.decorators.rewrap wrapping mockbuild.util.rmtree at 0x01B01B90>", line 3, in rmtree
    def rmtree(path, *args, **kargs): return __decorated(path, *args, **kargs)
  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/util.py", line 92, in rmtree
    shutil.rmtree(path, *args, **kargs)
  File "/usr/lib64/python2.7/shutil.py", line 245, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "/usr/lib64/python2.7/shutil.py", line 254, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/lib64/python2.7/shutil.py", line 252, in rmtree
    os.rmdir(path)
OSError: [Errno 16] Device or resource busy: '/var/lib/mock/epel-6-x86_64/root/dev/shm'

Local variables in innermost frame:
onerror: <function onerror at 0x20df8c0>
ignore_errors: False
names: []
path: '/var/lib/mock/epel-6-x86_64/root/dev/shm'
Comment 1 Eric Harney 2013-06-10 13:02:12 EDT
Created attachment 759292 [details]
File: backtrace
Comment 2 Eric Harney 2013-06-10 13:02:14 EDT
Created attachment 759293 [details]
File: core_backtrace
Comment 3 Eric Harney 2013-06-10 13:02:17 EDT
Created attachment 759294 [details]
File: environ
Comment 4 Clark Williams 2013-10-24 15:12:50 EDT
This looks like something didn't cleanup from a previous run of mock; something is still running inside the chroot and has an open file handle to the chroot's dev/shm special file.  Since you're using the --no-clean flag, the logic to kill orphan processes before leaving the chroot is being skipped. 

Possibly I need to look at moving the call to mockbuild.util.orphansKill() to some other spot rather than in the 'clean' method.
Comment 5 Clark Williams 2013-10-24 16:21:06 EDT
Created attachment 815915 [details]
call orphan cleanup routine even if the chroot is not cleaned

Here's a patch that adds an orphan cleanup call in the chroots alldone() method. Would you try this and see if it fixes your issue?
Comment 6 Fedora Update System 2013-10-30 10:58:39 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 7 Fedora Update System 2013-10-30 11:00:26 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 8 Fedora Update System 2013-10-30 11:02:51 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 9 Fedora Update System 2013-10-30 11:04:52 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 10 Fedora Update System 2013-10-30 13:12:42 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 11 Fedora Update System 2013-11-05 00:33:04 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 12 Fedora Update System 2013-11-05 00:34:34 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 13 Fedora Update System 2013-11-05 00:35:53 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 14 Fedora Update System 2013-11-05 00:37:08 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 15 Fedora Update System 2013-11-10 01:37:30 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 16 Fedora Update System 2014-02-05 21:09:55 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 17 Fedora Update System 2014-02-05 21:11:33 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 18 Fedora Update System 2014-02-05 21:13:00 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 19 Fedora Update System 2014-02-08 00:03:52 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 20 Fedora Update System 2014-03-25 16:26:06 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 21 Fedora Update System 2014-03-25 16:28:22 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 22 Fedora Update System 2014-03-25 16:30:14 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 23 Fedora Update System 2014-03-27 13:48:46 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 24 Fedora Update System 2014-03-27 13:50:40 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 25 Fedora Update System 2014-03-27 13:52:35 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 26 Fedora Update System 2014-03-31 15:05:37 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 27 Fedora Update System 2014-03-31 15:07:44 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 28 Fedora Update System 2014-03-31 15:09:41 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 29 Fedora Update System 2014-04-09 09:20:02 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 30 Fedora Update System 2014-04-18 11:38:47 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 31 Fedora Update System 2014-04-19 05:21:01 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.

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