[cl-plus-ssl-devel] trouble wrapping iolib (gray) streams in a web server

Attila Lendvai attila.lendvai at gmail.com
Tue May 3 09:19:30 UTC 2011


dear list,

i'm trying to use cl+ssl with iolib in our web server.

the trivial-sockets based http server in examples.lisp works fine, but
i get the error pasted below when using iolib streams.

the stack frame number 2 looks suspicious to me: shouldn't the
lisp-read callback call cl:read-byte on the _underlying_ iolib stream
(as opposed to the wrapping ssl-server-stream)?

also note that according to a breakpoint lisp-read is not even invoked
when using trivial-sockets (ansi-streams), while it is with iolib
(gray streams).

i've managed to workaround the issue by wrapping the fd directly, so
this mail is more like a FYI then asking for help.



A failure in the SSL library occurred on handle #.(SB-SYS:INT-SAP
#X006B6CC0). (Return code: 1)SSL error queue:
error:140C5042:SSL routines:SSL_UNDEFINED_FUNCTION:called a function
you should not call

   [Condition of type CL+SSL::SSL-ERROR-SSL]

Restarts:
 1: REMOVE-WORKER    Stop and remove worker #<WORKER {10080B47E1}>
 0: TERMINATE-THREAD Terminate this thread (#<THREAD "http worker 0"
RUNNING {10080B4CD1}>)

Backtrace:
  0: (CL+SSL::SSL-SIGNAL-ERROR #.(SB-SYS:INT-SAP #X006B6CC0)
#<FUNCTION CL+SSL::SSL-READ> 1 -1)
  1: (STREAM-READ-BYTE #<unavailable lambda list>)
  2: (READ-BYTE #<CL+SSL::SSL-SERVER-STREAM for #<active IPv4 stream
socket connected to 127.0.0.1/42894 {100814AC61}>> T NIL)
  3: ((FLET #:FORM-FUN-[LISP-READ]14))
  4: ((LAMBDA (CL+SSL::BIO CL+SSL::BUF CL+SSL::N)) #.(SB-SYS:INT-SAP
#X0063A920) #.(SB-SYS:INT-SAP #X006BEB90) 11)
  5: ((LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER
FUNCTION)) 17592164314172 17592164314171 #<FUNCTION (LAMBDA #)
{10089E3F59}>)
  6: ("foreign function: call_into_lisp")
  7: ("foreign function: funcall3")
  8: ("foreign function: #x20101DA5")
  9: ("foreign function: #x8046A6F338")

[there's some sbcl backtrace confusion here: make-ssl-server-stream is
missing here]

 10: ((FLET HU.DWIM.WEB-SERVER::BODY))
 11: (HU.DWIM.WEB-SERVER::WORKER-LOOP #<HU.DWIM.HOME:HOME-SERVER
listen: 0.0.0.0/8080, 0.0.0.0/8443; brokers: 7 {100AC29041}> T
#<HU.DWIM.WEB-SERVER::WORKER {10080B47E1}>)


hth,

-- 
 attila

Notice your eroding (digital) freedom, and do something about it!

PGP: 2FA1 A9DC 9C1E BA25 A59C  963F 5D5F 45C7 DFCD 0A39
OTR XMPP: 8647EEAC EA30FEEF E1B55146 573E52EE 21B1FF06
BitCoin: 154uf86Vd9rpjMULd9CXa7nVwikknYZJiB




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