Issue2564

classification
Title: test_socket_jy fails on Linux
Type: behaviour Severity: normal
Components: Versions: Jython 2.7
Milestone:
process
Status: pending Resolution: fixed
Dependencies: Superseder:
Assigned To: darjus Nosy List: amak, darjus, jamesmudd, stefan.richthofer
Priority: normal Keywords:

Created on 2017-03-06.21:03:15 by stefan.richthofer, last changed 2017-03-13.11:48:05 by stefan.richthofer.

Messages
msg11189 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2017-03-06.21:03:15
Running test_socket_jy I get

test_connect_ex_workout (__main__.SocketConnectTest)
Verify connect_ex states go through EINPROGRESS?, EALREADY*, EISCONN ... ok
test_connect_ex_workout (__main__.SSLSocketConnectTest)
Verify connect_ex states go through EINPROGRESS?, EALREADY*, EISCONN ... FAIL
test_socket_options_defined (__main__.SocketOptionsTest) ... ok

======================================================================
FAIL: test_connect_ex_workout (__main__.SSLSocketConnectTest)
Verify connect_ex states go through EINPROGRESS?, EALREADY*, EISCONN
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_socket_jy.py", line 140, in test_connect_ex_workout
    self.assertEqual(result[-1], errno.EISCONN)
AssertionError: 115 != 106

----------------------------------------------------------------------
Ran 3 tests in 10.703s

FAILED (failures=1)


After calling

hg update -r 8047

it passes again. So we somehow broke it with that commit.
Something strange: I vaguely remember that directly after that update, after running regrtestes for commit 8048 test_socket_jy was still passing. Any clue?
msg11190 (view) Author: James Mudd (jamesmudd) Date: 2017-03-06.21:09:51
Don't know if its related but just had test_select_new hang jstack doesn't report deadlock but the test is waiting on a socket read here is the stack

"RMI TCP Connection(2)-127.0.0.1" #541 daemon prio=9 os_prio=0 tid=0x00007f3218013800 nid=0x2936 runnable [0x00007f31a79e9000]
   java.lang.Thread.State: RUNNABLE
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
	at java.net.SocketInputStream.read(SocketInputStream.java:170)
	at java.net.SocketInputStream.read(SocketInputStream.java:141)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
	- locked <0x00000000f63eb8d8> (a java.io.BufferedInputStream)
	at java.io.FilterInputStream.read(FilterInputStream.java:83)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:550)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$22/1102405110.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

   Locked ownable synchronizers:
	- <0x00000000f5e80810> (a java.util.concurrent.ThreadPoolExecutor$Worker)
msg11191 (view) Author: James Mudd (jamesmudd) Date: 2017-03-06.21:14:26
test_socket_jy is also failing for me but in a slightly different way

james@james-ubuntu:~/git/jython/dist$ java -jar jython.jar Lib/test/test_socket_jy.py 
test_connect_ex_workout (__main__.SocketConnectTest)
Verify connect_ex states go through EINPROGRESS?, EALREADY*, EISCONN ... ok
test_connect_ex_workout (__main__.SSLSocketConnectTest)
Verify connect_ex states go through EINPROGRESS?, EALREADY*, EISCONN ... Exception in thread socket-workout-4:Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
Exception in thread socket-workout-0:Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
Exception in thread socket-workout-9:Traceback (most recent call last):
Exception in thread socket-workout-8:  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    self.do_handshake()
    connect_errno = sock.connect_ex(self.address)
Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
    self._target(*self._args, **self._kwargs)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
Exception in thread socket-workout-6:    self.do_handshake()
Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    raise _map_exception(jlx)
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
SSLError: [Errno 1] handshake timed out
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
Exception in thread socket-workout-3:Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    raise _map_exception(jlx)
Exception in thread socket-workout-7:    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
Traceback (most recent call last):
Exception in thread socket-workout-1:  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
SSLError: [Errno 1] handshake timed out
Exception in thread socket-workout-2:Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
Exception in thread socket-workout-5:Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
    self.do_handshake()
Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
ERROR
test_socket_options_defined (__main__.SocketOptionsTest) ... ok

======================================================================
ERROR: test_connect_ex_workout (__main__.SSLSocketConnectTest)
Verify connect_ex states go through EINPROGRESS?, EALREADY*, EISCONN
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_socket_jy.py", line 139, in test_connect_ex_workout
    self.assertIn(result[0], {errno.EINPROGRESS, errno.EISCONN})
IndexError: index out of range: 0

----------------------------------------------------------------------
Ran 3 tests in 10.671s

FAILED (errors=1)
Traceback (most recent call last):
  File "Lib/test/test_socket_jy.py", line 159, in <module>
    test_main()
  File "Lib/test/test_socket_jy.py", line 155, in test_main
    test_support.run_unittest(SocketConnectTest, SSLSocketConnectTest, SocketOptionsTest)
  File "/home/james/git/jython/dist/Lib/test/test_support.py", line 1320, in run_unittest
    _run_suite(suite)
  File "/home/james/git/jython/dist/Lib/test/test_support.py", line 1303, in _run_suite
    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_socket_jy.py", line 139, in test_connect_ex_workout
    self.assertIn(result[0], {errno.EINPROGRESS, errno.EISCONN})
IndexError: index out of range: 0
msg11192 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2017-03-06.21:22:53
This has to do with the fix for #2500. I compared proposed change in https://github.com/jythontools/jython/pull/40/files with
https://hg.python.org/jython/rev/eb676b781ab2

