Date: Sat, 27 May 2023 12:52:13 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 271675] cp: Interrupted system call Message-ID: <bug-271675-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271675 Bug ID: 271675 Summary: cp: Interrupted system call Product: Base System Version: 13.2-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: rozhuk.im@gmail.com While using portmaster and /usr/ports/packages mounted via sshfs I got: =3D=3D=3D> Registering installation for py39-attrs-23.1.0 as automatic Installing py39-attrs-23.1.0... =3D=3D=3D>>> Creating a package for new version py39-attrs-23.1.0 cp: /tmp/ports/usr/ports/devel/py-attrs/work-py39/pkg/py39-attrs-23.1.0.pkg: Interrupted system call =3D=3D=3D>>> Package creation of py39-attrs-23.1.0 failed =3D=3D=3D>>> Aborting update 66562: wait4(-1,{ EXITED,val=3D1 },0x0,0x0) =3D 66732 (0x104ac) 66562: fstatat(AT_FDCWD,"/bin/cp",{ mode=3D-r-xr-xr-x ,inode=3D9134656,size=3D22168,blksize=3D32768 },0x0) =3D 0 (0x0) 66562: execve("/bin/cp",0x80183c300,0x801841008) EJUSTRETURN 66562: mmap(0x0,135168,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) =3D 34376814592 (0x801049000) 66562: mprotect(0x801046000,4096,PROT_READ) =3D 0 (0x0) 66562: issetugid() =3D 0 (0x0) 66562: sigfastblock(0x1,0x801048830) =3D 0 (0x0) 66562: open("/etc/libmap.conf",O_RDONLY|O_CLOEXEC,0101140030) =3D 3 (0x3) 66562: fstat(3,{ mode=3D-rw-r--r-- ,inode=3D41907167,size=3D47,blksize=3D32= 768 }) =3D 0 (0x0) 66562: read(3,"# $FreeBSD$\nincludedir /usr/loc"...,47) =3D 47 (0x2f) 66562: close(3) =3D 0 (0x0) 66562: open("/usr/local/etc/libmap.d",O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,01= 65) =3D 3 (0x3) 66562: fcntl(3,F_ISUNIONSTACK,0x0) =3D 0 (0x0) 66562: getdirentries(3,"\M^TF8\0\0\0\0\0\f\0\0\0\0\0\0\0"...,4096,{ 0x0 }) = =3D 104 (0x68) 66562: open("/usr/local/etc/libmap.d/mesa.conf",O_RDONLY|O_CLOEXEC,0165) = =3D 4 (0x4) 66562: fstat(4,{ mode=3D-rw-r--r-- ,inode=3D3688085,size=3D38,blksize=3D327= 68 }) =3D 0 (0x0) 66562: read(4,"libGLX_indirect.so.0 libGLX_mesa"...,38) =3D 38 (0x26) 66562: close(4) =3D 0 (0x0) 66562: getdirentries(3,0x80104e008,4096,{ 0x200 }) =3D 0 (0x0) 66562: close(3) =3D 0 (0x0) 66562: open("/var/run/ld-elf.so.hints",O_RDONLY|O_CLOEXEC,0100420156) =3D 3= (0x3) 66562: read(3,"Ehnt\^A\0\0\0\M^@\0\0\0,\^A\0\0"...,128) =3D 128 (0x80) 66562: fstat(3,{ mode=3D-r--r--r-- ,inode=3D7,size=3D428,blksize=3D4096 }) = =3D 0 (0x0) 66562: pread(3,"/lib:/usr/lib:/usr/lib/compat:/u"...,300,0x80) =3D 300 (0x1= 2c) 66562: close(3) =3D 0 (0x0) 66562: open("/lib/libc.so.7",O_RDONLY|O_CLOEXEC|O_VERIFY,00) =3D 3 (0x3) 66562: fstat(3,{ mode=3D-r--r--r-- ,inode=3D6730759,size=3D1933784,blksize= =3D32768 }) =3D 0 (0x0) 66562: mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) =3D 34376949760 (0x80106a000) 66562: mmap(0x0,4182016,PROT_NONE,MAP_GUARD,-1,0x0) =3D 34376953856 (0x8010= 6b000) 66562: mmap(0x80106b000,495616,PROT_READ,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PREF= AULT_READ,3,0x0) =3D 34376953856 (0x80106b000) 66562: mmap(0x8010e4000,1384448,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCO= RE|MAP_PREFAULT_READ,3,0x78000) =3D 34377449472 (0x8010e4000) 66562: mmap(0x801236000,45056,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFA= ULT_READ,3,0x1c9000) =3D 34378833920 (0x801236000) 66562: mmap(0x801241000,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFA= ULT_READ,3,0x1d3000) =3D 34378878976 (0x801241000) 66562: mmap(0x801246000,2236416,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANO= N,-1,0x0) =3D 34378899456 (0x801246000) 66562: munmap(0x80106a000,4096) =3D 0 (0x0) 66562: close(3) =3D 0 (0x0) 66562: mprotect(0x801236000,40960,PROT_READ) =3D 0 (0x0) 66562: mprotect(0x801236000,40960,PROT_READ|PROT_WRITE) =3D 0 (0x0) 66562: mprotect(0x801236000,40960,PROT_READ) =3D 0 (0x0) 66562: readlink("/etc/malloc.conf",0x7fffffffc780,1024) ERR#2 'No such file= or directory' 66562: issetugid() =3D 0 (0x0) 66562: mmap(0x0,2097152,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(21),= -1,0x0) =3D 34382807040 (0x801600000) 66562: mmap(0x0,2097152,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),= -1,0x0) =3D 34384904192 (0x801800000) 66562: mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(21),= -1,0x0) =3D 34387001344 (0x801a00000) 66562: sigaction(SIGINFO,{ 0x10247b0 SA_RESTART ss_t },{ SIG_DFL SA_RESTART ss_t }) =3D 0 (0x0) 66562: fstatat(AT_FDCWD,"/usr/ports/packages/All/py39-attrs-23.1.0.pkg",0x7fffffff= d9e8,0x0) ERR#2 'No such file or directory' 66562: fstatat(AT_FDCWD,"/tmp/ports/usr/ports/devel/py-attrs/work-py39/pkg/py39-at= trs-23.1.0.pkg",{ mode=3D-rw-r--r-- ,inode=3D252834,size=3D78040,blksize=3D4096 },AT_SYMLINK_= NOFOLLOW) =3D 0 (0x0) 66562: umask(0x1ff) =3D 18 (0x12) 66562: umask(0x12) =3D 511 (0x1ff) 66562: fstatat(AT_FDCWD,"/tmp/ports/usr/ports/devel/py-attrs/work-py39/pkg/py39-at= trs-23.1.0.pkg",{ mode=3D-rw-r--r-- ,inode=3D252834,size=3D78040,blksize=3D4096 },0x0) =3D 0 = (0x0) 66562: fstatat(AT_FDCWD,"/usr/ports/packages/All/py39-attrs-23.1.0.pkg",0x7fffffff= d6e0,0x0) ERR#2 'No such file or directory' 66562: openat(AT_FDCWD,"/tmp/ports/usr/ports/devel/py-attrs/work-py39/pkg/py39-att= rs-23.1.0.pkg",O_RDONLY,00) =3D 3 (0x3) 66562: openat(AT_FDCWD,"/usr/ports/packages/All/py39-attrs-23.1.0.pkg",O_WRONLY|O_= CREAT|O_TRUNC,0100644) =3D 4 (0x4) 66562: copy_file_range(0x3,0x0,0x4,0x0,0x7fffffffffffffff,0x0) ERR#4 'Interrupted system call' 66562: write(2,"cp: ",4) =3D 4 (0x4) 66562: write(2,"/tmp/ports/usr/ports/devel/py-at"...,71) =3D 71 (0x47) 66562: write(2,": ",2) =3D 2 (0x2) 66562: fstatat(AT_FDCWD,"/usr/share/nls/C/libc.cat",0x7fffffffd380,0x0) ERR= #2 'No such file or directory' 66562: fstatat(AT_FDCWD,"/usr/share/nls/libc/C",0x7fffffffd380,0x0) ERR#2 '= No such file or directory' 66562: fstatat(AT_FDCWD,"/usr/local/share/nls/C/libc.cat",0x7fffffffd380,0x= 0) ERR#2 'No such file or directory' 66562: fstatat(AT_FDCWD,"/usr/local/share/nls/libc/C",0x7fffffffd380,0x0) E= RR#2 'No such file or directory' 66562: write(2,"Interrupted system call\n",24) =3D 24 (0x18) 66562: close(4) =3D 0 (0x0) 66562: close(3) =3D 0 (0x0) 66562: exit(0x1)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 66562: process exit, rval =3D 1 Same time: cp /tmp/ports/usr/ports/devel/py-attrs/work-py39/pkg/py39-attrs-23.1.0.pkg /usr/ports/packages/All/py39-attrs-23.1.0.pkg work without error. My suggestion is that cp should fallback to old copy proc on EINTR, and probably EINVAL is mistake, at least according to man copy_file_range(): if (use_copy_file_range) { wcount =3D copy_file_range(from_fd, NULL, to_fd, NULL, SSIZE_MAX, 0); if (wcount < 0 && errno =3D=3D EINVAL) { /* Prob a non-seekable FD */ use_copy_file_range =3D 0; } } if (!use_copy_file_range) { wcount =3D copy_fallback(from_fd, to_fd); } --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271675-227>