Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_sock_connect_sock_write_race() of test.test_asyncio.test_selector_events fails randomly on FreeBSD #72470

Closed
vstinner opened this issue Sep 27, 2016 · 9 comments
Labels
3.7 (EOL) end of life tests Tests in the Lib/test dir topic-asyncio type-bug An unexpected behavior, bug, or error

Comments

@vstinner
Copy link
Member

BPO 28283
Nosy @gvanrossum, @vstinner, @berkerpeksag, @1st1, @koobs

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2016-09-27.21:41:25.916>
created_at = <Date 2016-09-27.06:34:24.346>
labels = ['3.7', 'type-bug', 'tests', 'expert-asyncio']
title = 'test_sock_connect_sock_write_race() of test.test_asyncio.test_selector_events fails randomly on FreeBSD'
updated_at = <Date 2016-10-01.01:15:53.293>
user = 'https://github.com/vstinner'

bugs.python.org fields:

activity = <Date 2016-10-01.01:15:53.293>
actor = 'python-dev'
assignee = 'none'
closed = True
closed_date = <Date 2016-09-27.21:41:25.916>
closer = 'berker.peksag'
components = ['Tests', 'asyncio']
creation = <Date 2016-09-27.06:34:24.346>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 28283
keywords = ['buildbot']
message_count = 9.0
messages = ['277492', '277493', '277520', '277527', '277545', '277551', '277552', '277553', '277786']
nosy_count = 6.0
nosy_names = ['gvanrossum', 'vstinner', 'python-dev', 'berker.peksag', 'yselivanov', 'koobs']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue28283'
versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

@vstinner
Copy link
Member Author

The issue bpo-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

@vstinner vstinner added 3.7 (EOL) end of life tests Tests in the Lib/test dir topic-asyncio labels Sep 27, 2016
@vstinner
Copy link
Member Author

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.

@berkerpeksag
Copy link
Member

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 bpo-28176. Did you had a chance to take a look at it?

@berkerpeksag berkerpeksag added the type-bug An unexpected behavior, bug, or error label Sep 27, 2016
@1st1
Copy link
Member

1st1 commented Sep 27, 2016

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.

@vstinner
Copy link
Member Author

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.

@1st1
Copy link
Member

1st1 commented Sep 27, 2016

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.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Sep 27, 2016

New changeset cf93671100bf by Berker Peksag in branch '3.5':
Issue bpo-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 bpo-28283: Merge from 3.5
https://hg.python.org/cpython/rev/b9f18dcbfc4b

New changeset 27fc857ea8af by Berker Peksag in branch 'default':
Issue bpo-28283: Merge from 3.6
https://hg.python.org/cpython/rev/27fc857ea8af

@berkerpeksag
Copy link
Member

@python-dev
Copy link
Mannequin

python-dev mannequin commented Oct 1, 2016

New changeset f7688db81753 by Berker Peksag in branch '3.5':
Issue bpo-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 bpo-28283: Merge from 3.5
https://hg.python.org/cpython/rev/0fe04467c4b5

New changeset 4ba2f6bce7f4 by Berker Peksag in branch 'default':
Issue bpo-28283: Merge from 3.6
https://hg.python.org/cpython/rev/4ba2f6bce7f4

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life tests Tests in the Lib/test dir topic-asyncio type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants