[issue43577] Deadlock when using SSLContext._msg_callback and SSLContext.sni_callback

Andrew Dailey report at bugs.python.org
Sun Mar 21 10:42:07 EDT 2021


Andrew Dailey <steveday168 at gmail.com> added the comment:

I'm glad that the info I provided was helpful! I'll go ahead and create another issue for the misleading docs surrounding SSLContext.sni_callback. Thanks for looking into this and coming up with a fix so quickly.

I do have one more question: does python provide a "safe" way to test for deadlocks like this? I noticed that you added a test case to verify that this lockup doesn't happen but what would happen if someone ran that test on an earlier version? Would the test runner also freeze or are there facilities in-place to catch such behavior? Maybe something nutty like:

with should_deadlock():
    my_buggy_test()

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43577>
_______________________________________


More information about the Python-bugs-list mailing list