classification
Title: test_socket: SendmsgSCTPStreamTest.testSendmsgTimeout() failed on Travis CI with: [Errno 12] Cannot allocate memory
Type: Stage: resolved
Components: Tests Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: miss-islington, vstinner
Priority: normal Keywords: patch

Created on 2018-06-22 07:32 by vstinner, last changed 2018-09-25 17:24 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9557 merged vstinner, 2018-09-25 07:11
PR 9565 merged miss-islington, 2018-09-25 15:30
PR 9566 merged miss-islington, 2018-09-25 15:30
Messages (9)
msg320217 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-06-22 07:32
https://travis-ci.org/python/cpython/jobs/395349473

======================================================================
ERROR: testSendmsgTimeout (test.test_socket.SendmsgSCTPStreamTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 281, in _tearDown
    raise exc
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 299, in clientRun
    test_func()
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 2319, in _testSendmsgTimeout
    self.sendmsgToServer([b"a"*512])
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 2008, in sendmsgToServer
    *(args + self.sendmsg_to_server_defaults[len(args):]))
OSError: [Errno 12] Cannot allocate memory
======================================================================
FAIL: testSendmsgDontWait (test.test_socket.SendmsgSCTPStreamTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 281, in _tearDown
    raise exc
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 299, in clientRun
    test_func()
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 2343, in _testSendmsgDontWait
    (errno.EAGAIN, errno.EWOULDBLOCK))
AssertionError: 12 not found in (11, 11)

test_socket failed when run in parallel, but also when the test has been re-run sequentially in verbose mode.

== Tests result: FAILURE then FAILURE ==
393 tests OK.
10 slowest tests:
- test_multiprocessing_spawn: 2 min 36 sec
- test_multiprocessing_forkserver: 1 min 41 sec
- test_multiprocessing_fork: 1 min 26 sec
- test_asyncio: 1 min 8 sec
- test_concurrent_futures: 1 min 7 sec
- test_subprocess: 59 sec
- test_zipfile: 47 sec
- test_io: 42 sec
- test_lib2to3: 33 sec
- test_lzma: 29 sec
1 test failed:
    test_socket
13 tests skipped:
    test_devpoll test_gdb test_kqueue test_msilib test_ossaudiodev
    test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio
    test_winreg test_winsound test_zipfile64
1 re-run test:
    test_socket
msg321511 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-11 22:26
Recent failure (17 days ago) on the master branch:

https://travis-ci.org/python/cpython/jobs/396258134

======================================================================
ERROR: testSendmsgTimeout (test.test_socket.SendmsgSCTPStreamTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 314, in _tearDown
    raise exc
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 332, in clientRun
    test_func()
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 2648, in _testSendmsgTimeout
    self.sendmsgToServer([b"a"*512])
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 2337, in sendmsgToServer
    *(args + self.sendmsg_to_server_defaults[len(args):]))
OSError: [Errno 12] Cannot allocate memory
======================================================================
FAIL: testSendmsgDontWait (test.test_socket.SendmsgSCTPStreamTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 314, in _tearDown
    raise exc
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 332, in clientRun
    test_func()
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 2672, in _testSendmsgDontWait
    (errno.EAGAIN, errno.EWOULDBLOCK))
AssertionError: 12 not found in (11, 11)
msg325759 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-09-19 13:09
This issue just occurred on a 3.7 PR:
https://github.com/python/cpython/pull/9416#pullrequestreview-156769445
https://travis-ci.org/python/cpython/jobs/430490176
msg326328 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-09-25 07:12
I wrote PR 9557 to fix the issue. test_socket fails frequently on Travis CI, on the three Python 3.x branches.
msg326362 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-09-25 15:30
New changeset 46f40be8b907854deb81c6132b7cb038e9e5202a by Victor Stinner in branch 'master':
bpo-33937: Catch ENOMEM error in test_socket (#9557)
https://github.com/python/cpython/commit/46f40be8b907854deb81c6132b7cb038e9e5202a
msg326366 - (view) Author: miss-islington (miss-islington) Date: 2018-09-25 15:49
New changeset ef1173ab141ba5387598f8859ba96f98d20d743e by Miss Islington (bot) in branch '3.7':
bpo-33937: Catch ENOMEM error in test_socket (GH-9557)
https://github.com/python/cpython/commit/ef1173ab141ba5387598f8859ba96f98d20d743e
msg326367 - (view) Author: miss-islington (miss-islington) Date: 2018-09-25 16:00
New changeset 857b0028c0832c3159927489bc55f802bc5146cb by Miss Islington (bot) in branch '3.6':
bpo-33937: Catch ENOMEM error in test_socket (GH-9557)
https://github.com/python/cpython/commit/857b0028c0832c3159927489bc55f802bc5146cb
msg326377 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-09-25 17:23
The issue should now be fixed. Reopen it if it is not the case.
msg326378 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-09-25 17:24
Thanks for the review Pablo.
History
Date User Action Args
2018-09-25 17:24:01vstinnersetmessages: + msg326378
2018-09-25 17:23:40vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg326377

stage: patch review -> resolved
2018-09-25 16:00:55miss-islingtonsetmessages: + msg326367
2018-09-25 15:49:36miss-islingtonsetnosy: + miss-islington
messages: + msg326366
2018-09-25 15:30:39miss-islingtonsetpull_requests: + pull_request8968
2018-09-25 15:30:32miss-islingtonsetpull_requests: + pull_request8967
2018-09-25 15:30:21vstinnersetmessages: + msg326362
2018-09-25 07:12:03vstinnersetmessages: + msg326328
2018-09-25 07:11:00vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request8960
2018-09-19 13:09:36vstinnersetmessages: + msg325759
2018-07-11 22:28:57vstinnersettitle: [3.6] test_socket: SendmsgSCTPStreamTest.testSendmsgTimeout() failed on Travis CI -> test_socket: SendmsgSCTPStreamTest.testSendmsgTimeout() failed on Travis CI with: [Errno 12] Cannot allocate memory
2018-07-11 22:26:00vstinnersetmessages: + msg321511
2018-06-27 21:11:51vstinnersettitle: [3.6] test_socket: testSendmsgTimeout() failed on Travis CI -> [3.6] test_socket: SendmsgSCTPStreamTest.testSendmsgTimeout() failed on Travis CI
2018-06-22 07:32:56vstinnercreate