Hello folks,
I have bumped into the error while playing around:
1. (hunchentoot:start (make-instance 'hunchentoot:easy-acceptor :port 4242 :write-timeout nil)) ; for lispworks4 2. Browsing results from test-handlers.lisp.
It worked fine until I made a break for half an hour. When I come back to my computer and click on some link, LispWorks signaled.
The odd thing is that in call to COMM::LISTEN-AND-ATTACH-STREAM-FROM-SOCKET, COMM::SOCKET : 464
But in call to (METHOD HUNCHENTOOT:CREATE-REQUEST-HANDLER-THREAD (HUNCHENTOOT:ONE-THREAD-PER-CONNECTION-TASKMASTER T)) HUNCHENTOOT::SOCKET : -1
Looks like LispWorks (or even Windows) error. Has anybody observed something like this?
The backtrace excerpt is below. --------------------------------------------------- Condition: -1 cannot be converted to foreign type (:UNSIGNED-INTEGER-TYPE 32).
Call to (SUBFUNCTION 2 COMM:START-UP-SERVER) (offset 43) COMM::SOCKET : NIL CONDITION : #<FLI:FOREIGN-TYPE-ERROR 206AB0CC>
Call to (SUBFUNCTION 1 COMM::LISTEN-AND-ATTACH-STREAM-NO-ERROR) (offset 41) CONDITION : #<FLI:FOREIGN-TYPE-ERROR 206AB0CC>
Binding frame: CONDITIONS::*IN-SIGNAL-CATCH* : T
Call to SIGNAL (offset 699) CONDITIONS::DATUM : #<FLI:FOREIGN-TYPE-ERROR 206AB0CC> CONDITIONS::ARGUMENTS : NIL
Binding frame: CONDITIONS::*IN-SIGNAL-CATCH* : NIL
Catch frame: CONDITIONS::SIGNAL-CATCH
Binding frame: CONDITIONS::*BROKEN-ON-SIGNALS* : NIL
Catch frame: #<unbound>
Binding frame: FLI::*FOREIGN-OBJECT-SCOPE-STACK-DETAILS* : #(16 #1=(8519856 . 4096) (#1#))
Call to COMM::GETPEERNAME (offset 227) COMM::S : -1 COMM::NAME : #<Pointer to type (:STRUCT COMM::SOCKADDR) = #x008200B0> COMM::NAMELEN : 16
Catch frame: #<unbound>
Binding frame: FLI::*FOREIGN-OBJECT-SCOPE-STACK-DETAILS* : #(0 NIL NIL)
Call to COMM::GET-SOCKET-ADDRESS-AUX (offset 370) COMM::SOCKET : -1 FUNCTION : COMM::GETPEERNAME
Call to HUNCHENTOOT::GET-PEER-ADDRESS-AND-PORT (offset 43) HUNCHENTOOT::SOCKET : -1
Call to (METHOD HUNCHENTOOT:CREATE-REQUEST-HANDLER-THREAD (HUNCHENTOOT:ONE-THREAD-PER-CONNECTION-TASKMASTER T)) (offset 97) HUNCHENTOOT:TASKMASTER : #<HUNCHENTOOT:ONE-THREAD-PER-CONNECTION-TASKMASTER 22087454> HUNCHENTOOT::SOCKET : -1 CLOS::.ISL. : :DONT-KNOW
Catch frame: #<unbound>
Call to COMM::LISTEN-AND-ATTACH-STREAM-FROM-SOCKET (offset 133) COMM::SOCKET : 464 FUNCTION : #<closure (SUBFUNCTION 3 (METHOD HUNCHENTOOT:START-LISTENING (HUNCHENTOOT:ACCEPTOR))) 22087F32>
Catch frame: (NIL)
Call to COMM::LISTEN-AND-ATTACH-STREAM (offset 619) FUNCTION : #<closure (SUBFUNCTION 3 (METHOD HUNCHENTOOT:START-LISTENING (HUNCHENTOOT:ACCEPTOR))) 22087F32> COMM::SERVICE : 4242 COMM::ANNOUNCE : #<closure (SUBFUNCTION 2 COMM:START-UP-SERVER) 22087F62> COMM::BACKLOG : 5 COMM::ADDRESS : NIL
Catch frame: (NIL)
Call to COMM::LISTEN-AND-ATTACH-STREAM-NO-ERROR (offset 284) FUNCTION : #<closure (SUBFUNCTION 3 (METHOD HUNCHENTOOT:START-LISTENING (HUNCHENTOOT:ACCEPTOR))) 22087F32> COMM::SERVICE : 4242 COMM::ANNOUNCE : #<closure (SUBFUNCTION 2 COMM:START-UP-SERVER) 22087F62> COMM::BACKLOG : 5 COMM::ADDRESS : NIL
Catch frame: MP::PROCESS-TAG ... -- Sincerely, Dmitriy Ivanov lisp.ystok.ru
Apparently, Lispworks invokes the callback function for new incoming connections with a socket argument value of -1:
(defmethod start-listening ((acceptor acceptor)) (multiple-value-bind (listener-process startup-condition) (comm:start-up-server :service (acceptor-port acceptor) :address (acceptor-address acceptor) :process-name (format nil "Hunchentoot listener (~A:~A)" (or (acceptor-address acceptor) "*") (acceptor-port acceptor)) ;; this function is called once on startup - we ;; use it to check for errors :announce (lambda (socket &optional condition) (declare (ignore socket)) (when condition (error condition))) ;; this function is called whenever a connection ;; is made :function (lambda (handle) (unless (acceptor-shutdown-p acceptor) (handle-incoming-connection (acceptor-taskmaster acceptor) handle))) ;; wait until the acceptor was successfully started ;; or an error condition is returned :wait t) (when startup-condition (error startup-condition)) (mp:process-stop listener-process) (setf (acceptor-process acceptor) listener-process) (values)))
I am not sure whether this is expected or legal. I'd ask the Lispworks folks about it.
-Hans On Thu, Jan 19, 2012 at 1:12 PM, Dmitriy Ivanov divanov11@gmail.com wrote:
Hello folks,
I have bumped into the error while playing around:
- (hunchentoot:start (make-instance 'hunchentoot:easy-acceptor
:port 4242 :write-timeout nil)) ; for lispworks4 2. Browsing results from test-handlers.lisp.
It worked fine until I made a break for half an hour. When I come back to my computer and click on some link, LispWorks signaled.
The odd thing is that in call to COMM::LISTEN-AND-ATTACH-STREAM-FROM-SOCKET, COMM::SOCKET : 464
But in call to (METHOD HUNCHENTOOT:CREATE-REQUEST-HANDLER-THREAD (HUNCHENTOOT:ONE-THREAD-PER-CONNECTION-TASKMASTER T)) HUNCHENTOOT::SOCKET : -1
Looks like LispWorks (or even Windows) error. Has anybody observed something like this?
The backtrace excerpt is below.
Condition: -1 cannot be converted to foreign type (:UNSIGNED-INTEGER-TYPE 32).
Call to (SUBFUNCTION 2 COMM:START-UP-SERVER) (offset 43) COMM::SOCKET : NIL CONDITION : #<FLI:FOREIGN-TYPE-ERROR 206AB0CC>
Call to (SUBFUNCTION 1 COMM::LISTEN-AND-ATTACH-STREAM-NO-ERROR) (offset 41) CONDITION : #<FLI:FOREIGN-TYPE-ERROR 206AB0CC>
Binding frame: CONDITIONS::*IN-SIGNAL-CATCH* : T
Call to SIGNAL (offset 699) CONDITIONS::DATUM : #<FLI:FOREIGN-TYPE-ERROR 206AB0CC> CONDITIONS::ARGUMENTS : NIL
Binding frame: CONDITIONS::*IN-SIGNAL-CATCH* : NIL
Catch frame: CONDITIONS::SIGNAL-CATCH
Binding frame: CONDITIONS::*BROKEN-ON-SIGNALS* : NIL
Catch frame: #<unbound>
Binding frame: FLI::*FOREIGN-OBJECT-SCOPE-STACK-DETAILS* : #(16 #1=(8519856 . 4096) (#1#))
Call to COMM::GETPEERNAME (offset 227) COMM::S : -1 COMM::NAME : #<Pointer to type (:STRUCT COMM::SOCKADDR) = #x008200B0> COMM::NAMELEN : 16
Catch frame: #<unbound>
Binding frame: FLI::*FOREIGN-OBJECT-SCOPE-STACK-DETAILS* : #(0 NIL NIL)
Call to COMM::GET-SOCKET-ADDRESS-AUX (offset 370) COMM::SOCKET : -1 FUNCTION : COMM::GETPEERNAME
Call to HUNCHENTOOT::GET-PEER-ADDRESS-AND-PORT (offset 43) HUNCHENTOOT::SOCKET : -1
Call to (METHOD HUNCHENTOOT:CREATE-REQUEST-HANDLER-THREAD (HUNCHENTOOT:ONE-THREAD-PER-CONNECTION-TASKMASTER T)) (offset 97) HUNCHENTOOT:TASKMASTER : #<HUNCHENTOOT:ONE-THREAD-PER-CONNECTION-TASKMASTER 22087454> HUNCHENTOOT::SOCKET : -1 CLOS::.ISL. : :DONT-KNOW
Catch frame: #<unbound>
Call to COMM::LISTEN-AND-ATTACH-STREAM-FROM-SOCKET (offset 133) COMM::SOCKET : 464 FUNCTION : #<closure (SUBFUNCTION 3 (METHOD HUNCHENTOOT:START-LISTENING (HUNCHENTOOT:ACCEPTOR))) 22087F32>
Catch frame: (NIL)
Call to COMM::LISTEN-AND-ATTACH-STREAM (offset 619) FUNCTION : #<closure (SUBFUNCTION 3 (METHOD HUNCHENTOOT:START-LISTENING (HUNCHENTOOT:ACCEPTOR))) 22087F32> COMM::SERVICE : 4242 COMM::ANNOUNCE : #<closure (SUBFUNCTION 2 COMM:START-UP-SERVER) 22087F62> COMM::BACKLOG : 5 COMM::ADDRESS : NIL
Catch frame: (NIL)
Call to COMM::LISTEN-AND-ATTACH-STREAM-NO-ERROR (offset 284) FUNCTION : #<closure (SUBFUNCTION 3 (METHOD HUNCHENTOOT:START-LISTENING (HUNCHENTOOT:ACCEPTOR))) 22087F32> COMM::SERVICE : 4242 COMM::ANNOUNCE : #<closure (SUBFUNCTION 2 COMM:START-UP-SERVER) 22087F62> COMM::BACKLOG : 5 COMM::ADDRESS : NIL
Catch frame: MP::PROCESS-TAG ... -- Sincerely, Dmitriy Ivanov lisp.ystok.ru
tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel