mutex deadlock in pyOpenSSL under PyPy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyOpenSSL |
Incomplete
|
Undecided
|
Vasily Evseenko |
Bug Description
pyOpenSSL deadlocks while creating SSL connection under PyPy
OS: Fedora 14 x86_64
PyPy-1.5
pyOpenSSL: 0.12
See example in attachment
gdb stack dump:
-------
#0 sem_wait () at ../nptl/
#1 0x0000000000410158 in RPyThreadAcquir
#2 0x00000000004db01b in pypy_g_
#3 0x00000000008edfb7 in pypy_g_wrapper ()
#4 0x0000003107a39dcf in SSL_get_
at ssl_cert.c:140
#5 0x0000003107a3768b in SSL_CTX_new (meth=0x3107c557e0) at ssl_lib.c:1532
#6 0x00007ffff73cd33f in ssl_Context_init ()
from /home/svpcom/
#7 0x00007ffff73cd503 in ssl_Context_new ()
from /home/svpcom/
#8 0x0000000000f6afab in pypy_asm_stackwalk ()
#9 0x0000000000a0ab03 in pypy_g_
#10 0x0000000000944b91 in pypy_g_
#11 0x00000000008ee43d in cpyext_
#12 0x0000000000f6afab in pypy_asm_stackwalk ()
#13 0x000000000073a0dd in pypy_g_
#14 0x000000000050994f in pypy_g_
()
#15 0x0000000000508864 in pypy_g_
#16 0x00000000004d303d in pypy_g_call_args ()
#17 0x000000000079beeb in pypy_g_call__Type ()
#18 0x00000000006657d9 in pypy_g_
#19 0x000000000050994f in pypy_g_
()
#20 0x0000000000508864 in pypy_g_
#21 0x00000000004d303d in pypy_g_call_args ()
#22 0x00000000008aa743 in pypy_g_
#23 0x0000000000833876 in pypy_g_
#24 0x00000000007dda83 in pypy_g_
#25 0x0000000000715e65 in pypy_g_portal_1 ()
#26 0x00000000006a9e64 in pypy_g_
#27 0x0000000000538e38 in pypy_g_
#28 0x000000000050982c in pypy_g_PyFrame_run ()
#29 0x00000000008aa743 in pypy_g_
#30 0x0000000000833876 in pypy_g_
#31 0x00000000007dda83 in pypy_g_
#32 0x0000000000715e65 in pypy_g_portal_1 ()
#33 0x00000000006a9e64 in pypy_g_
#34 0x0000000000538e38 in pypy_g_
.....
pyOpenSSL 0.12 doesn't even build on PyPy, so I wonder how this could happen. Running the attached example using pyOpenSSL trunk tip using Twisted 10.0.0, the connection never gets set up, but there is no deadlock. Ctrl-C will interrupt the client and the server, and the client times out on its own after a while. Using Twisted trunk@HEAD, the connection is set up and the transfer succeeds.