You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_nntplib: random EOFError in setUpClass() #74374
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=Noneclosed_at=<Date2018-09-19.23:12:18.222>created_at=<Date2017-04-27.15:07:08.251>labels= ['3.7', 'tests']
title='test_nntplib: random EOFError in setUpClass()'updated_at=<Date2018-09-19.23:12:18.221>user='https://github.com/vstinner'
Traceback (most recent call last):
File "/home/haypo/prog/python/master/Lib/test/test_nntplib.py", line 289, in setUpClasscls.server =cls.NNTP_CLASS(cls.NNTP_HOST, timeout=TIMEOUT, usenetrc=False)
File "/home/haypo/prog/python/master/Lib/nntplib.py", line 1048, in __init__
readermode, timeout)
File "/home/haypo/prog/python/master/Lib/nntplib.py", line 330, in __init__self.welcome =self._getresp()
File "/home/haypo/prog/python/master/Lib/nntplib.py", line 449, in _getresp
resp =self._getline()
File "/home/haypo/prog/python/master/Lib/nntplib.py", line 437, in _getlineifnot line: raiseEOFError
EOFError
NetworkedNNTPTests uses the NNTP server news.trigofacile.com (port 119). It's possible to connect to this server (IPv4: 91.121.26.68), but recv() returns an empty string.
Traceback (most recent call last):
File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/test/test_nntplib.py", line 291, in setUpClass
usenetrc=False)
File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/nntplib.py", line 1077, in __init__self.sock = _encrypt_on(self.sock, ssl_context, host)
File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/nntplib.py", line 292, in _encrypt_onreturn context.wrap_socket(sock, server_hostname=hostname)
File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/ssl.py", line 385, in wrap_socket
_context=self)
File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/ssl.py", line 760, in __init__self.do_handshake()
File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/ssl.py", line 996, in do_handshakeself._sslobj.do_handshake()
File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/ssl.py", line 641, in do_handshakeself._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:719)
Traceback (most recent call last):
File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_nntplib.py", line 241, in wrapped
meth(self)
File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_nntplib.py", line 263, in test_with_statementwithself.NNTP_CLASS(self.NNTP_HOST, timeout=TIMEOUT, usenetrc=False) as server:
File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/nntplib.py", line 1077, in __init__self.sock = _encrypt_on(self.sock, ssl_context, host)
File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/nntplib.py", line 292, in _encrypt_onreturn context.wrap_socket(sock, server_hostname=hostname)
File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/ssl.py", line 814, in __init__self.do_handshake()
File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/ssl.py", line 1068, in do_handshakeself._sslobj.do_handshake()
File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/ssl.py", line 689, in do_handshakeself._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:864)
Traceback (most recent call last):
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_nntplib.py", line 241, in wrapped
meth(self)
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_nntplib.py", line 263, in test_with_statementwithself.NNTP_CLASS(self.NNTP_HOST, timeout=TIMEOUT, usenetrc=False) as server:
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 1077, in __init__self.sock = _encrypt_on(self.sock, ssl_context, host)
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 292, in _encrypt_onreturn context.wrap_socket(sock, server_hostname=hostname)
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/ssl.py", line 411, in wrap_socket
_session=session
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/ssl.py", line 822, in __init__self.do_handshake()
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/ssl.py", line 1076, in do_handshakeself._sslobj.do_handshake()
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/ssl.py", line 697, in do_handshakeself._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:864)
Activity
vstinner commentedon Apr 27, 2017
Example of failure:
======================================================================
ERROR: setUpClass (test.test_nntplib.NetworkedNNTPTests)
----------------------------------------------------------------------
Attached PR catch this error and skips the test.
See also issue bpo-19613 and bpo-19756.
vstinner commentedon Apr 27, 2017
New changeset 5bccca5 by Victor Stinner in branch 'master':
bpo-30175: Skip client cert tests of test_imaplib (bpo-1320)
5bccca5
vstinner commentedon Apr 27, 2017
NetworkedNNTPTests uses the NNTP server news.trigofacile.com (port 119). It's possible to connect to this server (IPv4: 91.121.26.68), but recv() returns an empty string.
vstinner commentedon Apr 27, 2017
I see 3 options:
vstinner commentedon Apr 27, 2017
The news.trigofacile.com server was chosen in the commit 1cb121e (Antoine Pitrou in 2010) which also added the new NetworkedNNTPTests test case.
vstinner commentedon Apr 27, 2017
New changeset 4dc3b9c by Victor Stinner in branch '3.6':
bpo-30175: Skip client cert tests of test_imaplib (bpo-1320) (bpo-1323)
4dc3b9c
vstinner commentedon Apr 27, 2017
New changeset 0eda2d4 by Victor Stinner in branch '3.5':
bpo-30175: Skip client cert tests of test_imaplib (bpo-1320) (bpo-1324)
0eda2d4
vstinner commentedon Apr 27, 2017
I did that and I got a reply: the server is now fixed! :-D
The test is now skipped on server failure (in 3.5, 3.6 and master), and the server is repaired. So I close the issue.
Note: Python 2.7 doesn't have the unit test and so is not impacted.
vstinner commentedon Jul 24, 2017
Similar but different error (ssl.SSLEOFError) on AMD64 FreeBSD CURRENT Non-Debug 3.5:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.5/builds/211/steps/test/logs/stdio
======================================================================
ERROR: setUpClass (test.test_nntplib.NetworkedNNTP_SSLTests)
----------------------------------------------------------------------
vstinner commentedon Jul 24, 2017
New changeset 5b4feb7 by Victor Stinner in branch 'master':
bpo-30188: test_nntplib catch also ssl.SSLEOFError (bpo-2843)
5b4feb7
methane commentedon Jul 26, 2017
New changeset 067931d by INADA Naoki in branch 'master':
bpo-30188: fix TypeError in test_nntplib (GH-2892)
067931d
koobs commentedon Aug 25, 2017
bpo-30188 (and bpo-30188 ?) need merging to 3.6/3.5, 3.6 just failed with:
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:748)
Full build log attached
koobs commentedon Aug 25, 2017
Apologies I meant 5b4feb7 by haypo and 067931d (also needs merge?) by inada.naoki
vstinner commentedon Sep 13, 2017
The SSL EOF error is still common, but in the test, not in setUpClass(). Example:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/874/steps/test/logs/stdio
======================================================================
ERROR: test_with_statement (test.test_nntplib.NetworkedNNTP_SSLTests)
----------------------------------------------------------------------
pythininfo:
ssl.HAS_SNI: True
ssl.OPENSSL_VERSION: OpenSSL 1.0.1u-freebsd 22 Sep 2016
ssl.OPENSSL_VERSION_INFO: (1, 0, 1, 21, 15)
ssl.OP_ALL: 0x800003ff
ssl.OP_NO_TLSv1_1: 0x10000000
vstinner commentedon Sep 29, 2017
Recent failure:
http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%203.x/builds/1080/steps/test/logs/stdio
======================================================================
ERROR: test_with_statement (test.test_nntplib.NetworkedNNTP_SSLTests)
----------------------------------------------------------------------