[issue9619] test_ssl freezes
New submission from Antoine Pitrou pit...@free.fr: Recently there have been test_ssl freezes on the buildbots. They seem to happen in the asyncore test case: http://www.python.org/dev/buildbot/builders/i386%20Ubuntu%203.x/builds/1903/steps/test/logs/stdio http://www.python.org/dev/buildbot/builders/x86%20Ubuntu%203.x/builds/1742/steps/test/logs/stdio test_asyncore_server (test.test_ssl.ThreadedTests) Check the example asyncore integration. ... server: new connection from 127.0.0.1:36622 client: sending b'FOO\n'... server: read b'FOO\n' from client client: read b'foo\n' client: closing connection. server: read b'over\n' from client server: closed connection ssl.SSLSocket [closed] object, fd=-1, family=2, type=1, proto=0 server: read b'' from client The only significant change recently in ssl has been r83869, and asyncore doesn't seem to have recent any important changes lately. -- components: Library (Lib), Tests messages: 114024 nosy: giampaolo.rodola, pitrou priority: normal severity: normal status: open title: test_ssl freezes versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9619 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9619] test_ssl freezes
Antoine Pitrou pit...@free.fr added the comment: Actually, this can be reproduced by running test_smtpd before test_ssl: $ ./python -m test.regrtest -v -uall test_smtpd test_ssl It then freezes at that point: [...] test_asyncore_server (test.test_ssl.ThreadedTests) Check the example asyncore integration. ... server: new connection from 127.0.0.1:46707 client: sending b'FOO\n'... server: read b'FOO\n' from client client: read b'foo\n' client: closing connection. server: read b'over\n' from client client: connection closed. cleanup: stopping server. cleanup: joining server thread. server: closed connection ssl.SSLSocket [closed] object, fd=-1, family=2, type=1, proto=0 server: read b'' from client If you press the return key, it unfreezes the test (does test_smtpd register file descriptor 0 (stdin) in asyncore?) and prints the following error: error: uncaptured python exception, closing channel smtpd.SMTPChannel connected 'c' at 0x2c4c370 (class 'IndexError':pop from empty list [/home/antoine/py3k/debug/Lib/asyncore.py|read|79] [/home/antoine/py3k/debug/Lib/asyncore.py|handle_read_event|435] [/home/antoine/py3k/debug/Lib/asynchat.py|handle_read|128] [/home/antoine/py3k/debug/Lib/asyncore.py|recv|375] [/home/antoine/py3k/debug/Lib/test/mock_socket.py|recv|47]) -- nosy: +richard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9619 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9619] test_ssl freezes
Antoine Pitrou pit...@free.fr added the comment: does test_smtpd register file descriptor 0 (stdin) in asyncore? After some debug prints, it turns out to be the case. One general problem is asyncore's global socket_map, which means it can leak between tests if some tests fail cleaning correctly after themselves. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9619 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9619] test_ssl freezes
Antoine Pitrou pit...@free.fr added the comment: In r84086, I've added a save/restore guard of asyncore.socket_map to the regression test suite. It also warns when a test fails to leave the socket_map in its initial test. test_smtpd is the only test that displays the warning. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9619 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9619] test_ssl freezes
Richard Jones richardjo...@optushome.com.au added the comment: Thanks for the investigation Antoine. In r84088 I've added a call to asyncore.close_all in the smtpd test tearDown methods. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9619 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com