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.

classification
Title: test_socket.test_create_connection() failed with EADDRNOTAVAIL (err 99)
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, martin.panter, serhiy.storchaka, vstinner
Priority: normal Keywords: patch

Created on 2017-10-31 17:05 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4206 merged vstinner, 2017-11-01 01:43
PR 4208 merged python-dev, 2017-11-01 02:48
PR 4209 merged python-dev, 2017-11-01 02:49
Messages (8)
msg305316 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-10-31 17:05
On my PR 4200 which is unrelated to networking, the following test failed once.

FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 4537, in test_create_connection
    self.assertIn(cm.exception.errno, expected_errnos)
AssertionError: 99 not found in [111, 101]


With error codes:

* 99: EADDRNOTAVAIL: Cannot assign requested address
* 111: ECONNREFUSED: Connection refused
* 101: ENETUNREACH: Network is unreachable

Maybe we shold include EADDRNOTAVAIL in the expected error codes?
msg305336 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-31 19:58
I'm not a networking but it seems reasonable. If I understand correctly, EADDRNOTAVAIL can be raised on the Travis CI when a large number of network connections are created simultaneously by other CI tests.

Or maybe just repeat the test if EADDRNOTAVAIL is raised?
msg305346 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-01 01:43
> Or maybe just repeat the test if EADDRNOTAVAIL is raised?

I don't think that it's worth it.
msg305353 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-01 02:48
New changeset 280c22a82a6756e9caffef031c564fd98f1b50e7 by Victor Stinner in branch 'master':
Fix test_socket.test_create_connection() (#4206)
https://github.com/python/cpython/commit/280c22a82a6756e9caffef031c564fd98f1b50e7
msg305376 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-01 13:07
New changeset 89b84b026b389f3c61cbbc5ee89afd8248721b0d by Victor Stinner (Miss Islington (bot)) in branch '3.6':
Fix test_socket.test_create_connection() (GH-4206) (#4208)
https://github.com/python/cpython/commit/89b84b026b389f3c61cbbc5ee89afd8248721b0d
msg305377 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-01 13:08
New changeset 4b73a79e796c3832be0cfd45bc27f15aea32b621 by Victor Stinner (Miss Islington (bot)) in branch '2.7':
Fix test_socket.test_create_connection() (GH-4206) (#4209)
https://github.com/python/cpython/commit/4b73a79e796c3832be0cfd45bc27f15aea32b621
msg305821 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-11-08 11:11
I don't see this failure on Travis for a while now. Can this issue be closed?
msg305842 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-08 13:53
> I don't see this failure on Travis for a while now. Can this issue be closed?

Since the failure occurred randomly, we cannot make sure that the bug is really fixed. Usually in this case, I close the issue, but reopen it if the bug comes back.

So yes, I close the issue right now.
History
Date User Action Args
2022-04-11 14:58:53adminsetgithub: 76091
2017-11-08 13:53:09vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg305842

stage: patch review -> resolved
2017-11-08 11:11:31berker.peksagsettype: behavior

messages: + msg305821
nosy: + berker.peksag
2017-11-01 13:08:42vstinnersetmessages: + msg305377
2017-11-01 13:07:27vstinnersetmessages: + msg305376
2017-11-01 02:49:33python-devsetpull_requests: + pull_request4178
2017-11-01 02:48:37python-devsetpull_requests: + pull_request4177
2017-11-01 02:48:16vstinnersetmessages: + msg305353
2017-11-01 01:43:59vstinnersetmessages: + msg305346
2017-11-01 01:43:11vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request4175
2017-10-31 19:58:54serhiy.storchakasetmessages: + msg305336
2017-10-31 17:05:22vstinnercreate