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.

Author neologix
Recipients neologix, pitrou
Date 2012-12-24.11:41:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1356349308.1.0.276929202525.issue16763@psf.upfronthosting.co.za>
In-reply-to
Content
test_ssl tests calling connect_ex don't handle unreachable servers properly:
"""
test_ssl
Resource 'svn.python.org' is not available
Resource 'svn.python.org' is not available
test test_ssl failed -- Traceback (most recent call last):
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_ssl.py", line 246, in test_connect_ex
    self.assertEqual(0, s.connect_ex(("svn.python.org", 443)))
AssertionError: 0 != None
"""

support.transient doesn't help here since no exception is raised.
Note that I'm not sure that connect_ex returning None is normal in the first place...

There's a related failure on OpenBSD/NetBSD  buildbots:
"""
test_timeout_connect_ex (test.test_ssl.NetworkedTests) ... ok

======================================================================
ERROR: test_non_blocking_connect_ex (test.test_ssl.NetworkedTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/cpython/buildslave/3.x.snakebite-openbsd51-amd64-1/build/Lib/test/test_ssl.py", line 685, in test_non_blocking_connect_ex
    select.select([], [s], [], 5.0)
OSError: [Errno 22] Invalid argument
"""

I guess that connect() can't succeed because of an unreachable host/connection refused, and the subsequent select() fails with EINVAL. This is most likely a kernel bug, select should report the socket as ready for write (one could then use getsockopt() to find the actual error).
History
Date User Action Args
2012-12-24 11:41:48neologixsetrecipients: + neologix, pitrou
2012-12-24 11:41:48neologixsetmessageid: <1356349308.1.0.276929202525.issue16763@psf.upfronthosting.co.za>
2012-12-24 11:41:48neologixlinkissue16763 messages
2012-12-24 11:41:47neologixcreate