[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2014-07-12 Thread Mark Lawrence

Mark Lawrence added the comment:

Accidentally set to pending?

--
nosy: +BreamoreBoy
status: pending - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-16 Thread Christian Heimes

Christian Heimes added the comment:

Here is a patch.

--
keywords: +patch
Added file: http://bugs.python.org/file33168/issue19919.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-16 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Looks fine to me.

--
stage:  - patch review
versions: +Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 40955ae17472 by Christian Heimes in branch '3.3':
Issue #19919: Fix flacky SSL test. connect_ex() sometimes returns
http://hg.python.org/cpython/rev/40955ae17472

New changeset 593c3fa7aa2c by Christian Heimes in branch 'default':
Issue #19919: Fix flacky SSL test. connect_ex() sometimes returns
http://hg.python.org/cpython/rev/593c3fa7aa2c

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-16 Thread Christian Heimes

Christian Heimes added the comment:

Thanks!

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - pending

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-07 Thread Christian Heimes

New submission from Christian Heimes:

On Windows the test_connect_ex_error sometimes fails with EWOULDBLOCK instead 
of ECONNREFUSED. Valhallasw sometimes gets the same error with an Ubuntu VM on 
Windows. This might be a Windows socket issue. 

==
FAIL: test_connect_ex_error (test.test_ssl.NetworkedTests)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_ssl.py, 
line 1205, in test_connect_ex_error
s.connect_ex((svn.python.org, 444)))
AssertionError: 10061 != 10035

 for k, v in errno.__dict__.items():
... if v == 10035: print(k)
...
EWOULDBLOCK
WSAEWOULDBLOCK
 for k, v in errno.__dict__.items():
... if v == 10061: print(k)
...
WSAECONNREFUSED
ECONNREFUSED

--
components: Tests
messages: 205467
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: SSL: test_connect_ex_error fails with EWOULDBLOCK
type: behavior
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-07 Thread Merlijn van Deen

Merlijn van Deen added the comment:

My error is slightly different:

$ ./python -i -c from test.test_ssl import *; 
support.run_unittest(NetworkedTests)
(...)

==
FAIL: test_connect_ex_error (test.test_ssl.NetworkedTests)
--
Traceback (most recent call last):
  File /home/valhallasw/src/cpython/Lib/test/test_ssl.py, line 1205, in 
test_connect_ex_error
s.connect_ex((svn.python.org, 444)))
AssertionError: 111 != 11

--
Ran 15 tests in 33.590s

FAILED (failures=1, skipped=1)
Traceback (most recent call last):
  File string, line 1, in module
  File /home/valhallasw/src/cpython/Lib/test/support/__init__.py, line 1719, 
in run_unittest
_run_suite(suite)
  File /home/valhallasw/src/cpython/Lib/test/support/__init__.py, line 1694, 
in _run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File /home/valhallasw/src/cpython/Lib/test/test_ssl.py, line 1205, in 
test_connect_ex_error
s.connect_ex((svn.python.org, 444)))
AssertionError: 111 != 11

 errno.errorcode[11]
'EAGAIN'
 errno.errorcode[111]
'ECONNREFUSED'

This is on Ubuntu x64 12.04 LTS, under VirtualBox 4.3.4 (r91027), running on 
Windows 7 Professional (6.1.7601).

OpenSSL versions as returned by test_ssl:

$ ./python -m Lib.test.test_ssl
test_ssl: testing with 'OpenSSL 1.0.1 14 Mar 2012' (1, 0, 1, 0, 15)
  under Linux ('debian', 'wheezy/sid', '')
  HAS_SNI = True
  OP_ALL = 0x83ff
  OP_NO_TLSv1_1 = 0x1000

--
nosy: +valhallasw

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-07 Thread Christian Heimes

Christian Heimes added the comment:

EAGAIN  Resource temporarily unavailable (may be the same value as 
EWOULDBLOCK) (POSIX.1)

Can you please check of EAGAIN and EWOULDBLOCK are the same value on your Linux 
box? They are the same on my box:

 import errno
 errno.EAGAIN, errno.EWOULDBLOCK
(11, 11)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-07 Thread Merlijn van Deen

Merlijn van Deen added the comment:

Yes, they are.

 errno.EWOULDBLOCK
11

EAGAIN and EWOULDBLOCK are the only two with that errno:
 [(k,v) for (k,v) in errno.__dict__.items() if v==11]
[('EWOULDBLOCK', 11), ('EAGAIN', 11)]

111 is just ECONNREFUSED:
 [(k,v) for (k,v) in errno.__dict__.items() if v==111]
[('ECONNREFUSED', 111)]

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The explanation for EAGAIN is in the test just above (test_timeout_connect_ex). 
Read it.

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-07 Thread Merlijn van Deen

Merlijn van Deen added the comment:

OK. I did some network sniffing; inside the VM, this is what I see:

$ sudo tshark host 82.94.164.164
tshark: Lua: Error during loading:
 [string /usr/share/wireshark/init.lua]:45: dofile has been disabled
Running as user root and group root. This could be dangerous.
Capturing on eth0
  0.0010.0.2.15 - 82.94.164.164 TCP 74 52719  snpp [SYN] Seq=0 
Win=14600 Len=0 MSS=1460 SACK_PERM=1 TSval=10175140 TSecr=0 WS=16

while on the host, this is what I see:
1   0.0 192.168.1.122   82.94.164.164   TCP 66  49909  
snpp [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=4 SACK_PERM=1
2   0.029908000 82.94.164.164   192.168.1.122   TCP 54  snpp  
49909 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0


Basically, the RST sent by the server never reaches the VM. This might actually 
happen in other NAT-ed situations, too, I guess.

But even if this is a VM issue, it *does* make the tests misbehave. Maybe 
receiving EAGAIN should result in a test skip instead of an error?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com