fukamachi / woo

A fast non-blocking HTTP server on top of libev
http://ultra.wikia.com/wiki/Woo_(kaiju)
MIT License
1.28k stars 98 forks source link

The value 3369575493 is not of type (SIGNED-BYTE 32) (in clack-handler-woo thread) #23

Closed ahungry closed 9 years ago

ahungry commented 9 years ago

I receive the following error:


debugger invoked on a TYPE-ERROR in thread
#<THREAD "clack-handler-woo" RUNNING {10059706B3}>:
  The value 3369575493 is not of type (SIGNED-BYTE 32).

When attempting to load a freshly created caveman2 project on my Centos6 server (well, it quickloads, and then displays this error on the first http request).

You can see the project here (let me know if the generated asd file should be modified maybe?)

https://github.com/ahungry/slugelisp

It doesn't happen on my other caveman2 web instance (created back in January) that runs on the default port 5000 (only on the port 60333 - no idea if the port is related in any way).

Hunchentoot and Wookie both seem to work fine (although Hunchentoot has its own issues with running out of threads and displaying a 503 server error after being up for around 24 hours).

fukamachi commented 9 years ago

I have no idea where (SIGNED-BYTE 32) is required. Do you have any chance to get the stack trace?

ahungry commented 9 years ago

I'm not sure if there is some debug method I'm missing that lets me. This is the only useful debug info (it happens as I pull it up in the standard sbcl on my server):

while :; do sbcl --eval '(ql:quickload :sluglisp)' --eval '(sluglisp:start :port 60333 :server :woo)'; done
This is SBCL 1.2.7, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
To load "sluglisp":
  Load 1 ASDF system:
    sluglisp
; Loading "sluglisp"
..................................................
....................
To load "sluglisp":
  Load 1 ASDF system:
    sluglisp
; Loading "sluglisp"

To load "lack-middleware-static":
  Load 1 ASDF system:
    lack-middleware-static
; Loading "lack-middleware-static"

To load "lack-middleware-backtrace":
  Load 1 ASDF system:
    lack-middleware-backtrace
; Loading "lack-middleware-backtrace"

To load "clack-handler-woo":
  Load 1 ASDF system:
    clack-handler-woo
; Loading "clack-handler-woo"
To load "cffi-grovel":
  Load 1 ASDF system:
    cffi-grovel
; Loading "cffi-grovel"

...
Woo server is started.
Listening on localhost:60333.
* 
debugger invoked on a TYPE-ERROR in thread
#<THREAD "clack-handler-woo" RUNNING {1003C54F63}>:
  The value 3369575493 is not of type (SIGNED-BYTE 32).

It only seems to happen when my apache does a proxypass from port 80 to the port I run the app on.

ahungry commented 9 years ago

Reproducible steps (this is with sbcl 1.2.13, latest and fully updated quicklisp, on 64 bit centos6).

(ql:quickload :caveman2)
(caveman2:make-project "~/src/lisp/cavetest")
(ql:quickload :cavetest)
(cavetest:start :port 60333 :server :woo)

Then make sure you have an Apache file with ProxyPass / http://localhost:60333 for the domain name you test with.

Make a request to the proxy passed domain, receive error:

debugger invoked on a TYPE-ERROR in thread
#<THREAD "clack-handler-woo" RUNNING {100385C823}>:
  The value 3369575493 is not of type (SIGNED-BYTE 32).
ahungry commented 9 years ago

Even more direct is this, which reproduces the error:

(clack:clackup (lambda (env) (declare (ignore env)) '(200 (:content-type "text/plain") ("HI"))) :server :woo :port 60333 :use-default-middlewares t)
ahungry commented 9 years ago

While something is bubbling up from the CL end to cause this, it seems I am able to prevent the error from occurring by altering my Apache ProxyPass configuration to resolve all passes directly to localhost vs the internal sub-domain of the FQDN.

Since there doesn't seem to be a clear area to change this in any of the codebases (probably some dependency of a dependency or something) I'll go ahead and close, sorry for all the chatter.