@darjus: If I remove your additional changes regarding wait-option, i.e. apply PR 40 as is, test_socket_jy goes well again. (Which is why I didn't notice this when I some weeks ago asserted that PR 40 doesn't break regrtests)
Maybe you need to adjust the test somehow?
Unfortunately I don't have much clue what this stuff is all about, just observing changes etc.

@James Don't think it's related; the hanging is annoying though. It's probably more related with hanging of test_logging etc #2536, #2537, maybe even with #2519. There also is usually socket and netty in the game. Probably also gc. I guess socket.py has some __del__ finalizers that clean up netty and depending on when gc kicks in, some unfortunate tests can yield deadlock.
msg11193 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2017-03-06.21:32:06
@James
Interesting that it fails differently for you.
If you apply what I described, i.e. revert to 8047 and then apply PR 40 'as is', does it still fix it for you?
msg11194 (view) Author: James Mudd (jamesmudd) Date: 2017-03-06.22:00:55
@Stefan After reverting 8047 it still fails for me but now in the same way you observe (I already had PR 40 merged)

james@james-ubuntu:~/git/jython/dist$ java -jar jython.jar Lib/test/test_socket_jy.py 
test_connect_ex_workout (__main__.SocketConnectTest)
Verify connect_ex states go through EINPROGRESS?, EALREADY*, EISCONN ... ok
test_connect_ex_workout (__main__.SSLSocketConnectTest)
Verify connect_ex states go through EINPROGRESS?, EALREADY*, EISCONN ... Exception in thread socket-workout-7:Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
Exception in thread socket-workout-5:Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
Exception in thread socket-workout-9:Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
Exception in thread socket-workout-8:Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
Exception in thread socket-workout-6:Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
Exception in thread socket-workout-1:Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
Exception in thread socket-workout-2:    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
Exception in thread socket-workout-3:Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    connect_errno = sock.connect_ex(self.address)
Exception in thread socket-workout-4:  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    self.do_handshake()
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
Exception in thread socket-workout-0:Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    self.run()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/threading.py", line 222, in _Thread__bootstrap
    raise _map_exception(jlx)
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    raise _map_exception(jlx)
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
SSLError: [Errno 1] handshake timed out
SSLError: [Errno 1] handshake timed out
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    raise _map_exception(jlx)
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
    self.run()
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    self.run()
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
    self.run()
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
    raise _map_exception(jlx)
    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
  File "/home/james/git/jython/dist/Lib/threading.py", line 213, in run
SSLError: [Errno 1] handshake timed out
    self._target(*self._args, **self._kwargs)
  File "Lib/test/test_socket_jy.py", line 113, in do_nonblocking_connection
    connect_errno = sock.connect_ex(self.address)
  File "/home/james/git/jython/dist/Lib/ssl.py", line 637, in connect_ex
    self.do_handshake()
  File "/home/james/git/jython/dist/Lib/ssl.py", line 691, in do_handshake
    self._sock._handle_channel_future(self._handshake_future, "SSL handshake", wait=True)
  File "/home/james/git/jython/dist/Lib/_socket.py", line 380, in handle_exception
    raise _map_exception(jlx)
SSLError: [Errno 1] handshake timed out
SSLError: [Errno 1] handshake timed out
FAIL
test_socket_options_defined (__main__.SocketOptionsTest) ... ok

======================================================================
FAIL: test_connect_ex_workout (__main__.SSLSocketConnectTest)
Verify connect_ex states go through EINPROGRESS?, EALREADY*, EISCONN
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_socket_jy.py", line 140, in test_connect_ex_workout
    self.assertEqual(result[-1], errno.EISCONN)
AssertionError: 115 != 106

----------------------------------------------------------------------
Ran 3 tests in 10.785s

FAILED (failures=1)
Traceback (most recent call last):
  File "Lib/test/test_socket_jy.py", line 159, in <module>
    test_main()
  File "Lib/test/test_socket_jy.py", line 155, in test_main
    test_support.run_unittest(SocketConnectTest, SSLSocketConnectTest, SocketOptionsTest)
  File "/home/james/git/jython/dist/Lib/test/test_support.py", line 1320, in run_unittest
    _run_suite(suite)
  File "/home/james/git/jython/dist/Lib/test/test_support.py", line 1303, in _run_suite
    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_socket_jy.py", line 140, in test_connect_ex_workout
    self.assertEqual(result[-1], errno.EISCONN)
AssertionError: 115 != 106
msg11204 (view) Author: Darjus Loktevic (darjus) Date: 2017-03-08.05:21:25
Hey guys, I've backed out the synchronization bit. Looking at it, I'm not convinced it needs to be there, but the rest is still useful for #2500.
History
Date User Action Args
2017-03-13 11:48:05stefan.richthofersetstatus: open -> pending
assignee: darjus
resolution: fixed
2017-03-10 17:14:55amaksetnosy: + amak
2017-03-08 05:21:25darjussetmessages: + msg11204
2017-03-06 22:00:56jamesmuddsetmessages: + msg11194
2017-03-06 21:32:06stefan.richthofersetmessages: + msg11193
2017-03-06 21:22:54stefan.richthofersetmessages: + msg11192
2017-03-06 21:14:26jamesmuddsetmessages: + msg11191
2017-03-06 21:13:14stefan.richthofersetnosy: + darjus
2017-03-06 21:09:51jamesmuddsetnosy: + jamesmudd
messages: + msg11190
2017-03-06 21:03:15stefan.richthofercreate