[Bug 258679] www/chromium: Unable to download files with chromium-92.0.4515.159_2
Date: Fri, 12 Nov 2021 20:09:36 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258679 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 failure. > 23.057592727 sendfile([...]) ERR#38 'Socket operation on non-socket' Thank you! That is exactly the problem: sendfile returns an error and the retry 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 don'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 report back. TL;DR: The v92 port was the first version that had the sendfile optimization on (Free)BSD. However, the modification was broken for any arch where ssize_t != 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& // file sizes and file offsets will not have changed. A slow fallback and // proceed without issues. retry_slow = (copied == 0 && res < 0 && - (errno == EINVAL || errno == ENOSYS || errno == EPERM)); - + (errno == EINVAL || errno == ENOSYS || errno == EPERM || errno == ENOTSOCK)); +//fprintf(stderr, "CopyFileContentsWithSendfile: errno=%d\n", errno); return res >= 0; } #endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) -- cut -- -- You are receiving this mail because: You are the assignee for the bug.