This has been happening for a long time. In the install phase and even when you do an ebuild glibc or somethign else .ebuild install you get FileNotFound error. If you run sync on the filesystem in the background (like from a shell while true ; do sleep 0.3 ; sync ; done) the ebuild .... install almost always works. Has been happening with pythons 3.[7...11] Traceback (most recent call last): File "/usr/lib/portage/python3.11/doins.py", line 195, in run copyfile(source, dest) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/portage/util/file_copy/__init__.py", line 31, in _optimized_copyfile _file_copy(src_file.fileno(), dst_file.fileno()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory Reproducible: Always
I've never seen this. How do you produce this error?
Please attach an example full build log with the error, and your emerge --info. Are you using NFS or any other "unusual" file system?
(FWIW, it's considered somewhat impolite to use a disposable email for something like this, as we can't really ask follow up questions.)
Sorry for the disposable email, but it is for my own protection. There are no special filesystems. Tmpfs is used a lot for the build and ext4 without journal + extents (default). The filesystems are blown away quite often. The only thing that I can think of is that this is being built inside a container - using systemd-nspawn. You are right to think that it is strange because the file does exist when you check from the shell but it is only the python that cannot find it. The contrainer is spawned thus (ccache wasn't used when this happened) buildDir is usually tmpfs (22G): command+="ip addr add dev host0 ${iphost} ; ip link set host0 up ; ip route add default via ${ipgw} ; cd ; " command+="ip -6 addr add dev host0 ${ip6host} ; ip -6 route add default via ${ip6gw} ; cd ; " command+="mkdir /run/lock ; " command+="mv /etc/random-seed /run/ ; " command+="dbus-uuidgen --ensure=/run/machine-id ;" command+="chmod 1777 /tmp ; " command+="exec ${*}" systemd-nspawn \ --register=no \ --tmpfs=/home \ --tmpfs=/var/cache \ --tmpfs=/var/log \ --tmpfs=/var/tmp \ --bind-ro=${kernel_git}:/tmp/linux-stable.git \ --bind=${portage_dir}:/tmp/portage/ \ --bind=${distFiles}:/tmp/distfiles \ --bind=${ccDir}:/tmp/ccache \ --bind=${buildDir}/${contname}:/tmp/build \ --link-journal=no \ --private-network \ --network-veth \ --setenv=SHELL=/bin/bash \ --machine "build-${contname}" --directory "${contpath}" \ /bin/bash --login -c "${command}"