[issue17085] test_socket crashes the whole test suite

Charles-François Natali report at bugs.python.org
Thu Jul 31 21:45:10 CEST 2014


Charles-François Natali added the comment:

Thanks for the reminder Mark.
Yes, it is probably still an issue with the latest 2.7 release.

There were actually two issues:
- send send()/sendall() call didn't block because the test doesn't write enough data: we have since added a SOCK_MAX_SIZE constant to test_support just for that purpose, and the test has been updated, so it should now block (and succeed).
- the crash occurs because the test doesn't reset the alarm (with alarm(0)) upon exit, so if the alarm didn't go off during the test, it comes later when the original signal handler has been reset, and the default handler just exits.

To sum up, the first point is already fixed, and for the second point, here's a patch.

Note that 3.4 and default aren't affected, because the alarm is properly reset.

----------
keywords: +patch
nosy: +neologix
Added file: http://bugs.python.org/file36182/reset_sigalrm_handler.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17085>
_______________________________________


More information about the Python-bugs-list mailing list