From nobody Fri Nov 12 20:09:36 2021 X-Original-To: chromium@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 13191183CCDF for ; Fri, 12 Nov 2021 20:09:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HrV6l6xLvz4S4m for ; Fri, 12 Nov 2021 20:09:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF20325B6A for ; Fri, 12 Nov 2021 20:09:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1ACK9ZUp043949 for ; Fri, 12 Nov 2021 20:09:35 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1ACK9ZSl043948 for chromium@FreeBSD.org; Fri, 12 Nov 2021 20:09:35 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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 Date: Fri, 12 Nov 2021 20:09:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: gnikl@justmail.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: chromium@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: FreeBSD-specific Chromium issues List-Archive: https://lists.freebsd.org/archives/freebsd-chromium List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-chromium@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N 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.=