| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The timer that sends SIGINT was started before entering the assertRaises() block. On a loaded machine the KeyboardInterrupt could be raised before the main thread reached time.sleep(), escape the test and stop the whole regrtest run. Start the timer inside the block.
There was a problem hiding this comment.
LGTM. 👍 Thank you for the analysis and the fix.
Sorry, something went wrong.
|
Thanks @christianaurichzm for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
Sorry, something went wrong.
|
Sorry, @christianaurichzm and @serhiy-storchaka, I could not cleanly backport this to 3.15 due to a conflict. Please backport manually with cherry_picker, see the devguide for more information. cherry_picker ea0ee925ad755999d6095ba61de2652ec9275f04 3.15 |
Sorry, something went wrong.
|
GH-158920 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
|
I cherry-picked this change in #158917, so no separate backport to 3.15 is needed. |
Sorry, something went wrong.
…GH-158920) On a loaded machine the KeyboardInterrupt could be raised before the main thread reached time.sleep(), escape the test and stop the whole regrtest run. (cherry picked from commit ea0ee92) Co-authored-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot aarch64 Fedora Stable Refleaks 3.x (tier-2) has failed when building commit ea0ee92. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/#/builders/123/builds/2520 Failed tests:
Failed subtests:
Test leaking resources:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/var/lib/buildbot/worker/cstratak-fedora-stable-aarch64/3.x.cstratak-fedora-stable-aarch64.refleak/build/Lib/test/test_asyncio/test_events.py", line 825, in test_create_connection_local_addr_skip_different_family
with self.assertRaises(OSError):
~~~~~~~~~~~~~~~~~^^^^^^^^^
AssertionError: OSError not raised
Traceback (most recent call last):
File "/var/lib/buildbot/worker/cstratak-fedora-stable-aarch64/3.x.cstratak-fedora-stable-aarch64.refleak/build/Lib/test/test_profile.py", line 70, in test_cprofile
self.fail("\n".join(fail))
~~~~~~~~~^^^^^^^^^^^^^^^^^
AssertionError:
Stats.print_stats output for Profile does not fit expectation:
---
+++
@@ -1,7 +1,7 @@
28 27.972 0.999 27.972 0.999 profilee.py:110(__getattr__)
- 1 269.996 269.996 999.769 999.769 profilee.py:25(testfunc)
- 23/3 149.937 6.519 169.917 56.639 profilee.py:35(factorial)
- 20 19.980 0.999 19.980 0.999 profilee.py:48(mul)
+ 1 269.997 269.997 999.816 999.816 profilee.py:25(testfunc)
+ 20/3 163.969 8.198 169.963 56.654 profilee.py:35(factorial)
+ 6 5.994 0.999 5.994 0.999 profilee.py:48(mul)
2 39.986 19.993 599.830 299.915 profilee.py:55(helper)
4 115.984 28.996 119.964 29.991 profilee.py:73(helper1)
2 -0.006 -0.003 139.946 69.973 profilee.py:84(helper2_indirect)
Traceback (most recent call last):
File "/var/lib/buildbot/worker/cstratak-fedora-stable-aarch64/3.x.cstratak-fedora-stable-aarch64.refleak/build/Lib/test/support/__init__.py", line 970, in gc_collect
gc.collect()
~~~~~~~~~~^^
ResourceWarning: unclosed <socket.socket fd=5, family=2, type=1, proto=6, laddr=('127.0.0.1', 57745), raddr=('127.0.0.1', 57745)>
Warning -- Unraisable exception
Exception ignored while calling deallocator <function _SelectorTransport.__del__ at 0xffff8e8abad0>:
Traceback (most recent call last):
File "/var/lib/buildbot/worker/cstratak-fedora-stable-aarch64/3.x.cstratak-fedora-stable-aarch64.refleak/build/Lib/asyncio/selector_events.py", line 882, in __del__
_warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ResourceWarning: unclosed transport <_SelectorSocketTransport fd=5>
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
InterruptTest.test_interrupt_blocking_call (added in gh-157662) started the timer that sends SIGINT before entering the assertRaises() block:
If the main thread takes more than 0.1 seconds to get from timer.start() to time.sleep(), the KeyboardInterrupt is raised outside the block. It escapes the test, and regrtest stops the whole run ("Test suite interrupted by signal SIGINT"). This happened on the AMD64 Windows Server 2022 NoGIL buildbot, as reported in gh-74112, and in the "macOS (free-threading)" job on #158910 and #158828. In all three cases the build was free-threaded and the machine was loaded.
This change starts the timer inside the block, so the interrupt is caught wherever it arrives.
Verification
I ran the real test 300 times in a loop on a free-threaded debug build, with 48 busy processes on 16 cores:
On the default build it did not reproduce under the same load (0 out of 500 before and after). There the timer thread needs the GIL to send the signal, which in practice hides the window. test_idle passes on both builds.