This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients pablogsal, vstinner
Date 2019-09-18.09:21:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568798497.72.0.146892893981.issue38212@roundup.psfhosted.org>
In-reply-to
Content
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...
History
Date User Action Args
2019-09-18 09:21:37vstinnersetrecipients: + vstinner, pablogsal
2019-09-18 09:21:37vstinnersetmessageid: <1568798497.72.0.146892893981.issue38212@roundup.psfhosted.org>
2019-09-18 09:21:37vstinnerlinkissue38212 messages
2019-09-18 09:21:36vstinnercreate