FreeBSD Bugzilla – Attachment 242124 Details for
Bug 271367
sysutils/py-salt: workaround a hanging minion bug
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
git(1) diff against the ports tree
0001-sysutils-py-salt-workaround-a-hanging-minion-issue.patch (text/plain), 3.35 KB, created by
Kyle Evans
on 2023-05-11 18:11:21 UTC
(
hide
)
Description:
git(1) diff against the ports tree
Filename:
MIME Type:
Creator:
Kyle Evans
Created:
2023-05-11 18:11:21 UTC
Size:
3.35 KB
patch
obsolete
>From 6d8f2315c8f0d03897ae48cb52e1324e13e8081a Mon Sep 17 00:00:00 2001 >From: Kyle Evans <kevans@FreeBSD.org> >Date: Thu, 11 May 2023 13:03:00 -0500 >Subject: [PATCH] sysutils/py-salt: workaround a hanging minion issue >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >From the patch description: > >-- >Workaround for https://github.com/saltstack/salt/issues/64074 > >As of salt v3005, it's possible for a minion process to get >irrecoverably wedged due to some restructuring in IPC. Namely, payloads >that are to be reported back to the master are written over a UNIX >socket by the very same thread that is expected to drain the socket's >receive buffer. > >Smaller payloads are fine, but anything that exceeds FreeBSD's default >receive buffer size (8KB) results in the process hanging in socket write >for some buffer space that will never come. The most obvious way to >identify a hung minion is a lingering zombie child, but it will more >generally stop responding to salt-master. >-- > >The workaround is to simply bump the receive buffer size so that the >vast majority of payloads won't trigger it. This code likely requires >some restructuring upstream to avoid writing to a pipe that the same >thread is responsible for draining. > >Submitted by: Johan Söllvander <jsollvander_axcient.com> >--- > sysutils/py-salt/Makefile | 2 +- > .../files/patch-salt_ext_tornado_iostream.py | 23 +++++++++++++++++++ > 2 files changed, 24 insertions(+), 1 deletion(-) > create mode 100644 sysutils/py-salt/files/patch-salt_ext_tornado_iostream.py > >diff --git a/sysutils/py-salt/Makefile b/sysutils/py-salt/Makefile >index b32abac6a4de..25bd78b9f2e3 100644 >--- a/sysutils/py-salt/Makefile >+++ b/sysutils/py-salt/Makefile >@@ -1,6 +1,6 @@ > PORTNAME= salt > PORTVERSION= 3005.1 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= sysutils python > MASTER_SITES= PYPI > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} >diff --git a/sysutils/py-salt/files/patch-salt_ext_tornado_iostream.py b/sysutils/py-salt/files/patch-salt_ext_tornado_iostream.py >new file mode 100644 >index 000000000000..2ea532b1e761 >--- /dev/null >+++ b/sysutils/py-salt/files/patch-salt_ext_tornado_iostream.py >@@ -0,0 +1,23 @@ >+Workaround for https://github.com/saltstack/salt/issues/64074 >+ >+As of salt v3005, it's possible for a minion process to get irrecoverably >+wedged due to some restructuring in IPC. Namely, payloads that are to be >+reported back to the master are written over a UNIX socket by the very same >+thread that is expected to drain the socket's receive buffer. >+ >+Smaller payloads are fine, but anything that exceeds FreeBSD's default receive >+buffer size (8KB) results in the process hanging in socket write for some buffer >+space that will never come. The most obvious way to identify a hung minion is >+a lingering zombie child, but it will more generally stop responding to >+salt-master. >+ >+--- salt/ext/tornado/iostream.py.orig 2022-11-02 13:25:04 UTC >++++ salt/ext/tornado/iostream.py >+@@ -1116,6 +1116,7 @@ class IOStream(BaseIOStream): >+ future = self._connect_future = TracebackFuture() >+ try: >+ self.socket.connect(address) >++ self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 524288) >+ except socket.error as e: >+ # In non-blocking mode we expect connect() to raise an >+ # exception with EINPROGRESS or EWOULDBLOCK. >-- >2.40.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 271367
: 242124