From nobody Mon Aug 22 13:08:49 2022 X-Original-To: dev-commits-ports-branches@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 4MBCNd3QbBz4ZbrC; Mon, 22 Aug 2022 13:08:49 +0000 (UTC) (envelope-from git@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 4MBCNd2vb4z40qD; Mon, 22 Aug 2022 13:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661173729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXs29zjtLfLJSXTSYx+xUytCVhAsERUFu/e3mzPSkbA=; b=bOYqN3SCFBnHq0JbXurk9wGcBhElUASUnzWVrfzMUdB10QNH23osfdudzKsLl7xq3p8i8s j+WXgHLJNhdqrcexTluHlTJ9v/rfVirCWrh2zTHdM1OIytiKyxTU6LjqmQ2fbVWV8yjXno W9ioNn0MQqkZUV22hswwG2bINWyTxIz/+ZOn1jjJMn2NZ8YiStSlu4I4qJJ7QU1oz0zfpp Kxm8FcwaOKe5W4zVf9As23Ckf1W7SyVdSya+B8eJnK0cHbG+gc/Ab+++Lr8s1pNNEInm69 LL6C5nRDOSC2h3fAEEsSCJmzsNraR29akYY+vAH1tv97Q0RzDYKmYxrf3EeyYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4MBCNd1hqhzqmT; Mon, 22 Aug 2022 13:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27MD8nr5072676; Mon, 22 Aug 2022 13:08:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27MD8nKO072675; Mon, 22 Aug 2022 13:08:49 GMT (envelope-from git) Date: Mon, 22 Aug 2022 13:08:49 GMT Message-Id: <202208221308.27MD8nKO072675@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Dmitri Goutnik Subject: git: e27b4194097a - 2022Q3 - lang/go118: Backport upstream fix for /dev/fuse polling issue List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dmgk X-Git-Repository: ports X-Git-Refname: refs/heads/2022Q3 X-Git-Reftype: branch X-Git-Commit: e27b4194097ae00c09ee7f1ad43316d8e844f537 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661173729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXs29zjtLfLJSXTSYx+xUytCVhAsERUFu/e3mzPSkbA=; b=LtzKJ7oWfgSs18+YY8H7ECUo3Sz/nsH+6/bHT3U+UhCRwCSxpbrN4/vu6XhPSpnVMm1inJ /znT9MMWyrAMMjoeIL5O+akssmKughBDr/Dq+Tqo/amgUJ/yL1jUTLcGCrlCEQJhHK/7sw zPV8dScVM9QVz3ihSOoDNn7PaEa6Cbm5iJDm+trClPOlycI6Q4usg15VIt7MEjKeYGTJv4 DriENfvRvaulo6qzStAMM1t16J5iHOE32bIFPjHBY3XVUASZJVH75+pFizuZsy5hvVbNN4 tYZDe0tFoB0vWnRDJtaQr9ZF4K9nDgsNxn10jZ4IQbn6qbx7jTS6bYP1iurYTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661173729; a=rsa-sha256; cv=none; b=ho0/xjMUjUofOT+YLd5U5ZUnNYvHqyhumlVTw6vivg6NQLjrABs7aMxxYTjrYcVj3tOiWy ALtRkC8glVugj7jQHBtdLUodGJpD2sebiML3pG5biZHDU9cUVUqHF+PL2CWqr6VpP6lDjd q31JYLPqcRMzomhDWtShPJkXOP5wOuCKse6LTxBrjDZfjANMemu5EwPyI6NwmuwtcUnq97 g7jesNyx1UpU6Zo8fLaVBR5pbRddwIWbMvlFBOr7RqnV9Ba/+pojwERPGpwTis3Cj9Gbgt KVBpOFp+gI8AFQoUxbZ2Wv6n1/iiFupgLYQL/uNP2ZDTHuY9AuQzUnuo1W7hBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch 2022Q3 has been updated by dmgk: URL: https://cgit.FreeBSD.org/ports/commit/?id=e27b4194097ae00c09ee7f1ad43316d8e844f537 commit e27b4194097ae00c09ee7f1ad43316d8e844f537 Author: Dmitri Goutnik AuthorDate: 2022-08-22 12:55:48 +0000 Commit: Dmitri Goutnik CommitDate: 2022-08-22 12:58:27 +0000 lang/go118: Backport upstream fix for /dev/fuse polling issue This a backport of Go CL 420334. PR: 258056 Obtained from: https://go-review.googlesource.com/c/go/+/420334/ --- lang/go118/Makefile | 2 +- lang/go118/files/patch-src_os_file__unix.go | 55 +++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/lang/go118/Makefile b/lang/go118/Makefile index 3ae392de7809..7705c7b8981c 100644 --- a/lang/go118/Makefile +++ b/lang/go118/Makefile @@ -1,6 +1,6 @@ DISTVERSION= 1.18.5 # Always set PORTREVISION explicitly as otherwise they are inherited from lang/go-devel -PORTREVISION= 0 +PORTREVISION= 1 MASTER_SITES= https://golang.org/dl/ \ https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \ LOCAL/dmgk:bootstrap diff --git a/lang/go118/files/patch-src_os_file__unix.go b/lang/go118/files/patch-src_os_file__unix.go new file mode 100644 index 000000000000..3f53fce01948 --- /dev/null +++ b/lang/go118/files/patch-src_os_file__unix.go @@ -0,0 +1,55 @@ +From 21a3e299aad894f744292d8cf1db4120efb3651f Mon Sep 17 00:00:00 2001 +From: Yuval Pavel Zholkover +Date: Sat, 30 Jul 2022 20:41:58 +0300 +Subject: [PATCH] os: only add file descriptors which are set to non-blocking mode to the netpoller + +Either ones where kind == kindNonBlock or those we've successfully called syscall.SetNonblock() on. +Restore blocking behavior if we detect an error registering with the netpoller and our flow was +successful in setting the inital syscall.SetNonblock(). + +Update #54100 + +Change-Id: I08934e4107c7fb36c15a7ca23ac880490b4df235 + +--- src/os/file_unix.go.orig 2022-08-01 22:45:57 UTC ++++ src/os/file_unix.go +@@ -168,18 +168,28 @@ func newFile(fd uintptr, name string, kind newFileKind + } + } + +- if err := f.pfd.Init("file", pollable); err != nil { +- // An error here indicates a failure to register +- // with the netpoll system. That can happen for +- // a file descriptor that is not supported by +- // epoll/kqueue; for example, disk files on +- // Linux systems. We assume that any real error +- // will show up in later I/O. +- } else if pollable { +- // We successfully registered with netpoll, so put +- // the file into nonblocking mode. +- if err := syscall.SetNonblock(fdi, true); err == nil { ++ clearNonBlock := false ++ if pollable { ++ if kind == kindNonBlock { + f.nonblock = true ++ } else if err := syscall.SetNonblock(fdi, true); err == nil { ++ f.nonblock = true ++ clearNonBlock = true ++ } else { ++ pollable = false ++ } ++ } ++ ++ // An error here indicates a failure to register ++ // with the netpoll system. That can happen for ++ // a file descriptor that is not supported by ++ // epoll/kqueue; for example, disk files on ++ // Linux systems. We assume that any real error ++ // will show up in later I/O. ++ // We do restore the blocking behavior if it was set by us. ++ if pollErr := f.pfd.Init("file", pollable); pollErr != nil && clearNonBlock { ++ if err := syscall.SetNonblock(fdi, false); err == nil { ++ f.nonblock = false + } + } +