[New-bugs-announce] [issue38212] test_multiprocessing_spawn: test_queue_feeder_donot_stop_onexc() failed on x86 Windows7 3.x

STINNER Victor report at bugs.python.org
Wed Sep 18 05:21:37 EDT 2019


New submission from STINNER Victor <vstinner at python.org>:

x86 Windows7 3.x:
https://buildbot.python.org/all/#/builders/58/builds/3015

If I recall correctly, this buildbot is known to be slow.

It sounds like a race condition.

ERROR: test_queue_feeder_donot_stop_onexc (test.test_multiprocessing_spawn.WithProcessesTestQueue)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1132, in test_queue_feeder_donot_stop_onexc
    self.assertTrue(q.get(timeout=1.0))
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\queues.py", line 108, in get
    raise Empty
_queue.Empty


Extract of the test:

    def test_queue_feeder_donot_stop_onexc(self):
        # bpo-30414: verify feeder handles exceptions correctly
        if self.TYPE != 'processes':
            self.skipTest('test not appropriate for {}'.format(self.TYPE))

        class NotSerializable(object):
            def __reduce__(self):
                raise AttributeError
        with test.support.captured_stderr():
            q = self.Queue()
            q.put(NotSerializable())
            q.put(True)
            # bpo-30595: use a timeout of 1 second for slow buildbots
            self.assertTrue(q.get(timeout=1.0))   # <===== FAIL HERE =====
            close_queue(q)

        ...


Hum, "bpo-30595: use a timeout of 1 second for slow buildbots" sounds like this test depends on time which is bad for reliable tests. Would it be possible to use a more reliable synchronization primitive?

If no solution is found, the workaround is to use a timeout of 60 seconds instead of just 1 second...

----------
components: Tests
messages: 352712
nosy: pablogsal, vstinner
priority: normal
severity: normal
status: open
title: test_multiprocessing_spawn: test_queue_feeder_donot_stop_onexc() failed on x86 Windows7 3.x
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38212>
_______________________________________


More information about the New-bugs-announce mailing list