Created attachment 686943 [details] gentoo-kernel-5.4.98_build.log During kernel build I get sandbox violation: >>> Source configured. * --------------------------- ACCESS VIOLATION SUMMARY --------------------------- * LOG FILE: "/var/tmp/portage/sys-kernel/gentoo-kernel-5.4.98/temp/sandbox.log" * VERSION 1.0 FORMAT: F - Function called FORMAT: S - Access Status FORMAT: P - Path as passed to function FORMAT: A - Absolute Path (not canonical) FORMAT: R - Canonical Path FORMAT: C - Command Line F: unlink S: deny P: /dev/null.dwo A: /dev/null.dwo R: /dev/null.dwo C: x86_64-pc-linux-gnu-gcc -Werror -gsplit-dwarf -S -x c /dev/null -o /dev/null * --------------------------------------------------------------------------------
This is really similar to #653286. But still a bit different.
emerge --info, please.
That line is a test for CONFIG_DEBUG_INFO_SPLIT, but should be working as far as I can tell. Does this give access errors? $ sandbox -- x86_64-pc-linux-gnu-gcc -Werror -gsplit-dwarf -S -x c /dev/null -o /dev/null For me it makes no attempt to write a /dev/null.dwo And yes, emerge --info might help.
Created attachment 687291 [details] emerge --info
This command gives me no error as well: $ sandbox -- x86_64-pc-linux-gnu-gcc -Werror -gsplit-dwarf -S -x c /dev/null -o /dev/null
Same here on two different machines. I seem to recall having this problem with ccache a while ago, could that have crept back in? I do have ccache enabled for kernel builds.
Set FEATURES=-ccache and it appears to be working fine. (will have to wait a while to be sure it completes, but it is working) Seems to be a regression in ccache... there should be a related bug somewhere.
Bug #712080 I stand corrected... that was ccache replacing /dev/null with a file... which would have caused a sandbox violation if genkernel ran in a sandbox like gentoo-kernel does. In the meantime, sys-kernel/gentoo-kernel-5.4.94::gentoo install completed successfully with ccache disabled.
Do I understand correctly that it was caused by out-of-Portage ccache use? Or does ccache damage your system when run via Portage?
In Bug #712080 it was... sandbox must be protecting the system in this case, as intended. I'm using ccache all day every day without issue though, and it's working just fine for other packages. Not sure what's special about this gentoo-kernel that triggers this behaviour.
I confirm that disabling sandbox resolves this issue.
Hey, just ran into this issue on a server with, gentoo-kernel-5.4.105 and ccache. * ACCESS DENIED: unlink: /dev/null.dwo I can confirm that disabling ccache solve the issue.
I ran into this bug and investigated further. I have reported the bug upstream at https://github.com/ccache/ccache/issues/833 A minimal working example to demonstrate what is caught by the sandbox (ran by user): $ PATH="/usr/lib/ccache/bin${PATH:+:}$PATH" CCACHE_DIR="$HOME/tmp/" strace x86_64-pc-linux-gnu-gcc -Werror -gsplit-dwarf -S -x c /dev/null -o /dev/null 2>&1 | grep /dev/null.dwo This happens when building gentoo-kernel because of the similar line at scripts/Kconfig.include:28 of the Linux source, which is called by running emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" olddefconfig on line 92 of kernel-build.eclass I verified that the access attempt does not occur when running without ccache: $ strace x86_64-pc-linux-gnu-gcc -Werror -gsplit-dwarf -S -x c /dev/null -o /dev/null 2>&1 | grep /dev/null.dwo has no output.
Was resolved in ccache upstream.