<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>On an intel Mac 10.6 the same thing happens:</div><div><br></div><div><br></div><div> ------</div><div>CCL: </div><div>$ ab -f SSL2 -n 1000 -c 10 <a href="https://127.0.0.1:4712/">https://127.0.0.1:4712/</a></div><div><br></div><div><div>Unhandled exception 10 at 0x7fff887baf97, context->regs at #xb1aa1660</div><div>Exception occurred while executing foreign code</div><div> at sha1_block_data_order + 87</div><div>received signal 10; faulting address: 0x7fff711a3000</div></div><div> ------</div><div>SBCL:</div><div>$ ab -f SSL2 -n 1000 -c 10 <a href="https://127.0.0.1:4712/">https://127.0.0.1:4712/</a></div><div><br></div><div><div>CORRUPTION WARNING in SBCL pid 73051(tid 33598464):</div><div>Memory fault at 11 (pc=0x7fff887cd0f5, sp=0xb2a4f00)</div><div>The integrity of this image is possibly compromised.</div><div>Continuing with fingers crossed.</div><div>[2011-03-31 11:53:19 [error]] Error while processing connection: Unhandled memory fault at #x240000000011.</div></div><div><br></div><div> ------</div><div><br></div><div>Both CCL and SBCL sometimes survive a concurrency of 4, but not 10.</div><div><br></div><div>SSL is thread safe, but it is not allowed to use an SSL connection concurrently in several threads.</div><div><a href="http://www.openssl.org/support/faq.html#PROG1">http://www.openssl.org/support/faq.html#PROG1</a></div><div>But a look through h'toot fails to show how this might happen, because process connection is run</div><div>inside one thread, and the stream is ssl'ized used and closed inside this thread.</div><div><br></div><div>This happened even after I updated cl+ssl to the latest <a href="http://common-lisp.net">common-lisp.net</a> version.</div><div><br></div><div>John</div><div><br></div><div><br></div><div><br></div><br><div><div>On Mar 30, 2011, at 11:08 PM, Daniel Brunner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi to everybody,<br><br>I ran into the following problem with the SSL layer: I start my Lisp<br>(CCL or SBCL, doesn't matter) and feed it with these lines:<br><br>--8<--<br>(ql:quickload "hunchentoot")<br><br>(defparameter *server*<br> (hunchentoot:start<br> (make-instance 'hunchentoot:ssl-acceptor<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span> :port 4711<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span> :ssl-certificate-file #P"/home/dbr/local-cert.pem"<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span> :ssl-privatekey-file #P"/home/dbr/local-key.pem")))<br>--8<--<br><br>Then a SSL-ACCEPTOR is running and serving as wished. But when I use<br>Apache Bench with some concurreny:<br><br><blockquote type="cite">ab -f SSL2 -n 1000 -c 4 <a href="https://localhost:4711/">https://localhost:4711/</a><br></blockquote><br>then the Lisp crashes and runs into the debugger. E.g. on CCL/Linux:<br><br>--8<--<br>? Unhandled exception 11 at 0x7f1843f1ebe9, context->regs at #x7f184390f428<br>Exception occurred while executing foreign code<br> at lh_insert + 137<br>received signal 11; faulting address: 0x7f1843f8fa08<br>invalid permissions for mapped object<br>--8<--<br><br>Or on SBCL/Linux:<br><br>--8<--<br>CORRUPTION WARNING in SBCL pid 3549(tid 140737314223872):<br>Memory fault at 0 (pc=0x7ffff4c6f940, sp=0x7ffff59ee280)<br>The integrity of this image is possibly compromised.<br>Continuing with fingers crossed.<br>--8<--<br><br>I tested this scenario on different platforms:<br><br>Clozure CL (1.7-dev-r14406M-trunk but it crashes on older versions as<br>well)<br> - 32 Bit on Windows Server 2003<br> - 64 Bit on Windows Server 2008<br> - 32 Bit on Ubuntu 10.04<br> - 64 Bit on Ubuntu 10.04 (libssl.0.9.8)<br><br>SBCL 1.0.46 64 Bit on Ubuntu 10.04 (libssl.0.9.8)<br><br>Used libraries/hunchentoot:<br>- dists/quicklisp/software/cl+ssl-20101006-cvs/<br>- dists/quicklisp/software/hunchentoot-1.1.1/<br><br><br><br>Is this a known problem? Does anybody has an idea how to solve it?<br><br><br>Kind regards, Daniel.<br><br>_______________________________________________<br>tbnl-devel site list<br><a href="mailto:tbnl-devel@common-lisp.net">tbnl-devel@common-lisp.net</a><br>http://common-lisp.net/mailman/listinfo/tbnl-devel<br></div></blockquote></div><br></body></html>