Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock X-Debbugs-Cc: python-mito...@packages.debian.org Control: affects -1 + src:python-mitogen
Please unblock package python-mitogen [ Reason ] This resolves bug 1036018. Apparently ansible has grown the number of open file handles over time, causing select() to become unusable. Use poll() instead of select. python-mitogen development is somewhat sporadic at the moment. We patched it to support Ansible 6, even though upstream hadn't declared support, yet. That probably contributed to this bug appearing. Upstream hasn't picked up this patch, yet. But it's been sitting on GitHub since early Feb, and resolves the issue. [ Impact ] Some users will hit "filedescriptor out of range in select()" errors when using ansible with miteogen. [ Tests ] I've manually tested ansible with mitogen, and it seems to work. The automated test suite passes. Some of the GitHub actions tests for this PR failed. But the affected platforms don't seem relevant to us. [ Risks ] Patch is relatively straightforward. Replacing one drop-in class in place of another. [ Checklist ] [x] all changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in testing unblock python-mitogen/0.3.3-9
diff -Nru python-mitogen-0.3.3/debian/changelog python-mitogen-0.3.3/debian/changelog --- python-mitogen-0.3.3/debian/changelog 2022-12-13 22:43:51.000000000 -0400 +++ python-mitogen-0.3.3/debian/changelog 2023-05-13 09:45:14.000000000 -0400 @@ -1,3 +1,10 @@ +python-mitogen (0.3.3-9) unstable; urgency=medium + + * Patch: Use poll() in the broker to handle more file descriptors. + (Closes: #1036018) + + -- Stefano Rivera <stefa...@debian.org> Sat, 13 May 2023 09:45:14 -0400 + python-mitogen (0.3.3-8) unstable; urgency=medium * Team upload. diff -Nru python-mitogen-0.3.3/debian/patches/poll-poller python-mitogen-0.3.3/debian/patches/poll-poller --- python-mitogen-0.3.3/debian/patches/poll-poller 1969-12-31 20:00:00.000000000 -0400 +++ python-mitogen-0.3.3/debian/patches/poll-poller 2023-05-13 09:45:14.000000000 -0400 @@ -0,0 +1,28 @@ +From: Luca Berruti <nadi...@gmail.com> +Date: Wed, 8 Feb 2023 14:05:25 +0100 +Subject: Fix: filedescriptor out of range in select() + +Bug-Debian: https://bugs.debian.org/1036018 +Bug-Upstream: https://github.com/mitogen-hq/mitogen/issues/957 +Origin: https://github.com/mitogen-hq/mitogen/pull/984 +--- + ansible_mitogen/process.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/ansible_mitogen/process.py b/ansible_mitogen/process.py +index 63caa88..8c19c37 100644 +--- a/ansible_mitogen/process.py ++++ b/ansible_mitogen/process.py +@@ -285,8 +285,10 @@ class Broker(mitogen.master.Broker): + the exuberant syscall expense of EpollPoller, so override it and restore + the poll() poller. + """ +- poller_class = mitogen.core.Poller +- ++ if mitogen.parent.PollPoller.SUPPORTED: ++ poller_class = mitogen.parent.PollPoller ++ else: ++ poller_class = mitogen.core.Poller + + class Binding(object): + """ diff -Nru python-mitogen-0.3.3/debian/patches/series python-mitogen-0.3.3/debian/patches/series --- python-mitogen-0.3.3/debian/patches/series 2022-12-13 20:24:51.000000000 -0400 +++ python-mitogen-0.3.3/debian/patches/series 2023-05-13 09:45:14.000000000 -0400 @@ -6,3 +6,4 @@ skip-python2.7-test ansible-6 hack-remove-cleanup +poll-poller