Bug 1261207 - mock can't delete /dev/shm
mock can't delete /dev/shm
Status: CLOSED DUPLICATE of bug 1255142
Product: Fedora EPEL
Classification: Fedora
Component: mock (Show other bugs)
epel7
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Clark Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-08 18:41 EDT by Mihaly Zachar
Modified: 2015-09-09 02:50 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-09 02:50:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mihaly Zachar 2015-09-08 18:41:05 EDT
Description of problem:
I just updated mock from 1.2.10 to 1.2.12 on my uptodate CentOS 7. During a --rebuild it always stops with the following error:

OSError: [Errno 16] Device or resource busy: '/var/lib/mock/base-epel-7-x86_64/root/dev/shm'


Version-Release number of selected component (if applicable):
mock-1.2.12-1.el7.noarch
mock-scm-1.2.12-1.el7.noarch

How reproducible:
It happens always...





Steps to Reproduce:

builder@cscf-build:~ $ cat  ./test.mock 
mock --rebuild -r base --scm-enable \
    --scm-option method=git \
    --scm-option package=dummy \
    --scm-option git_get=set \
    --scm-option spec=dummy.spec \
    --scm-option branch=master \
    --scm-option git_get='git clone https://github.com/xsuchy/Dummy.git dummy'


Actual results:
Output is the following:

INFO: mock.py version 1.2.12 starting (python version = 2.7.5)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
INFO: Start(/tmp/tmpOFKAKs.mock-scm.dummy/dummy/dummy.spec)  Config(base-epel-7-x86_64)
Start: clean chroot
Finish: clean chroot
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
Start: unpacking root cache
Finish: unpacking root cache
INFO: enabled yum cache
Start: cleaning yum metadata
Finish: cleaning yum metadata
Mock Version: 1.2.12
INFO: Mock Version: 1.2.12
Start: yum update
base                                                     | 3.6 kB     00:00     
epel                                                     | 4.3 kB     00:00     
extras                                                   | 3.4 kB     00:00     
updates                                                  | 3.4 kB     00:00     
No packages marked for update
Finish: yum update
Finish: chroot init
Start: buildsrpm
Start: rpmbuild -bs
warning: Could not canonicalize hostname: cscf-build
Building target platforms: x86_64
Building for target x86_64
Wrote: /builddir/build/SRPMS/dummy-1-1.el7.centos.src.rpm
Finish: rpmbuild -bs
Finish: buildsrpm
INFO: Done(/tmp/tmpOFKAKs.mock-scm.dummy/dummy/dummy.spec) Config(base) 0 minutes 36 seconds
INFO: Results and/or logs in: /var/lib/mock/base-epel-7-x86_64/result
INFO: Start(/var/lib/mock/base-epel-7-x86_64/result/dummy-1-1.el7.centos.src.rpm)  Config(base-epel-7-x86_64)
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled yum cache
Start: cleaning yum metadata
Finish: cleaning yum metadata
ERROR: Exception(/var/lib/mock/base-epel-7-x86_64/result/dummy-1-1.el7.centos.src.rpm) Config(base-epel-7-x86_64) 0 minutes 2 seconds
INFO: Results and/or logs in: /var/lib/mock/base-epel-7-x86_64/result
Traceback (most recent call last):
  File "/usr/sbin/mock", line 832, in <module>
    main()
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/sbin/mock", line 649, in main
    run_command(options, args, config_opts, commands, buildroot, state)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/sbin/mock", line 729, in run_command
    do_rebuild(config_opts, commands, buildroot, args)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/sbin/mock", line 495, in do_rebuild
    post=post_build, clean=clean)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/sbin/mock", line 439, in rebuild_generic
    commands.init(prebuild=not config_opts.get('short_circuit'))
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 122, in init
    self.buildroot.initialize(**kwargs)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 84, in initialize
    self._init(prebuild=prebuild, do_log=do_log)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 126, in _init
    self._setup_devices()
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 412, in _setup_devices
    util.rmtree(self.make_chroot_path("dev"), selinux=self.selinux)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 134, in rmtree
    rmtree(fullname, selinux=selinux, exclude=exclude)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 143, in rmtree
    os.rmdir(path)
OSError: [Errno 16] Device or resource busy: '/var/lib/mock/base-epel-7-x86_64/root/dev/shm'
builder@cscf-build:~ $

Additional info:
It worked with the version 1.1.10.

