New submission from patrila:

Dear Python developers

python-2.7.12, python-3.4.5 and the current "default" branch fail the tests

* test.test_asyncore.TestAPI_UseIPv4Select.test_handle_close_after_conn_broken
* test.test_asyncore.TestAPI_UseIPv6Select.test_handle_close_after_conn_broken

(difference is only if IPv4 or IPv6 is used). The output of the test-suite is

$ ./python -m unittest 
test.test_asyncore.TestAPI_UseIPv4Select.test_handle_close_after_conn_broken 
test.test_asyncore.TestAPI_UseIPv6Select.test_handle_close_after_conn_broken
FF
======================================================================
FAIL: test_handle_close_after_conn_broken 
(test.test_asyncore.TestAPI_UseIPv4Select)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../Lib/test/test_asyncore.py", line 648, in 
test_handle_close_after_conn_broken
    self.loop_waiting_for_flag(client)
  File ".../Lib/test/test_asyncore.py", line 511, in loop_waiting_for_flag
    self.fail("flag not set")
AssertionError: flag not set

======================================================================
FAIL: test_handle_close_after_conn_broken 
(test.test_asyncore.TestAPI_UseIPv6Select)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../Lib/test/test_asyncore.py", line 648, in 
test_handle_close_after_conn_broken
    self.loop_waiting_for_flag(client)
  File ".../Lib/test/test_asyncore.py", line 511, in loop_waiting_for_flag
    self.fail("flag not set")
AssertionError: flag not set

----------------------------------------------------------------------
Ran 2 tests in 10.000s

FAILED (failures=2)


However, I also encounter sometimes a success (for both IPv6 and also IPv4). 
Therefore, I re-run the tests 100 times, this was the result:

success rate of IPv4 test: 2/100
success rate of IPv6 test: 4/100

I conjecture that there is some kind of race condition behind the scenes which 
sometimes is "won" but more often lost.

I'm running this test on Linux 4.8. I also did find nothing in the system logs 
related to the issue.

----------
messages: 284633
nosy: patrila
priority: normal
severity: normal
status: open
title: test_asyncore.TestAPI_UseIPv4Select / 
test_asyncore.TestAPI_UseIPv6Select fails test_handle_close_after_conn_broken
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29151>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to