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'
Summary: [abrt] mock-1.1.32-1.fc18: shutil.py:252:rmtree:OSError: [Errno 16] Device or...
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:3b688e43a8814f5325cd418383f...
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-10 17:02 UTC by Eric Harney
Modified: 2014-04-19 09:21 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2013-11-10 06:37:30 UTC


Attachments (Terms of Use)
File: backtrace (2.83 KB, text/plain)
2013-06-10 17:02 UTC, Eric Harney
no flags Details
File: core_backtrace (1.91 KB, text/plain)
2013-06-10 17:02 UTC, Eric Harney
no flags Details
File: environ (189 bytes, text/plain)
2013-06-10 17:02 UTC, Eric Harney
no flags Details
call orphan cleanup routine even if the chroot is not cleaned (1.40 KB, patch)
2013-10-24 20:21 UTC, Clark Williams
no flags Details | Diff

Description Eric Harney 2013-06-10 17:02:07 UTC
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 17:02:12 UTC
Created attachment 759292 [details]
File: backtrace

Comment 2 Eric Harney 2013-06-10 17:02:14 UTC
Created attachment 759293 [details]
File: core_backtrace

Comment 3 Eric Harney 2013-06-10 17:02:17 UTC
Created attachment 759294 [details]
File: environ

Comment 4 Clark Williams 2013-10-24 19:12:50 UTC
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 20:21:06 UTC
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 14:58:39 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 7 Fedora Update System 2013-10-30 15:00:26 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 8 Fedora Update System 2013-10-30 15:02:51 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 9 Fedora Update System 2013-10-30 15:04:52 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 10 Fedora Update System 2013-10-30 17:12:42 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 11 Fedora Update System 2013-11-05 05:33:04 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 12 Fedora Update System 2013-11-05 05:34:34 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 13 Fedora Update System 2013-11-05 05:35:53 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 14 Fedora Update System 2013-11-05 05:37:08 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 15 Fedora Update System 2013-11-10 06:37:30 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 16 Fedora Update System 2014-02-06 02:09:55 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 17 Fedora Update System 2014-02-06 02:11:33 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 18 Fedora Update System 2014-02-06 02:13:00 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 19 Fedora Update System 2014-02-08 05:03:52 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 20 Fedora Update System 2014-03-25 20:26:06 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 21 Fedora Update System 2014-03-25 20:28:22 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 22 Fedora Update System 2014-03-25 20:30:14 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 23 Fedora Update System 2014-03-27 17:48:46 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 24 Fedora Update System 2014-03-27 17:50:40 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 25 Fedora Update System 2014-03-27 17:52:35 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 26 Fedora Update System 2014-03-31 19:05:37 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 27 Fedora Update System 2014-03-31 19:07:44 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 28 Fedora Update System 2014-03-31 19:09:41 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 29 Fedora Update System 2014-04-09 13:20:02 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 30 Fedora Update System 2014-04-18 15:38:47 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 31 Fedora Update System 2014-04-19 09:21:01 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.


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