Bug 1405296

Summary: [abrt] mock: util.py:152:rmtree:OSError: [Errno 16] Device or resource busy: '/var/lib/mock/centos-7-prod-x86_64/root/proc'
Product: [Fedora] Fedora EPEL Reporter: Frank Büttner <bugzilla>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Raiskup <praiskup>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: jdisnard, mebrown, msuchy, praiskup, williams
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/098f9284bea351ff8d94e7df50fea8a2c7dfca94
Whiteboard: abrt_hash:cfe19858af37fae9cc5961a6491fa4ffeb849e83
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-14 07:16:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: environ
none
File: machineid none

Description Frank Büttner 2016-12-16 06:14:46 UTC
Description of problem:
Let mock run, when the tmps is still mountet.

Version-Release number of selected component:
mock-1.2.21-1.el7

Additional info:
reporter:       libreport-2.1.11.1
cmdline:        /usr/bin/python -tt /usr/sbin/mock -r centos-7-prod-x86_64 /home/fbuettn/RPM-Zeugs/SRPMS/solr-6.3.0-1.el7.centos.src.rpm
executable:     /usr/sbin/mock
kernel:         3.10.0-514.2.2.el7.x86_64
pkg_fingerprint: 6A2F AEA2 352C 64E5
pkg_vendor:     Fedora Project
reproducible:   Not sure how to reproduce the problem
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
util.py:152:rmtree:OSError: [Errno 16] Device or resource busy: '/var/lib/mock/centos-7-prod-x86_64/root/proc'

Traceback (most recent call last):
  File "/usr/sbin/mock", line 844, in <module>
    main()
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/sbin/mock", line 663, in main
    run_command(options, args, config_opts, commands, buildroot, state)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/sbin/mock", line 745, in run_command
    do_rebuild(config_opts, commands, buildroot, args)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/sbin/mock", line 504, in do_rebuild
    post=post_build, clean=clean)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/sbin/mock", line 447, in rebuild_generic
    commands.clean()
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 74, in clean
    self.buildroot.delete()
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 566, in delete
    util.rmtree(self.basedir, selinux=self.selinux)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 143, in rmtree
    rmtree(fullname, selinux=selinux, exclude=exclude)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 143, in rmtree
    rmtree(fullname, selinux=selinux, exclude=exclude)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 152, in rmtree
    os.rmdir(path)
OSError: [Errno 16] Device or resource busy: '/var/lib/mock/centos-7-prod-x86_64/root/proc'

Local variables in innermost frame:
retries: 2
e: OSError(16, 'Device or resource busy')
selinux: False
failed_to_handle: False
try_again: False
names: []
failed_filename: None
path: '/var/lib/mock/centos-7-prod-x86_64/root/proc'
exclude: ()

Comment 1 Frank Büttner 2016-12-16 06:14:55 UTC
Created attachment 1232441 [details]
File: backtrace

Comment 2 Frank Büttner 2016-12-16 06:14:57 UTC
Created attachment 1232442 [details]
File: environ

Comment 3 Frank Büttner 2016-12-16 06:14:58 UTC
Created attachment 1232443 [details]
File: machineid

Comment 4 Pavel Raiskup 2019-11-14 07:16:19 UTC
The logic related to mounting/umounting proc filesystem has been
rewritten a lot in recent releases, so I believe this is not an
issue nowadays.  Please re-open if you still observe the same issue.