-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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_nntplib: random EOFError in setUpClass() #74374
Comments
Example of failure: ====================================================================== Traceback (most recent call last):
File "/home/haypo/prog/python/master/Lib/test/test_nntplib.py", line 289, in setUpClass
cls.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 _getline
if not line: raise EOFError
EOFError Attached PR catch this error and skips the test. |
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. |
I see 3 options:
|
The news.trigofacile.com server was chosen in the commit 1cb121e (Antoine Pitrou in 2010) which also added the new NetworkedNNTPTests test case. |
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. |
Similar but different error (ssl.SSLEOFError) on AMD64 FreeBSD CURRENT Non-Debug 3.5: ====================================================================== 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_on
return 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_handshake
self._sslobj.do_handshake()
File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/ssl.py", line 641, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:719) |
The SSL EOF error is still common, but in the test, not in setUpClass(). Example: ====================================================================== 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_statement
with self.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_on
return 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_handshake
self._sslobj.do_handshake()
File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:864) pythininfo: ssl.HAS_SNI: True |
Recent failure: ====================================================================== 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_statement
with self.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_on
return 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_handshake
self._sslobj.do_handshake()
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/ssl.py", line 697, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:864) |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: