With the last system-update I'm running in this error with several packages, e.g. kinfocenter-5.11.4 and wine-gecko-2.47-r1 The error occurs at the end of the install phase (kinfocenter-5.11.4): -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_energyinfo -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_energyinfo/contents -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_energyinfo/contents/ui -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/Graph.qml -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_energyinfo/metadata.desktop -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_energyinfo/metadata.json -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kservices5/kcm_fileindexermonitor.desktop -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/lib64/qt5/plugins/kcms/kcm_fileindexermonitor.so -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_fileindexermonitor -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_fileindexermonitor/contents -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_fileindexermonitor/contents/ui -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_fileindexermonitor/contents/ui/main.qml -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_fileindexermonitor/contents/ui/constants.js -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_fileindexermonitor/metadata.desktop -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kpackage/kcms/kcm_fileindexermonitor/metadata.json -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/doc/HTML/en/kinfocenter/index.cache.bz2 -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/doc/HTML/en/kinfocenter/index.docbook -- Installing: /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/doc/HTML/en/kinfocenter/kinfocenter.png ERROR:root:Failed to copy file: _parsed_options=Namespace(group=-1, mode=420, owner=-1), source=b'/var/tmp/portage/kde-plasma/kinfocenter-5.11.4/distdir/glogo-small.png', dest_dir=b'/var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image//usr/share/kinfocenter' Traceback (most recent call last): File "/usr/lib/portage/python3.6/doins.py", line 184, in run copyfile(source, dest) File "/usr/lib64/python3.6/site-packages/portage/util/file_copy/__init__.py", line 30, in _optimized_copyfile _file_copy(src_file.fileno(), dst_file.fileno()) OSError: [Errno 95] Operation not supported * ERROR: kde-plasma/kinfocenter-5.11.4::gentoo failed (install phase): * doins failed The file to be copied is at the correct place and accessible. Also the copy procedure seems to be successful: ls -al /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/distdir/glogo-small.png glogo-small.png -> /var/portage/distfiles/glogo-small.png ls -al /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kinfocenter/glogo-small.png -rw-r--r-- 1 root root 0 14. Dez 07:07 /var/tmp/portage/kde-plasma/kinfocenter-5.11.4/image/usr/share/kinfocenter/glogo-small.png The destination directory (/var/tmp/portage) is located in a tmpfs. In wine-gecko: >>> Source prepared. >>> Configuring source in /var/tmp/portage/app-emulation/wine-gecko-2.47-r1/work ... >>> Source configured. >>> Compiling source in /var/tmp/portage/app-emulation/wine-gecko-2.47-r1/work ... >>> Source compiled. >>> Test phase [not enabled]: app-emulation/wine-gecko-2.47-r1 >>> Install wine-gecko-2.47-r1 into /var/tmp/portage/app-emulation/wine-gecko-2.47-r1/image/ category app-emulation ERROR:root:Failed to copy file: _parsed_options=Namespace(group=-1, mode=420, owner=-1), source=b'/var/tmp/portage/app-emulation/wine-gecko-2.47-r1/distdir/wine_gecko-2.47-x86.msi', dest_dir=b'/var/tmp/portage/app-emulation/wine-gecko-2.47-r1/image//usr/share/wine/gecko' Traceback (most recent call last): File "/usr/lib/portage/python3.6/doins.py", line 184, in run copyfile(source, dest) File "/usr/lib64/python3.6/site-packages/portage/util/file_copy/__init__.py", line 30, in _optimized_copyfile _file_copy(src_file.fileno(), dst_file.fileno()) OSError: [Errno 95] Operation not supported * ERROR: app-emulation/wine-gecko-2.47-r1::gentoo failed (install phase): * doins failed To exclude Python3.6 I switched back to Python3.5 (eselect python). The error still occurs. Reproducible: Always
Created attachment 510076 [details] emerge --info
Created attachment 510078 [details] kinfocenter: build.log
Created attachment 510080 [details] wine-gecko: build.log
Please create an strace log like this: strace python -c 'from portage.util.file_copy import copyfile; copyfile("/var/tmp/portage/app-emulation/wine-gecko-2.47-r1/distdir/wine_gecko-2.47-x86.msi", "/var/tmp/portage/app-emulation/wine-gecko-2.47-r1/image/usr/share/wine/gecko/wine_gecko-2.47-x86.msi")' &> /strace.log
Also, what filesystem type is the source directory (/var/portage/distfiles).
(strace emerge -1 wine-gecko 2>&1 ) > strace.log https://paste.pound-python.org/show/33rNBJ5zgcKjPRWZZEqw/ filesystem of /var/portage/distfiles: nas:/portage on /var/portage type nfs4 (rw,noatime,nodiratime,vers=4.1,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.109.20,local_lock=none,addr=192.168.109.11,_netdev) filesystem of /var/tmp/portage: tmpfs on /var/tmp/portage type tmpfs (rw,relatime,size=13631488k)
Created attachment 510192 [details] strace.log zipped (same content of wgetpaste-link)
Created attachment 510194 [details] strace.log (short form) strace python -c 'from portage.util.file_copy import copyfile; copyfile("/var/tmp/portage/app-emulation/wine-gecko-2.47-r1/distdir/wine_gecko-2.47-x86.msi", "/var/tmp/portage/app-emulation/wine-gecko-2.47-r1/image/usr/share/wine/gecko/wine_gecko-2.47-x86.msi")' &> /strace.log
(In reply to Sven Müller from comment #6) > (strace emerge -1 wine-gecko 2>&1 ) > strace.log > > https://paste.pound-python.org/show/33rNBJ5zgcKjPRWZZEqw/ > > filesystem of /var/portage/distfiles: > > nas:/portage on /var/portage type nfs4 > (rw,noatime,nodiratime,vers=4.1,rsize=65536,wsize=65536,namlen=255,hard, > proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.109.20, > local_lock=none,addr=192.168.109.11,_netdev) The "Operation not supported" error comes from the lseek SEEK_DATA call on nfs: > openat(AT_FDCWD, "/var/tmp/portage/app-emulation/wine-gecko-2.47-r1/image/usr/share/wine/gecko/wine_gecko-2.47-x86.msi", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 4 > fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 > ioctl(4, TCGETS, 0x7ffd67a72eb0) = -1 ENOTTY (Inappropriate ioctl for device) > lseek(3, 0, SEEK_DATA) = -1 EOPNOTSUPP (Operation not supported) It's really not supposed to do that. According to the lseek man page: > In the simplest implementation, a filesystem can support the > operations by making SEEK_HOLE always return the offset of > the end of the file, and making SEEK_DATA always return offset > (i.e., even if the location referred to by offset is a hole, > it can be considered to consist of data that is a sequence > of zeros). The EOPNOTSUPP error might be a peculiarity of your nfs server.
I do see some references to ENOTSUPP and EOPNOTSUPP in relation to lseek inside the fs/nfs directory of the linux source code, so we should probably handle it.
We can handle this exactly the same way as the lseek EINVAL error.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=58d44d3f4549a45eac1ec9cc99d497bb104438c3 commit 58d44d3f4549a45eac1ec9cc99d497bb104438c3 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2017-12-15 21:16:05 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2017-12-15 21:16:16 +0000 file_copy: handle EOPNOTSUPP from lseek SEEK_DATA (bug 641088) NFS can set the errno to EOPNOTSUPP for lseek SEEK_DATA. Bug: https://bugs.gentoo.org/641088 src/portage_util_file_copy_reflink_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)}
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=dad9cce8a1e2360e8483e0f78e29e20bd5fdce49 commit dad9cce8a1e2360e8483e0f78e29e20bd5fdce49 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2017-12-16 00:37:40 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2017-12-16 00:38:18 +0000 file_copy: handle EOPNOTSUPP from copy_file_range (bug 641088) NFS can set the errno to EOPNOTSUPP for copy_file_range. Bug: https://bugs.gentoo.org/641088 src/portage_util_file_copy_reflink_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)}
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a131e603a3a56e7f0d996e5390d48eb2243ace0 commit 7a131e603a3a56e7f0d996e5390d48eb2243ace0 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2017-12-16 00:50:43 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2017-12-16 00:58:58 +0000 sys-apps/portage: version bump to 2.3.19 #640934 - doins: fix PYTHONPATH setting #641088 - file_copy: handle EOPNOTSUPP for NFS Closes: https://bugs.gentoo.org/640934 Closes: https://bugs.gentoo.org/641088 Package-Manager: Portage-2.3.18, Repoman-2.3.6 sys-apps/portage/Manifest | 2 +- sys-apps/portage/{portage-2.3.18.ebuild => portage-2.3.19.ebuild} | 0 2 files changed, 1 insertion(+), 1 deletion(-)