Date: Fri, 12 Nov 2021 20:09:36 +0000 From: bugzilla-noreply@freebsd.org To: chromium@FreeBSD.org Subject: [Bug 258679] www/chromium: Unable to download files with chromium-92.0.4515.159_2 Message-ID: <bug-258679-28929-t3ag3L79NZ@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-258679-28929@https.bugs.freebsd.org/bugzilla/> References: <bug-258679-28929@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258679 gnikl@justmail.de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gnikl@justmail.de --- Comment #21 from gnikl@justmail.de --- (In reply to Tatsuki Makino from comment #19) > The rename is also failing, but I am also concerned about this sendfile f= ailure. > 23.057592727 sendfile([...]) ERR#38 'Socket operation on non-socket' Thank you! That is exactly the problem: sendfile returns an error and the r= etry logic does not kick in since the errno value is not in the list of the permitted values. Adding ENOTSOCK fixes the download operation for v92. I d= on't have a ccached v94 yet, thus I can only assume that the attached patch will work for v94. Please try the the patch (save as eg. files/patch-zza) and re= port back. TL;DR: The v92 port was the first version that had the sendfile optimizatio= n on (Free)BSD. However, the modification was broken for any arch where ssize_t = !=3D off_t. This got fixed with the v94 port. I really wonder if activating sendfile() was a sensible decision though. Contrary to Linux the FreeBSD sendfile call limits the out descriptor to a socket. According to the Linux= man page the out descriptor can be any file there. -- cut -- --- base/files/file_util_posix.cc~ 2021-11-12 20:13:11.151633000 +0100 +++ base/files/file_util_posix.cc 2021-11-12 20:13:20.289125000 +0100 @@ -1290,8 +1290,8 @@ bool CopyFileContentsWithSendfile(File&=20 // file sizes and file offsets will not have changed. A slow fallback and // proceed without issues. retry_slow =3D (copied =3D=3D 0 && res < 0 && - (errno =3D=3D EINVAL || errno =3D=3D ENOSYS || errno =3D= =3D EPERM)); - + (errno =3D=3D EINVAL || errno =3D=3D ENOSYS || errno =3D= =3D EPERM || errno =3D=3D ENOTSOCK)); +//fprintf(stderr, "CopyFileContentsWithSendfile: errno=3D%d\n", errno); return res >=3D 0; } #endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID= ) || defined(OS_BSD) -- cut -- --=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-258679-28929-t3ag3L79NZ>