From: Gabor M. <me...@ho...> - 2004-09-19 20:10:30
|
I'm trying to debug a function published via aserve. If the :notrap debug option is turned on aserve lets the debuger handle the error, but something fails pretty badly. Below, I pasted a small test program to the prompt, visited http://localhost:2001/error and typed (sb-thread:release-foreground). $ sbcl This is SBCL 0.8.14.24, 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. * (require 'aserve) (defpackage #:atest (:use #:common-lisp #:net.aserve #:net.html.generator)) (in-package #:atest) (start :port 2001) (publish :path "/hello" :content-type "text/plain" :function #'(lambda (req ent) (with-http-response (req ent) (with-http-body (req ent) (princ "Hello World!" *html-stream*))))) (net.aserve::debug-on :notrap) (publish :path "/error" :content-type "text/plain" :function #'(lambda (req ent) (with-http-response (req ent) (with-http-body (req ent) (car 'a))))) ; loading system definition from ; #P"/usr/share/common-lisp/systems/acl-compat.asd" into #<PACKAGE "ASDF3834"> ; registering #<SYSTEM ACL-COMPAT {9177D31}> as ACL-COMPAT ; loading system definition from #P"/usr/lib/sbcl/systems/sb-posix.asd" into ; #<PACKAGE "ASDF3886"> ; registering #<SYSTEM SB-POSIX {9447F89}> as SB-POSIX ; registering #<SYSTEM SB-POSIX-TESTS {957E9F9}> as SB-POSIX-TESTS ; loading system definition from #P"/usr/lib/sbcl/systems/sb-bsd-sockets.asd" ; into #<PACKAGE "ASDF4084"> ; registering #<SYSTEM SB-BSD-SOCKETS {985DCA9}> as SB-BSD-SOCKETS ; registering #<SYSTEM SB-BSD-SOCKETS-TESTS {9B4B629}> as SB-BSD-SOCKETS-TESTS ; loading system definition from ; #P"/usr/share/common-lisp/systems/cl-ppcre.asd" into #<PACKAGE "ASDF4143"> ; registering #<SYSTEM #:CL-PPCRE {9149E19}> as CL-PPCRE ; loading system definition from #P"/usr/share/common-lisp/systems/puri.asd" ; into #<PACKAGE "ASDF4149"> ; registering #<SYSTEM PURI {92E0DF1}> as PURI ; registering #<SYSTEM PURI-TESTS {94DC751}> as PURI-TESTS ; loading system definition from #P"/usr/share/common-lisp/systems/htmlgen.asd" ; into #<PACKAGE "ASDF4171"> ; registering #<SYSTEM HTMLGEN {9857CA9}> as HTMLGEN ("SB-GROVEL" "URI" "SB-BSD-SOCKETS" "SB-POSIX" "ACL-SOCKET" "ASERVE") * #<PACKAGE "ATEST"> * #<PACKAGE "ATEST"> * #<WSERVER port 2001 {A631D21}> * #<COMPUTED-ENTITY {9D479C9}> * NIL * ; in: LAMBDA NIL ; (CAR 'ATEST::A) ; --> LOCALLY PROGN CAR ; ==> ; (LOCALLY ; (DECLARE (OPTIMIZE (SB-C:INSERT-STEP-CONDITIONS 0))) ; (SB-C::%COMPILE-TIME-TYPE-ERROR 'SB-C::DUMMY ; 'LIST ; '(VALUES (MEMBER ATEST::A) &OPTIONAL))) ; ; caught WARNING: ; Asserted type LIST conflicts with derived type (VALUES (MEMBER A) &OPTIONAL). ; See also: ; The SBCL Manual, Node "Handling of Types" ; ; caught WARNING: ; Asserted type LIST conflicts with derived type (VALUES (MEMBER A) &OPTIONAL). ; See also: ; The SBCL Manual, Node "Handling of Types" ; compilation unit finished ; caught 2 WARNING conditions #<COMPUTED-ENTITY {A012711}> * 127.0.0.1 - - [Sun, 19 Sep 2004 20:06:08 GMT] "GET /hello HTTP/1.1" 200 -1 debugger invoked on a SB-INT:SIMPLE-CONTROL-ERROR in thread 8868: attempt to RETURN-FROM a block or GO to a tag that no longer exists (sb-thread:release-foreground) Resuming thread 8868 You can type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [ABANDON ] Abandon this request and wait for the next one 1: [DESTROY-THREAD] Destroy this thread (8868) (SB-KERNEL::INVALID-UNWIND-ERROR-HANDLER 4 #<unavailable argument> #<unavailable argument> #<unavailable argument> #<unavailable argument>)[:EXTERNAL] 0] ba 0: (SB-KERNEL::INVALID-UNWIND-ERROR-HANDLER 4 #<unavailable argument> #<unavailable argument> #<unavailable argument> #<unavailable argument>)[:EXTERNAL] 1: (SB-KERNEL:INTERNAL-ERROR 2 #.(SB-SYS:INT-SAP #X40C56680) #<unavailable argument>)[:EXTERNAL] 2: ("foreign function: call_into_lisp") 3: ("foreign function: funcall2") 4: ("foreign function: interrupt_internal_error") 5: ("foreign function: sigtrap_handler") no debug information available for #<code object {1000007}> 0] Gabor Melis |