classification
Title: test_logout() of test_imaplib.RemoteIMAP_STARTTLSTest failed randomly on s390x Debian 3.x
Type: Stage: resolved
Components: Tests Versions: Python 3.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: vstinner
Priority: normal Keywords:

Created on 2017-06-13 09:14 by vstinner, last changed 2017-09-15 16:33 by vstinner. This issue is now closed.

Messages (3)
msg295874 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-13 09:14
The test failed on s390x Debian 3.x but then passed when run again.

http://buildbot.python.org/all/builders/s390x%20Debian%203.x/builds/868/steps/test/logs/stdio

0:07:58 load avg: 1.15 [286/406/1] test_imaplib failed -- running: test_multiprocessing_spawn (76 sec)
...
test_logincapa (test.test_imaplib.RemoteIMAPTest) ... ok
test_logout (test.test_imaplib.RemoteIMAPTest) ... ok
test_logincapa (test.test_imaplib.RemoteIMAP_SSLTest) ... ok
test_logincapa_with_client_certfile (test.test_imaplib.RemoteIMAP_SSLTest) ... skipped "bpo-30175: FIXME: cyrus.andrew.cmu.edu doesn't accept our randomly generated client x509 certificate anymore"
test_logincapa_with_client_ssl_context (test.test_imaplib.RemoteIMAP_SSLTest) ... skipped "bpo-30175: FIXME: cyrus.andrew.cmu.edu doesn't accept our randomly generated client x509 certificate anymore"
test_logout (test.test_imaplib.RemoteIMAP_SSLTest) ... ok
test_ssl_context_certfile_exclusive (test.test_imaplib.RemoteIMAP_SSLTest) ... ok
test_ssl_context_keyfile_exclusive (test.test_imaplib.RemoteIMAP_SSLTest) ... ok
test_logincapa (test.test_imaplib.RemoteIMAP_STARTTLSTest) ... ok
test_logout (test.test_imaplib.RemoteIMAP_STARTTLSTest) ... FAIL
...
======================================================================
FAIL: test_logout (test.test_imaplib.RemoteIMAP_STARTTLSTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/test_imaplib.py", line 916, in test_logout
    self.assertEqual(rs[0], 'BYE')
AssertionError: 'NO' != 'BYE'
- NO
+ BYE

(...)

Re-running test 'test_imaplib' in verbose mode
(...)
Ran 95 tests in 15.863s
OK (skipped=2)
msg295877 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-13 09:25
Similar failure on AMD64 FreeBSD CURRENT Non-Debug 3.6:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.6/builds/229/steps/test/logs/stdio

(...)

test_enable_raises_error_if_no_capability (test.test_imaplib.ThreadedNetworkedTests) ... creating server
server created
ADDR = ('127.0.0.1', 0)
CLASS = <class 'socketserver.TCPServer'>
HDLR = <class 'test.test_imaplib.ThreadedNetworkedTests.test_enable_raises_error_if_no_capability.<locals>.NoEnableServer'>
server running
SENT: b'* OK IMAP4rev1'
waiting for server
done
ERROR

(...)

======================================================================
ERROR: test_enable_raises_error_if_no_capability (test.test_imaplib.ThreadedNetworkedTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/test/support/__init__.py", line 2035, in decorator
    return func(*args)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/test/test_imaplib.py", line 673, in test_enable_raises_error_if_no_capability
    with self.reaped_pair(NoEnableServer) as (server, client):
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/test/test_imaplib.py", line 563, in reaped_pair
    client = self.imap_class(*server.server_address)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/imaplib.py", line 200, in __init__
    self._connect()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/imaplib.py", line 250, in _connect
    self._get_capabilities()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/imaplib.py", line 1027, in _get_capabilities
    typ, dat = self.capability()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/imaplib.py", line 435, in capability
    typ, dat = self._simple_command(name)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/imaplib.py", line 1191, in _simple_command
    return self._command_complete(name, self._command(name, *args))
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/imaplib.py", line 1014, in _command_complete
    typ, data = self._get_tagged_response(tag)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/imaplib.py", line 1134, in _get_tagged_response
    self._get_response()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/imaplib.py", line 1042, in _get_response
    resp = self._get_line()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/imaplib.py", line 1144, in _get_line
    line = self.readline()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/imaplib.py", line 305, in readline
    line = self.file.readline(_MAXLINE + 1)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 54] Connection reset by peer

(...)
Re-running test 'test_imaplib' in verbose mode
(...)

test_enable_raises_error_if_no_capability (test.test_imaplib.ThreadedNetworkedTests) ... creating server
server created
ADDR = ('127.0.0.1', 0)
CLASS = <class 'socketserver.TCPServer'>
HDLR = <class 'test.test_imaplib.ThreadedNetworkedTests.test_enable_raises_error_if_no_capability.<locals>.NoEnableServer'>
server running
SENT: b'* OK IMAP4rev1'
GOT: b'NMFJ0 CAPABILITY'
SENT: b'* CAPABILITY IMAP4rev1 AUTH'
SENT: b'NMFJ0 OK CAPABILITY completed'
GOT: b'NMFJ1 LOGOUT'
SENT: b'* BYE IMAP4ref1 Server logging out'
SENT: b'NMFJ1 OK LOGOUT completed'
waiting for server
done
ok
msg302267 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-09-15 16:33
I didn't see this error recently, so I close it. It seems like a random network issue :-/
History
Date User Action Args
2017-09-15 16:33:24vstinnersetstatus: open -> closed
resolution: out of date
messages: + msg302267

stage: resolved
2017-06-13 09:25:52vstinnersetmessages: + msg295877
2017-06-13 09:14:50vstinnercreate