[New-bugs-announce] [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75
Pablo Galindo Salgado
report at bugs.python.org
Thu Dec 27 22:45:59 EST 2018
New submission from Pablo Galindo Salgado <pablogsal at gmail.com>:
There is a race condition in FAIL: test_signal_handling_args (test.test_asyncio.test_events.KqueueEventLoopTests) in macOS:
https://buildbot.python.org/all/#/builders/147/builds/546/steps/4/logs/stdio
======================================================================
FAIL: test_signal_handling_args (test.test_asyncio.test_events.KqueueEventLoopTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.7.billenstein-sierra/build/Lib/test/test_asyncio/test_events.py", line 595, in test_signal_handling_args
self.assertEqual(caught, 1)
AssertionError: 0 != 1
It seems that SIGALRM is never received in the 0.5 seconds of timeout:
def test_signal_handling_args(self):
some_args = (42,)
caught = 0
def my_handler(*args):
nonlocal caught
caught += 1
self.assertEqual(args, some_args)
self.loop.add_signal_handler(signal.SIGALRM, my_handler, *some_args)
signal.setitimer(signal.ITIMER_REAL, 0.1, 0) # Send SIGALRM once.
self.loop.call_later(0.5, self.loop.stop)
self.loop.run_forever()
self.assertEqual(caught, 1)
Maybe we should set up a much bigger timeout and make the handle stop the event loop.
----------
components: Tests, asyncio, macOS
messages: 332637
nosy: asvetlov, ned.deily, pablogsal, ronaldoussoren, yselivanov
priority: normal
severity: normal
status: open
title: Race condition in test_signal_handling_args x86-64 High Sierra 3.75
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35601>
_______________________________________
More information about the New-bugs-announce
mailing list