The  https://github.com/xsuchy/Dummy.git was copied from an other ticket, I am not sure what is that.
Comment 1 Mihaly Zachar 2015-09-08 18:42:38 EDT
(In reply to Mihaly Zachar from comment #0)
> Description of problem:
> I just updated mock from 1.2.10 to 1.2.12 on my uptodate CentOS 7. During a
> --rebuild it always stops with the following error:
> 
> OSError: [Errno 16] Device or resource busy:
> '/var/lib/mock/base-epel-7-x86_64/root/dev/shm'
> 
> 
> Version-Release number of selected component (if applicable):
> mock-1.2.12-1.el7.noarch
> mock-scm-1.2.12-1.el7.noarch
> 
> How reproducible:
> It happens always...
> 
> 
> 
> 
> 
> Steps to Reproduce:
> 
> builder@cscf-build:~ $ cat  ./test.mock 
> mock --rebuild -r base --scm-enable \
>     --scm-option method=git \
>     --scm-option package=dummy \
>     --scm-option git_get=set \
>     --scm-option spec=dummy.spec \
>     --scm-option branch=master \
>     --scm-option git_get='git clone https://github.com/xsuchy/Dummy.git
> dummy'
> 
> 
> Actual results:
> Output is the following:
> 
> INFO: mock.py version 1.2.12 starting (python version = 2.7.5)...
> Start: init plugins
> INFO: selinux disabled
> Finish: init plugins
> Start: run
> INFO: Start(/tmp/tmpOFKAKs.mock-scm.dummy/dummy/dummy.spec) 
> Config(base-epel-7-x86_64)
> Start: clean chroot
> Finish: clean chroot
> Start: chroot init
> INFO: calling preinit hooks
> INFO: enabled root cache
> Start: unpacking root cache
> Finish: unpacking root cache
> INFO: enabled yum cache
> Start: cleaning yum metadata
> Finish: cleaning yum metadata
> Mock Version: 1.2.12
> INFO: Mock Version: 1.2.12
> Start: yum update
> base                                                     | 3.6 kB     00:00 
> 
> epel                                                     | 4.3 kB     00:00 
> 
> extras                                                   | 3.4 kB     00:00 
> 
> updates                                                  | 3.4 kB     00:00 
> 
> No packages marked for update
> Finish: yum update
> Finish: chroot init
> Start: buildsrpm
> Start: rpmbuild -bs
> warning: Could not canonicalize hostname: cscf-build
> Building target platforms: x86_64
> Building for target x86_64
> Wrote: /builddir/build/SRPMS/dummy-1-1.el7.centos.src.rpm
> Finish: rpmbuild -bs
> Finish: buildsrpm
> INFO: Done(/tmp/tmpOFKAKs.mock-scm.dummy/dummy/dummy.spec) Config(base) 0
> minutes 36 seconds
> INFO: Results and/or logs in: /var/lib/mock/base-epel-7-x86_64/result
> INFO:
> Start(/var/lib/mock/base-epel-7-x86_64/result/dummy-1-1.el7.centos.src.rpm) 
> Config(base-epel-7-x86_64)
> Start: chroot init
> INFO: calling preinit hooks
> INFO: enabled root cache
> INFO: enabled yum cache
> Start: cleaning yum metadata
> Finish: cleaning yum metadata
> ERROR:
> Exception(/var/lib/mock/base-epel-7-x86_64/result/dummy-1-1.el7.centos.src.
> rpm) Config(base-epel-7-x86_64) 0 minutes 2 seconds
> INFO: Results and/or logs in: /var/lib/mock/base-epel-7-x86_64/result
> Traceback (most recent call last):
>   File "/usr/sbin/mock", line 832, in <module>
>     main()
>   File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line
> 84, in trace
>     result = func(*args, **kw)
>   File "/usr/sbin/mock", line 649, in main
>     run_command(options, args, config_opts, commands, buildroot, state)
>   File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line
> 84, in trace
>     result = func(*args, **kw)
>   File "/usr/sbin/mock", line 729, in run_command
>     do_rebuild(config_opts, commands, buildroot, args)
>   File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line
> 84, in trace
>     result = func(*args, **kw)
>   File "/usr/sbin/mock", line 495, in do_rebuild
>     post=post_build, clean=clean)
>   File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line
> 84, in trace
>     result = func(*args, **kw)
>   File "/usr/sbin/mock", line 439, in rebuild_generic
>     commands.init(prebuild=not config_opts.get('short_circuit'))
>   File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line
> 84, in trace
>     result = func(*args, **kw)
>   File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 122, in
> init
>     self.buildroot.initialize(**kwargs)
>   File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line
> 84, in trace
>     result = func(*args, **kw)
>   File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 84,
> in initialize
>     self._init(prebuild=prebuild, do_log=do_log)
>   File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line
> 84, in trace
>     result = func(*args, **kw)
>   File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 126,
> in _init
>     self._setup_devices()
>   File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line
> 84, in trace
>     result = func(*args, **kw)
>   File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 412,
> in _setup_devices
>     util.rmtree(self.make_chroot_path("dev"), selinux=self.selinux)
>   File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line
> 84, in trace
>     result = func(*args, **kw)
>   File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 134, in
> rmtree
>     rmtree(fullname, selinux=selinux, exclude=exclude)
>   File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line
> 84, in trace
>     result = func(*args, **kw)
>   File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 143, in
> rmtree
>     os.rmdir(path)
> OSError: [Errno 16] Device or resource busy:
> '/var/lib/mock/base-epel-7-x86_64/root/dev/shm'
> builder@cscf-build:~ $
> 
> Additional info:
> It worked with the version 1.1.10.
> 
> The  https://github.com/xsuchy/Dummy.git was copied from an other ticket, I
> am not sure what is that.


Sorry, typo:

So it worked with 1.2.10.
Comment 2 Miroslav Suchý 2015-09-09 02:50:20 EDT
Fixed in bug 1255142

*** This bug has been marked as a duplicate of bug 1255142 ***

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