[cl-plus-ssl-devel] ssl crashing in hunchentoot. A solution?

Anton Vodonosov avodonosov at yandex.ru
Wed Apr 6 20:14:11 UTC 2011


Hello.

[I am writing to CL+SSL list only].

Daniel, I reproduced the CCL crash with the fixed version of CL+SSL, 
using the test case code you sent earlier, and also with hunchentoot.

I discovered that from the two OpenSSL callbacks provided 
by the David's, the locking-callback is relevant for the crash
- I commented out 
    ;; (crypto-set-id-callback (cffi:callback threadid-callback))
and the crash remained reproducible. (note also, it is allowed 
to omitt thread-id-callback on Windows [1])

When in addition I commented out the 
  ;; (crypto-set-locking-callback (cffi:callback locking-callback))
the crash stopped to occur.

So, you said the error is Windows specific. Is it CCL specific? 
I am not sure it is. I also tested with SBCL windows-threading
branch [2], and it crashes too. But this branch is a work in progress,
and the FFI callbacks were added only recently to it, therefore
we can not be sure it is not an error in this version of SBCL.

Anyway, here is the SBCL message

Trying to lock dead mutex 007F98E4
Backtrace: ёSC (pthread 00798FF0)
[#01]: ebp = 0x02EEF988, ret = 0x00419E23
[#02]: ebp = 0x02EEF9C8, ret = 0x00423A94
[#03]: ebp = 0x02EEF9F0, ret = 0x22BEE7AA
[#04]: ebp = 0x02EEFA50, ret = 0x2306F266
[#05]: ebp = 0x02EEFB30, ret = 0x2306E2D3
[#06]: ebp = 0x02EEFC10, ret = 0x223BCAAC

debugger invoked on a SB-SYS:MEMORY-FAULT-ERROR in thread #<THREAD
                                                            "foreign-thread-helper" RUNNING
                                                            {23CF5C91}>:
  Unhandled memory fault at #x14.

Daniel, what version of OpenSSL is installed on your Windows systems?
Mine is  OpenSSL 1.0.0 29 Mar 2010, downloaded from [3].
Probably the cause is OpenSSL we use?

1 - http://www.openssl.org/docs/crypto/threads.html.
2 - http://www.siftsoft.com/inprogress/sbcl-notes.html
     http://www.siftsoft.com/dl/sbcl-1.0.47.9.275.wth.kovalenko-x86.msi
3 - http://www.slproweb.com/products/Win32OpenSSL.html

Best regards,
- Anton




More information about the cl-plus-ssl-devel mailing list