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 patrila
Recipients patrila
Date 2017-01-04.12:22:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1483532525.73.0.454850752566.issue29151@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-01-04 12:22:05patrilasetrecipients: + patrila
2017-01-04 12:22:05patrilasetmessageid: <1483532525.73.0.454850752566.issue29151@psf.upfronthosting.co.za>
2017-01-04 12:22:05patrilalinkissue29151 messages
2017-01-04 12:22:05patrilacreate