This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1294979 - [abrt] mock: shutil.py:420:_rmtree_safe_fd:PermissionError: [Errno 13] Permission denied: 'nosync.so'
[abrt] mock: shutil.py:420:_rmtree_safe_fd:PermissionError: [Errno 13] Permis...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
23
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Suchý
Fedora Extras Quality Assurance
https://retrace.fedoraproject.org/faf...
abrt_hash:385bd86ae4a8f8d9c954e134e05...
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-31 07:22 EST by Niki Guldbrand
Modified: 2016-11-25 03:24 EST (History)
6 users (show)

See Also:
Fixed In Version: mock-1.2.15-1.fc23 mock-1.2.15-1.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-25 03:24:26 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 (3.60 KB, text/plain)
2015-12-31 07:22 EST, Niki Guldbrand
no flags Details
File: environ (2.14 KB, text/plain)
2015-12-31 07:22 EST, Niki Guldbrand
no flags Details

  None (edit)
Description Niki Guldbrand 2015-12-31 07:22:09 EST
Description of problem:
Not sure exactly what has changed during an update, because the nosync option had worked previously on this machine, so disabed it, and it could continue.
 maybe something to do with it running an nspawn chroot ?

Version-Release number of selected component:
mock-1.2.14-1.fc23

Additional info:
reporter:       libreport-2.6.3
cmdline:        /usr/bin/python3 -tt /sbin/mock --dnf --update --buildsrpm --spec=zsh.spec --sources=.
executable:     /sbin/mock
kernel:         4.2.8-300.fc23.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
shutil.py:420:_rmtree_safe_fd:PermissionError: [Errno 13] Permission denied: 'nosync.so'

Traceback (most recent call last):
  File "/sbin/mock", line 649, in main
    run_command(options, args, config_opts, commands, buildroot, state)
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/sbin/mock", line 732, in run_command
    do_buildsrpm(config_opts, commands, buildroot, options, args)
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/sbin/mock", line 511, in do_buildsrpm
    cmd=cmd, post=None, clean=clean)
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/sbin/mock", line 440, in rebuild_generic
    ret = cmd(item)
  File "/sbin/mock", line 509, in cmd
    follow_links=options.symlink_dereference)
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.4/site-packages/mockbuild/backend.py", line 335, in buildsrpm
    rebuilt_srpm = self.rebuild_installed_srpm(chrootspec, timeout)
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.4/site-packages/mockbuild/backend.py", line 403, in rebuild_installed_srpm
    printOutput=self.config['print_main_output'])
  File "/usr/lib/python3.4/site-packages/mockbuild/buildroot.py", line 184, in doChroot
    env=env, shell=shell, *args, **kargs)
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.4/site-packages/mockbuild/util.py", line 526, in do
    raise exception.Error("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
mockbuild.exception.Error: Command failed. See logs for output.
 # /usr/bin/systemd-nspawn -q -M 4c7778b242804d79beb3d5c72146cf0e -D /var/lib/mock/fedora-23-x86_64/root /bin/su -l mockbuild -c /usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/zsh.spec

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/sbin/mock", line 833, in <module>
    main()
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/sbin/mock", line 651, in main
    buildroot.finalize()
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.4/site-packages/mockbuild/buildroot.py", line 538, in finalize
    shutil.rmtree(d)
  File "/usr/lib64/python3.4/shutil.py", line 464, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/lib64/python3.4/shutil.py", line 402, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/usr/lib64/python3.4/shutil.py", line 422, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/usr/lib64/python3.4/shutil.py", line 420, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'nosync.so'

Local variables in innermost frame:
name: 'nosync.so'
orig_st: os.stat_result(st_mode=33261, st_ino=30455027, st_dev=41, st_nlink=1, st_uid=0, st_gid=0, st_size=7024, st_atime=1451419614, st_mtime=1434583764, st_ctime=1451419614)
mode: 33261
fullname: '/tmp/tmpf_gyasnz/lib64/nosync.so'
onerror: <function rmtree.<locals>.onerror at 0x7f729c131620>
names: ['nosync.so']
path: '/tmp/tmpf_gyasnz/lib64'
topfd: 12
Comment 1 Niki Guldbrand 2015-12-31 07:22:18 EST
Created attachment 1110766 [details]
File: backtrace
Comment 2 Niki Guldbrand 2015-12-31 07:22:20 EST
Created attachment 1110767 [details]
File: environ
Comment 3 Miroslav Suchý 2016-02-17 18:16:28 EST
Fixed in commit
* e335776 (HEAD -> devel, origin/devel) when removing buildroot, do that as root [RHBZ#1294979]
Comment 4 Fedora Update System 2016-02-22 16:42:33 EST
mock-1.2.15-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-327a55296a
Comment 5 Fedora Update System 2016-02-22 16:42:33 EST
mock-1.2.15-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0c713976fa
Comment 6 Fedora Update System 2016-02-22 16:42:48 EST
mock-1.2.15-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-557b8f85fe
Comment 7 Fedora Update System 2016-02-22 16:43:51 EST
mock-1.2.15-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-ff0b113baf
Comment 8 Fedora Update System 2016-02-23 16:26:38 EST
mock-1.2.15-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0c713976fa
Comment 9 Fedora Update System 2016-02-24 13:23:30 EST
mock-1.2.15-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-ff0b113baf
Comment 10 Fedora Update System 2016-02-24 14:19:31 EST
mock-1.2.15-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-557b8f85fe
Comment 11 Fedora Update System 2016-02-24 16:52:20 EST
mock-1.2.15-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-327a55296a
Comment 12 Niki Guldbrand 2016-02-25 20:04:33 EST
When trying to do a build I get this error:

============
INFO: Results and/or logs in: /var/lib/mock//fedora-23-x86_64/result

ERROR: [Errno 1] Operation not permitted: '/var/lib/mock/fedora-23-x86_64/root/var/lib/machines'

ERROR: The most common cause for this error is trying to run /usr/sbin/mock as an unprivileged user.
ERROR: Check your path to make sure that /usr/bin/ is listed before /usr/sbin, or manually run /usr/bin/mock to see if that fixes this problem.
============

To rectify this I have to run:
$ sudo btrfs subvolume delete /var/lib/mock/fedora-23-x86_64/root/var/lib/machines 
Delete subvolume (no-commit): '/var/lib/mock/fedora-23-x86_64/root/var/lib/machines'

I'm running it using nspawn if that is of any help.
Comment 13 Fedora Update System 2016-02-26 14:22:45 EST
mock-1.2.15-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2016-03-02 16:50:51 EST
mock-1.2.15-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2016-03-08 15:54:01 EST
mock-1.2.16-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-3405d4e45b
Comment 16 Fedora Update System 2016-03-08 15:55:10 EST
mock-1.2.16-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-25ff2f1000
Comment 17 Fedora Update System 2016-03-09 18:18:41 EST
mock-1.2.16-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-25ff2f1000
Comment 18 Fedora Update System 2016-03-09 18:21:12 EST
mock-1.2.16-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-3405d4e45b
Comment 19 Fedora End Of Life 2016-11-24 09:37:42 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

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