I am trying to build a project in copr. This project runs some code that does an mlock() as part of the build. mlock is no longer supported in copr. mlock() is supported in koji, but not copr. This seems surprising, since official Fedora packages can use it, but not those trying to be official packages. Also, mlock() was previously supported in copr; I have built older versions of this project before, but those versions can no longer be rebuilt. Here is an example build log: https://copr-be.cloud.fedoraproject.org/results/omajid/dotnet-2.1/fedora-28-x86_64/00770214-dotnet/build.log.gz And here is the relevant part of the strace: 34 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff796f9c000 34 mlock(0x7ff796f9c000, 4096) = -1 EPERM (Operation not permitted) 34 write(2, "Failed to initialize CoreCLR, HR"..., 49) = 49 This SRPM is available here: https://omajid.fedorapeople.org/dotnet/dotnet-2.1.301-1.fc27.src.rpm Here is an older build of the same project: https://copr-be.cloud.fedoraproject.org/results/@dotnet-sig/dotnet/fedora-rawhide-x86_64/00749817-dotnet/dotnet-2.0.7-1.fc29.src.rpm This was built as: https://copr.fedorainfracloud.org/coprs/g/dotnet-sig/dotnet/build/749817/ but can no longer be re-built. Here is another package. It was built in koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=27568635, but failed to build in copr: https://copr.fedorainfracloud.org/coprs/g/dotnet-sig/dotnet/build/766937/ To summarize, my issue really is two fold: - mlock was usable in copr, but is no longer, so older packages can no longer be rebuilt - koji allows using mlock(), copr doesn't.
Thanks to help from clime over on #fedora-buildsys, I can also reproduce this issue locally using `fedpkg mockbuild`. I had been using `fedpkg local` which was working without any issues. I have: $ mock --version 1.4.11 $ rpm -q mock mock-1.4.11-1.fc28.noarch $ fedpkg mockbuild .... 34 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbd542bb000 34 mlock(0x7fbd542bb000, 4096) = -1 EPERM (Operation not permitted) 34 write(2, "Failed to initialize CoreCLR, HR"..., 49) = 49 ....
Adding the following line to a mock-config file makes this work locally: config_opts['nspawn_args'] = ['--capability=CAP_IPC_LOCK'] So, while that works for my local use case, it still doesn't work out of the box. And it doesn't work on copr where I build my packages.
*** This bug has been marked as a duplicate of bug 1580435 ***