From nobody Tue Aug 09 17:29:17 2022 X-Original-To: dev-commits-ports-main@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 4M2KnB1SNlz4YbgN; Tue, 9 Aug 2022 17:29:18 +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 4M2KnB0rc5z3Gnq; Tue, 9 Aug 2022 17:29:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660066158; 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=Qdl1IpgZRsBkVln1c2gUbH9vXKRBSOTy4jYDkbCVDug=; b=IzXcsWSBUa4r1i1NKAUARM+8Y6BU85gOQUfBhJgCR79gS7YTem0o/vIlkDk9Vzgz5XQ6ko xywE2pHiOKhpqShbafs6sOBHV+BG/T1EMxzGOKLb4Rf7updJjRvv7PbTlARMkz496rnmoQ rk57BUFi05G55YMEKqOJls/Bg06eZlndt98UaTfFJ4pOyAizmUe5Nesm79jVYfzRub8ttY HwigjVoTgLvzDNk3lSj+0px980D8exvN+wUQEqZvBZveQF23FqHJFd/2gIfqme+xirFPVz wMTqzDNCqQcCtjer5ruOIz54XSPwBIeqI5iagU2xvpk5n96WjIOAWN42O5id9Q== 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 4M2Kn96wXWzfrZ; Tue, 9 Aug 2022 17:29:17 +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 279HTHvm017070; Tue, 9 Aug 2022 17:29:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 279HTHdk017068; Tue, 9 Aug 2022 17:29:17 GMT (envelope-from git) Date: Tue, 9 Aug 2022 17:29:17 GMT Message-Id: <202208091729.279HTHdk017068@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dmitri Goutnik Subject: git: 41e4cf7d809d - main - lang/go119: Backport upstream fix for /dev/fuse polling issue List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@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/main X-Git-Reftype: branch X-Git-Commit: 41e4cf7d809db0be86d7aced3107ba9eec12a4bb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660066158; 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=Qdl1IpgZRsBkVln1c2gUbH9vXKRBSOTy4jYDkbCVDug=; b=ULiqYHFZDc+DmcKwguKpk2fEKTTv6kE7G/clQJ9wZ/1SncvsGx6EBotJe4HXcRAqExe9L5 JsgkJgfmPXQ5eXlep5cw+3LRNhYZ96ptYX7RP9YSzsBMhzKgadTCQFFx+2QW+DGCbOMzrU BfzfHe1Wt4dFiUGnswgz2UvEduKDcOMC4uKQDqnB24glmIVQfMM4uGP6/tq+kZPrz2Scas FNQT/YlMP2AbOTD8UGs9nmoEMBcrlocNni8Eo9CJykWNKLQmajBH2N85Oa8gJCEgBpLYiA x7EOos3NTwx4si5LeXr09Jytt7GZ2cc1CPkI+sTOmjBErmezCJmRdYbhJ7WIlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660066158; a=rsa-sha256; cv=none; b=AyueG/eZh1ShLTtLC2ZzYGM5QO/hhX9WyGBA6o4c9yzvHuGHZllIcjYoluRNt8UmJYStk5 L+jHU/JdZIFaHFFwO9CtZ5tP1fD5ha33T+bwQlSFAhzQbVWNB6h1DWySlpHruJGyMtqIuK 3ixxkjojGcG+BrYHT9eHyxua2g5NHPTggEutNL1Gr9Bp7ZpUdAcupkNuCgq7d2xAA/v8iU fgNWWfaSuPd0VLXNBHdTx/lJ41woc9C5tgqYeUca1sJruVyFgidkb5kv5b0IsgZ5qoxPj2 PJUKiuYJyVh8HKc3/vtbGv3b6r00BQNZE7O05sz9pjMiZ4aDa0HmrLfv7R83ZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dmgk: URL: https://cgit.FreeBSD.org/ports/commit/?id=41e4cf7d809db0be86d7aced3107ba9eec12a4bb commit 41e4cf7d809db0be86d7aced3107ba9eec12a4bb Author: Dmitri Goutnik AuthorDate: 2022-08-09 17:14:18 +0000 Commit: Dmitri Goutnik CommitDate: 2022-08-09 17:28:23 +0000 lang/go119: 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/go119/Makefile | 2 +- lang/go119/files/patch-src_os_file__unix.go | 55 +++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/lang/go119/Makefile b/lang/go119/Makefile index ea9aa3fde1c2..3a2fb89410dc 100644 --- a/lang/go119/Makefile +++ b/lang/go119/Makefile @@ -1,6 +1,6 @@ DISTVERSION= 1.19 # 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/go119/files/patch-src_os_file__unix.go b/lang/go119/files/patch-src_os_file__unix.go new file mode 100644 index 000000000000..3f53fce01948 --- /dev/null +++ b/lang/go119/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 + } + } +