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.

classification
Title: test_ssl hangs on Ubuntu
Type: behavior Stage: resolved
Components: Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: barry, giampaolo.rodola, janssen, nadeem.vawda, pitrou, python-dev
Priority: normal Keywords: patch

Created on 2012-01-28 10:38 by nadeem.vawda, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_ssl.patch pitrou, 2012-01-28 14:42
Messages (7)
msg152156 - (view) Author: Nadeem Vawda (nadeem.vawda) * (Python committer) Date: 2012-01-28 10:38
Since changeset b99c54acb22d, the ARM Ubuntu buildbot has been hanging in test_ssl:

    http://www.python.org/dev/buildbot/all/builders/ARM%20Ubuntu%203.x/builds/250/steps/test/logs/stdio

I've been able to reproduce this behaviour on my AMD64 Ubuntu 11.10 machine.
The last output before it hangs is:

    test_protocol_sslv3 (test.test_ssl.ThreadedTests)
    Connecting to an SSLv3 server with various client options ... 
     SSLv3->SSLv3 CERT_NONE
     SSLv3->SSLv3 CERT_OPTIONAL
     SSLv3->SSLv3 CERT_REQUIRED
     {SSLv23->SSLv3} CERT_NONE

No such problem has shown up on the x86 Ubuntu Shared builder. This is probably
because it runs Ubuntu 8.04, whereas the ARM bot runs 11.10.
msg152158 - (view) Author: Nadeem Vawda (nadeem.vawda) * (Python committer) Date: 2012-01-28 11:02
The ARM Ubuntu 3.2 buildbot is having the same problem:

    http://www.python.org/dev/buildbot/all/builders/ARM%20Ubuntu%203.2/builds/158/steps/test/logs/stdio

The 2.7 bot is fine, though.
msg152163 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-01-28 14:42
Can you try the following patch?
msg152164 - (view) Author: Nadeem Vawda (nadeem.vawda) * (Python committer) Date: 2012-01-28 15:09
With the patch applied on 3.2 (it doesn't apply on default), the test passes,
but it also prints out this exception traceback:

    test_protocol_sslv3 (test.test_ssl.ThreadedTests)
    Connecting to an SSLv3 server with various client options ... 
     SSLv3->SSLv3 CERT_NONE
     SSLv3->SSLv3 CERT_OPTIONAL
     SSLv3->SSLv3 CERT_REQUIRED
     {SSLv23->SSLv3} CERT_NONE
    Exception in thread Thread-8:
    Traceback (most recent call last):
      File "/home/nadeem/src/cpython/3.2/Lib/threading.py", line 741, in _bootstrap_inner
        self.run()
      File "/home/nadeem/src/cpython/3.2/Lib/test/test_ssl.py", line 810, in run
        if not self.wrap_conn():
      File "/home/nadeem/src/cpython/3.2/Lib/test/test_ssl.py", line 764, in wrap_conn
        self.sock, server_side=True)
      File "/home/nadeem/src/cpython/3.2/Lib/ssl.py", line 189, in wrap_socket
        _context=self)
      File "/home/nadeem/src/cpython/3.2/Lib/ssl.py", line 276, in __init__
        raise x
      File "/home/nadeem/src/cpython/3.2/Lib/ssl.py", line 272, in __init__
        self.do_handshake()
      File "/home/nadeem/src/cpython/3.2/Lib/ssl.py", line 451, in do_handshake
        self._sslobj.do_handshake()
    socket.error: [Errno 104] Connection reset by peer

     {TLSv1->SSLv3} CERT_NONE
     SSLv23->SSLv3 CERT_NONE
    ok

I'm assuming it's unrelated, though - I get the same traceback on earlier
revisions (before the test started hanging). Should I file a separate bug?
msg152168 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-01-28 16:40
> I'm assuming it's unrelated, though - I get the same traceback on earlier
> revisions (before the test started hanging). Should I file a separate bug?

Yes, please.
msg152170 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-01-28 16:42
New changeset 10c79f29e417 by Antoine Pitrou in branch '3.2':
Issue #13895: fix test_ssl hanging under Ubuntu
http://hg.python.org/cpython/rev/10c79f29e417

New changeset db0c717cbc01 by Antoine Pitrou in branch 'default':
Issue #13895: fix test_ssl hanging under Ubuntu
http://hg.python.org/cpython/rev/db0c717cbc01
msg152171 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-01-28 16:43
Hopefully it's fixed now, thank you.
History
Date User Action Args
2022-04-11 14:57:26adminsetgithub: 58103
2012-01-28 16:43:16pitrousetstatus: open -> closed
resolution: fixed
messages: + msg152171

stage: needs patch -> resolved
2012-01-28 16:42:41python-devsetnosy: + python-dev
messages: + msg152170
2012-01-28 16:40:04pitrousetmessages: + msg152168
2012-01-28 15:09:08nadeem.vawdasetmessages: + msg152164
2012-01-28 14:42:05pitrousetfiles: + test_ssl.patch
keywords: + patch
messages: + msg152163
2012-01-28 11:02:32nadeem.vawdasetmessages: + msg152158
versions: + Python 3.2
2012-01-28 10:38:16nadeem.vawdacreate