classification
Title: test_sock_connect_sock_write_race() of test.test_asyncio.test_selector_events fails randomly on FreeBSD
Type: behavior Stage: resolved
Components: asyncio, Tests Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, gvanrossum, koobs, python-dev, vstinner, yselivanov
Priority: normal Keywords: buildbot

Created on 2016-09-27 06:34 by vstinner, last changed 2016-10-01 01:15 by python-dev. This issue is now closed.

Messages (9)
msg277492 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-09-27 06:34
The issue #28176 introduced a new unit test which fails randomly on FreeBSD buildbots. Recent example:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/5162/steps/test/logs/stdio

======================================================================
ERROR: test_sock_connect_sock_write_race (test.test_asyncio.test_selector_events.SelectorLoopFunctionalTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_asyncio/test_selector_events.py", line 1868, in test_sock_connect_sock_write_race
    timeout=TIMEOUT))
  File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncio/base_events.py", line 457, in run_until_complete
    return future.result()
  File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncio/futures.py", line 292, in result
    raise self._exception
  File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncio/tasks.py", line 397, in wait_for
    raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
msg277493 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-09-27 06:47
Yury: Since you pushed the change adding the test, can you please take a look?

If nobody fixes the unit test, I will revert the change.
msg277520 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-09-27 16:02
> If nobody fixes the unit test, I will revert the change.

I attached a patch that skips the test in case of a timeout in issue 28176. Did you had a chance to take a look at it?
msg277527 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2016-09-27 17:23
Berker, I think it's an OK workaround. The test is kind of unstable, to the point of me thinking to just remove it (keeping the rest of the patch applied). Feel free to apply it.
msg277545 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-09-27 20:25
I dislike the idea of a test for a race condition which skips itself if it
fails to reproduce the race condition :-/ I like the idea of removing he
unit test.

But I don't have a strong opinion on this issue.
msg277551 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2016-09-27 21:24
> I dislike the idea of a test for a race condition which skips itself if it
fails to reproduce the race condition :-/ I like the idea of removing he
unit test.

OK, let's remove the test. I can do that myself in a couple of days.
msg277552 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-27 21:38
New changeset cf93671100bf by Berker Peksag in branch '3.5':
Issue #28283: Remove flaky test test_sock_connect_sock_write_race
https://hg.python.org/cpython/rev/cf93671100bf

New changeset b9f18dcbfc4b by Berker Peksag in branch '3.6':
Issue #28283: Merge from 3.5
https://hg.python.org/cpython/rev/b9f18dcbfc4b

New changeset 27fc857ea8af by Berker Peksag in branch 'default':
Issue #28283: Merge from 3.6
https://hg.python.org/cpython/rev/27fc857ea8af
msg277553 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-09-27 21:41
Just saw http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.5/builds/1136/steps/test/logs/stdio and went ahead to remove the test.
msg277786 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-10-01 01:15
New changeset f7688db81753 by Berker Peksag in branch '3.5':
Issue #28283: Remove flaky test test_sock_connect_sock_write_race again
https://hg.python.org/cpython/rev/f7688db81753

New changeset 0fe04467c4b5 by Berker Peksag in branch '3.6':
Issue #28283: Merge from 3.5
https://hg.python.org/cpython/rev/0fe04467c4b5

New changeset 4ba2f6bce7f4 by Berker Peksag in branch 'default':
Issue #28283: Merge from 3.6
https://hg.python.org/cpython/rev/4ba2f6bce7f4
History
Date User Action Args
2016-10-01 01:15:53python-devsetmessages: + msg277786
2016-09-27 21:41:25berker.peksagsetstatus: open -> closed
resolution: fixed
messages: + msg277553

stage: needs patch -> resolved
2016-09-27 21:38:52python-devsetnosy: + python-dev
messages: + msg277552
2016-09-27 21:24:36yselivanovsetmessages: + msg277551
2016-09-27 20:25:30vstinnersetmessages: + msg277545
2016-09-27 17:23:41yselivanovsetmessages: + msg277527
2016-09-27 16:02:04berker.peksagsetversions: + Python 3.5
nosy: + berker.peksag

messages: + msg277520

type: behavior
stage: needs patch
2016-09-27 06:47:58vstinnersetmessages: + msg277493
2016-09-27 06:34:24vstinnercreate