Since update from 1.4.6-1.fc25 to 1.4.7-2.fc25, mock is unusable Terribly slow.... ~100 times slower. Ex, in a %check: - with previous version, lot of units are executed each second. - with new version, 10-15" for each unit test Downgrading to 1.4.6-1.fc25 solves the issue.
In a spec file time strace php somestuff With 1.4.6 real 0m0.434s user 0m0.277s sys 0m0.163s With 1.4.7 real 0m20.195s user 0m0.130s sys 0m0.056s It hangs (various time) on socket(AF_INET6, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3 connect(3, {sa_family=AF_INET6, sin6_port=htons(53), inet_pton(AF_INET6, "fe80::4a83:c7ff:fe35:8c10", &sin6_addr), sin6_flowinfo=htonl(0), sin6_scope_id=0}, 28) = -1 EINVAL (Invalid argument) close(3) = 0 socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3 connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.1.1")}, 16) = 0 poll([{fd=3, events=POLLOUT}], 1, 0) = 1 ([{fd=3, revents=POLLOUT}]) sendmmsg(3, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\333\366\1\0\0\1\0\0\0\0\0\0 ca64236f7c8944c9944"..., iov_len=55}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=55}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\340\n\1\0\0\1\0\0\0\0\0\0 ca64236f7c8944c9944"..., iov_len=55}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=55}], 2, MSG_NOSIGNAL) = 2 poll([{fd=3, events=POLLIN}], 1, 5000
192.168.1.1 is the dns server.
Poor workaround: config_opts['rpmbuild_networking'] = True
Can you please provide reproducer? Yes, networking is off. This has been always the default. Previously with old chroot, it was done using cheating (just remove /etc/resolv.conf) so connection using ip adresses worked. With nspawn the isolation is better. And all build systems (koji, copr) switch off networking by default to provide reproducible builds. So it is recommended to not use any networking related stuff during build.
> Can you please provide reproducer? Try to build any php package with a test suite. Ex: php-zendframework-zend-serializer
> So it is recommended to not use any networking related stuff during build. I don't use any networking, and indeed i WANT networking to be off Enable it is only a workaround to this issue.
Hmmm.. not all PHP packages are affected But can be reproduced with glpi package from rawhide.
> it was done using cheating (just remove /etc/resolv.conf) But keeping the host resolv.conf seems a bad idea when no network available, an empty file will be better.
Notice: config_opts['use_host_resolv'] = False doesn't seems to work. # cat /var/lib/mock/fedora-27-x86_64/root/etc/resolv.conf nameserver fe80::4a83:c7ff:fe35:8c10%enp2s0 nameserver 192.168.1.1
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
I disabled copying resolv.conf when network is disabled in commit 782e150 However this is not enough. Once we call first command in systemd-nspawn. E.g., sudo '/usr/bin/systemd-nspawn' '-q' '-M' '7ffd9feeb1684e71860ebda7431195db' '-D' '/var/lib/mock/fedora-26-x86_64/root' '-a' '--setenv=TERM=vt100' '--setenv=SHELL=/bin/bash' '--setenv=HOME=/builddir' '--setenv=HOSTNAME=mock' '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin' '--setenv=PS1=<mock-chroot> \\s-\\v\\$ ' '--setenv=LANG=cs_CZ.UTF-8' '/usr/sbin/userdel' '-r' '-f' 'mockbuild' then nspawn will unconditionally copy host resolv.conf https://github.com/systemd/systemd/blob/master/src/nspawn/nspawn.c#L1425 We can pass --private-network but that will reintroduce: https://github.com/rpm-software-management/mock/issues/113 Michal, any suggestions?
(In reply to Miroslav Suchý from comment #11) > Michal, any suggestions? What about bind mounting empty file over /etc/resolv.conf when networking is disabled? This should mitigate the issue and should be fairly easy to implement. Right?
But then nspawn will either bindmount host resolv.conf over my empty bindmount or just copy there the content (line 1466).
(In reply to Miroslav Suchý from comment #13) > But then nspawn will either bindmount host resolv.conf over my empty > bindmount or just copy there the content (line 1466). I meant to add --bind option to nspawn itself. I think if you explicitly bind mount empty file on /etc/resolv.conf than nspawn shouldn't revert that by doing implicit bind mount (or copy) of actual resolv.conf from the host.
Ping? It's very annoying that I can't build things like git-lfs due to test timeouts, but then they magically work on koji.
The work on the bindmount single file is in process. Once done, I can do something about this. I guess that ETA for this can be several weeks (6-8).
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. 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 '26'. 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 26 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.
I filed a preliminary PR for this at https://github.com/rpm-software-management/mock/pull/190. There are some issues with it as noted in the PR, but they should be relatively easy to resolve. I tried to use the new bind mount of a file in mock, but systemd-nspawn overrode that, so I had to use the nspawn --bind option. (It seems like it would be nicest if systemd-nspawn could just not override the resolv.conf when networking was not configured.)
Merged.
mock-1.4.11-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-cb4e456696
mock-1.4.11-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-4f5f46b079
mock-1.4.11-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ee1a74616a
mock-1.4.11-1.fc28 has been pushed to the Fedora 28 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-2018-ee1a74616a
mock-1.4.11-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-2018-4f5f46b079
mock-1.4.11-1.fc27 has been pushed to the Fedora 27 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-2018-cb4e456696
mock-1.4.11-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.4.11-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.4.11-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.