[kpax-devel] Dropping into the debugger

Sven Van Caekenberghe scaekenberghe at common-lisp.net
Fri Oct 13 17:58:58 UTC 2006


Joel,

On 13 Oct 2006, at 18:03, Joel Reymont wrote:

> I'll poke around more and wait for the results of your ACL test.

I tried compiling, loading and running KPAX, all the standard  
examples as well as the reddit example,
and from a first look, everything went fine - see the transcript below.

I am using the s-http-server variant (standalone http server in lisp,  
no need for mod_lisp stuff).
BTW, the best starting point is the PI web app:
	http://localhost:2001/kpax/dynamic/pi
Log in using admin/trustno1.
Everything is in very verbose debugging/logging mode.
When you make an error, the debugger is invoked (see the end of the  
transcript).
How to debug a multithreaded app from a single listener is  
implementation specific:
I am only used to LispWorks' IDE and I am very happy with it.
I am absolutely no expert on SLIME, certainly not in that area.
I think you might have some issues there.
Still, it remain possible that the 'port' to acl is not perfect,
have a look at s-sysdeps when in doubt.

Success! - Don't hesitate to ask more questions.

HTH,

Sven

[sven at voyager:~]$ alisp
International Allegro CL Free Express Edition
8.0 [Mac OS X] (Jul 21, 2006 11:33)
Copyright (C) 1985-2006, Franz Inc., Oakland, CA, USA.  All Rights  
Reserved.

This development copy of Allegro CL is licensed to:
    Sven Van Caekenberghe, Beta Nine

;; Optimization settings: safety 1, space 1, speed 1, debug 2.
;; For a complete description of all compiler switches given the
;; current optimization settings evaluate (EXPLAIN-COMPILER-SETTINGS).
CL-USER(1): (load "~/apps/asdf/init-asdf.lisp")
; Loading /Users/sven/apps/asdf/init-asdf.lisp
;   Fast loading /Users/sven/apps/asdf/asdf.fasl
;Pushed #P"/Users/sven/apps/asdf/systems/" onto ASDF central registry
T
CL-USER(2): (asdf:oos 'asdf:load-op :kpax-examples)
; loading system definition from
; /Users/sven/apps/asdf/systems/kpax-examples.asd into
; #<The ASDF85 package>
; Loading /Users/sven/apps/asdf/systems/kpax-examples.asd
; registering #<SYSTEM :KPAX-EXAMPLES @ #x105ed7d2> as KPAX-EXAMPLES
; loading system definition from /Users/sven/apps/asdf/systems/kpax.asd
; into #<The ASDF86 package>
; Loading /Users/sven/apps/asdf/systems/kpax.asd
; registering #<SYSTEM :KPAX @ #x1060000a> as KPAX
; loading system definition from
; /Users/sven/apps/asdf/systems/kpax-s-http-server.asd into
; #<The ASDF89 package>
; Loading /Users/sven/apps/asdf/systems/kpax-s-http-server.asd
; registering #<SYSTEM :KPAX-S-HTTP-SERVER @ #x10609802> as
; KPAX-S-HTTP-SERVER
; loading system definition from
; /Users/sven/apps/asdf/systems/s-http-server.asd into
; #<The ASDF90 package>
; Loading /Users/sven/apps/asdf/systems/s-http-server.asd
; registering #<SYSTEM :S-HTTP-SERVER @ #x10613be2> as S-HTTP-SERVER
; loading system definition from /Users/sven/apps/asdf/systems/puri.asd
; into #<The ASDF91 package>
; Loading /Users/sven/apps/asdf/systems/puri.asd
; registering #<SYSTEM PURI @ #x1061da0a> as PURI
; registering #<SYSTEM PURI-TESTS @ #x10620e8a> as PURI-TESTS
; loading system definition from
; /Users/sven/apps/asdf/systems/s-base64.asd into #<The ASDF94 package>
; Loading /Users/sven/apps/asdf/systems/s-base64.asd
; registering #<SYSTEM :S-BASE64 @ #x1062caba> as S-BASE64
; loading system definition from
; /Users/sven/apps/asdf/systems/s-sysdeps.asd into #<The ASDF95 package>
; Loading /Users/sven/apps/asdf/systems/s-sysdeps.asd
; registering #<SYSTEM :S-SYSDEPS @ #x10637e8a> as S-SYSDEPS
; loading system definition from
; /Users/sven/apps/asdf/systems/s-utils.asd into #<The ASDF96 package>
; Loading /Users/sven/apps/asdf/systems/s-utils.asd
; registering #<SYSTEM :S-UTILS @ #x106c3e42> as S-UTILS
; loading system definition from
; /Users/sven/apps/asdf/systems/kpax-core.asd into #<The ASDF97 package>
; Loading /Users/sven/apps/asdf/systems/kpax-core.asd
; registering #<SYSTEM :KPAX-CORE @ #x106d1b7a> as KPAX-CORE
; loading system definition from
; /Users/sven/apps/asdf/systems/cl-who.asd into #<The ASDF99 package>
; Loading /Users/sven/apps/asdf/systems/cl-who.asd
; registering #<SYSTEM #:CL-WHO @ #x106e43da> as CL-WHO
; loading system definition from
; /Users/sven/apps/asdf/systems/kpax-mod-lisp.asd into
; #<The ASDF100 package>
; Loading /Users/sven/apps/asdf/systems/kpax-mod-lisp.asd
; registering #<SYSTEM :KPAX-MOD-LISP @ #x10708262> as KPAX-MOD-LISP
; Fast loading /Users/sven/apps/portableaserve/libs/puri-1.3.1/src.fasl
; Fast loading /Users/sven/darcs/s-base64/src/package.fasl
; Fast loading /Users/sven/darcs/s-base64/src/base64.fasl
; Fast loading /Users/sven/darcs/s-sysdeps/src/package.fasl
; Fast loading /Users/sven/darcs/s-sysdeps/src/sysdeps.fasl
; Fast loading /Users/sven/darcs/s-utils/src/package.fasl
; Fast loading /Users/sven/darcs/s-utils/src/utils.fasl
; Fast loading /Users/sven/darcs/s-http-server/src/package.fasl
; Fast loading /Users/sven/darcs/s-http-server/src/http-server.fasl
; Fast loading /Users/sven/apps/cl-who/packages.fasl
; Fast loading /Users/sven/apps/cl-who/who.fasl
; Fast loading /Users/sven/darcs/kpax/src/package-kpax.fasl
; Fast loading /Users/sven/darcs/kpax/src/log.fasl
; Fast loading /Users/sven/darcs/kpax/src/util.fasl
; Fast loading /Users/sven/darcs/kpax/src/localization.fasl
; Fast loading /Users/sven/darcs/kpax/src/sha1.fasl
Warning: Ignoring declaration of unrecognized ftype:
          (FUNCTION (UB32 UB32 UB32) UB32)
Warning: The type subform of the FTYPE declaration must be a subtype of
          FUNCTION: (FTYPE (FUNCTION (UB32 UB32 UB32) UB32) F1 F2 F3 F4)
Warning: Ignoring declaration of unrecognized ftype:
          (FUNCTION (UB32 UB32) UB32)
Warning: The type subform of the FTYPE declaration must be a subtype of
          FUNCTION: (FTYPE (FUNCTION (UB32 UB32) UB32) MOD32+)
Warning: Ignoring declaration of unrecognized ftype:
          (FUNCTION (UB32 (UNSIGNED-BYTE 5)) UB32)
Warning: The type subform of the FTYPE declaration must be a subtype of
          FUNCTION:
          (FTYPE (FUNCTION (UB32 (UNSIGNED-BYTE 5)) UB32) ROL32)
; Fast loading /Users/sven/darcs/kpax/src/md5.fasl
; Fast loading /Users/sven/darcs/kpax/src/mersenne-twister-random.fasl
; Fast loading /Users/sven/darcs/kpax/src/hmac.fasl
; Fast loading /Users/sven/darcs/kpax/src/crypto.fasl
; Autoloading for EXCL::GRAY-OPEN:
;   Fast loading from bundle code/streamc.fasl.
;     Fast loading from bundle code/efft-utf8-base.fasl.
;     Fast loading from bundle code/efft-void.fasl.
;     Fast loading from bundle code/efft-latin1-base.fasl.
; Fast loading /Users/sven/darcs/kpax/src/html-macro.fasl
; Fast loading /Users/sven/darcs/kpax/src/html.fasl
; Fast loading /Users/sven/darcs/kpax/src/globals.fasl
; Fast loading /Users/sven/darcs/kpax/src/constants.fasl
; Fast loading /Users/sven/darcs/kpax/src/attributes-mixin.fasl
; Fast loading /Users/sven/darcs/kpax/src/session.fasl
; Fast loading /Users/sven/darcs/kpax/src/server.fasl
; Fast loading /Users/sven/darcs/kpax/src/request-response.fasl
; Fast loading /Users/sven/darcs/kpax/src/translator.fasl
; Fast loading /Users/sven/darcs/kpax/src/web-app-in-server.fasl
; Fast loading /Users/sven/darcs/kpax/src/session-tracking.fasl
; Fast loading /Users/sven/darcs/kpax/src/web-app.fasl
; Fast loading /Users/sven/darcs/kpax/src/dispatcher.fasl
; Fast loading /Users/sven/darcs/kpax/src/debug.fasl
; Fast loading /Users/sven/darcs/kpax/src/kpax.fasl
; Fast loading /Users/sven/darcs/kpax/src/run.fasl
; Fast loading /Users/sven/darcs/kpax/src/multipart-form-encoding.fasl
; Fast loading /Users/sven/darcs/kpax/src/extensions.fasl
; Fast loading /Users/sven/darcs/kpax/src/options.fasl
; Fast loading /Users/sven/darcs/kpax/src/constraints.fasl
; Fast loading /Users/sven/darcs/kpax/src/menubar.fasl
; Fast loading /Users/sven/darcs/kpax/src/data-set-view.fasl
; Fast loading /Users/sven/darcs/kpax/src/web-form.fasl
; Fast loading /Users/sven/darcs/kpax/src/package-kpax-user.fasl
; Fast loading /Users/sven/darcs/kpax/src/s-http-server.fasl
; Fast loading /Users/sven/darcs/kpax/src/mod-lisp.fasl
; Fast loading /Users/sven/darcs/kpax/example/helloworld1.fasl
; Fast loading /Users/sven/darcs/kpax/example/factorial1.fasl
; Fast loading /Users/sven/darcs/kpax/example/session1.fasl
; Fast loading /Users/sven/darcs/kpax/example/no-session1.fasl
; Fast loading /Users/sven/darcs/kpax/example/snoop1.fasl
; Fast loading /Users/sven/darcs/kpax/example/forms1.fasl
; Fast loading /Users/sven/darcs/kpax/example/forms2.fasl
; Fast loading /Users/sven/darcs/kpax/example/benchmark1.fasl
; Fast loading /Users/sven/darcs/kpax/example/todo-list.fasl
; Fast loading /Users/sven/darcs/kpax/example/secure1.fasl
; Fast loading /Users/sven/darcs/kpax/example/upload1.fasl
; Fast loading /Users/sven/darcs/kpax/example/upload2.fasl
; Fast loading /Users/sven/darcs/kpax/example/upload3.fasl
; Fast loading /Users/sven/darcs/kpax/example/calculator.fasl
; Fast loading /Users/sven/darcs/kpax/example/list-web-apps.fasl
; Fast loading /Users/sven/darcs/kpax/example/menu1.fasl
; Fast loading /Users/sven/darcs/kpax/example/tabs1.fasl
; Fast loading /Users/sven/darcs/kpax/example/browser1.fasl
; Fast loading /Users/sven/darcs/kpax/example/secure-login.fasl
; Fast loading /Users/sven/darcs/kpax/example/pi.fasl
; Fast loading /Users/sven/darcs/kpax/example/lsp.fasl
; Fast loading /Users/sven/darcs/kpax/example/wiki.fasl
NIL
CL-USER(3): :ok
:ok
CL-USER(4): (in-package :kpax)
#<The KPAX package>
KPAX(5): (start-kpax :server-class 's-http-server)
;; S-HTTP-SERVER: Started a new server on port 2001
#<S-HTTP-SERVER :RUNNING @ #x1072e4ca>
KPAX(6): (describe *)
#<S-HTTP-SERVER :RUNNING @ #x1072e4ca> is an instance of
     #<STANDARD-CLASS S-HTTP-SERVER>:
The following slots have :INSTANCE allocation:
   CUTOFF                   200
   LOGGER-LOCK              #<MULTIPROCESSING:PROCESS-LOCK logger @
                              #x1072e56a>
   APPENDERS                (#<DEBUG-STREAM-APPENDER @ #x1073777a>
                             #<STREAM-APPENDER @ #x1073771a>)
   LAST-FLUSHED-TIMESTAMP   3369750109
   ATTRIBUTES               NIL
   SESSIONS                 #<EQL hash-table with 0 entries @  
#x1072e58a>
   SESSION-LIFETIME         3600
   SESSIONS-LAST-REAPED     3369750109
   SESSION-ID-SEED          3111288172
   SESSION-LOCK             #<MULTIPROCESSING:PROCESS-LOCK
                              session-manager @ #x1072ed4a>
   DYNAMIC-PREFIX           "/kpax/dynamic/"
   STATIC-PREFIX            "/kpax/static/"
   HOSTNAME                 "localhost"
   SERVER-ID                "KPAX1"
   DISPATCHER               #<DISPATCHER @ #x1072ed7a>
   DEBUG-MODE               T
   STREAM-APPENDER          #<STREAM-APPENDER @ #x1073771a>
   DEBUG-STREAM-APPENDER    #<DEBUG-STREAM-APPENDER @ #x1073777a>
   STATE                    :RUNNING
   S-HTTP-SERVER            #<S-HTTP-SERVER:S-HTTP-SERVER
                              "s-http-server" port 2001 running @
                              #x107376ea>
KPAX(7): (asdf:oos 'asdf:load-op :s-http-client)
; loading system definition from
; /Users/sven/apps/asdf/systems/s-http-client.asd into
; #<The ASDF206 package>
; Loading /Users/sven/apps/asdf/systems/s-http-client.asd
; registering #<SYSTEM :S-HTTP-CLIENT @ #x1074347a> as S-HTTP-CLIENT
; Fast loading /Users/sven/darcs/s-http-client/src/package.fasl
; Fast loading /Users/sven/darcs/s-http-client/src/http-client.fasl
NIL
KPAX(8): (load "~/darcs/kpax/example/reddit.lisp")
; Loading /Users/sven/darcs/kpax/example/reddit.lisp
T
KPAX(9): ;; S-HTTP-SERVER: [1] Handling #<S-HTTP-SERVER:HTTP-REQUEST
                                           GET "/kpax/dynamic/reddit"
                                           @
                                           #x106dbdc2>
;; S-HTTP-SERVER: Running KPAX s-http-server-handler
;; KPAX 20061013T174359 INFO handling /kpax/dynamic/reddit
;; KPAX 20061013T174359 INFO created new session 2tiw9yidl02rr  
[13362880952977667847]
;; KPAX 20061013T174359 INFO replied 578 bytes with status OK
;; S-HTTP-SERVER: [1] Handling #<S-HTTP-SERVER:HTTP-REQUEST
                                  GET "/favicon.ico"
                                  @
                                  #x105c0e82>
;; S-HTTP-SERVER: [1] Handling #<S-HTTP-SERVER:HTTP-REQUEST
                                  GET "/kpax/dynamic/reddit/reddit- 
new-link"
                                  @
                                  #x105c8b3a>
;; S-HTTP-SERVER: Running KPAX s-http-server-handler
;; KPAX 20061013T174418 INFO handling /kpax/dynamic/reddit/reddit-new- 
link
;; KPAX 20061013T174418 INFO replied 725 bytes with status OK
;; S-HTTP-SERVER: [1] Handling #<S-HTTP-SERVER:HTTP-REQUEST
                                  GET "/favicon.ico"
                                  @
                                  #x105d11a2>
;; S-HTTP-SERVER: [1] Handling #<S-HTTP-SERVER:HTTP-REQUEST
                                  POST "/kpax/dynamic/reddit/reddit- 
submit-new-link"
                                  @
                                  #x105d65fa>
;; S-HTTP-SERVER: Running KPAX s-http-server-handler
;; KPAX 20061013T174457 INFO handling /kpax/dynamic/reddit/reddit- 
submit-new-link
; Fast loading from bundle code/acldns.fasl.
;;; Installing acldns patch, version 1
;; KPAX 20061013T174458 INFO replied 0 bytes with status MOVED
;; S-HTTP-SERVER: [2] Handling #<S-HTTP-SERVER:HTTP-REQUEST
                                  GET "/kpax/dynamic/reddit/reddit-home"
                                  @
                                  #x10635b9a>
;; S-HTTP-SERVER: Running KPAX s-http-server-handler
;; KPAX 20061013T174458 INFO handling /kpax/dynamic/reddit/reddit-home
;; KPAX 20061013T174458 INFO replied 1148 bytes with status OK
;; S-HTTP-SERVER: [2] Handling #<S-HTTP-SERVER:HTTP-REQUEST
                                  GET "/favicon.ico"
                                  @
                                  #x106dfeba>
KPAX(9): *last-request-response*
#<S-HTTP-SERVER-REQUEST-RESPONSE
   #<URI /kpax/dynamic/reddit/reddit-home> @ #x10680a1a>
KPAX(10): *before-last-request-response*
#<S-HTTP-SERVER-REQUEST-RESPONSE
   #<URI /kpax/dynamic/reddit/reddit-submit-new-link> @ #x1068eb72>
KPAX(11): (describe *)
#<S-HTTP-SERVER-REQUEST-RESPONSE
   #<URI /kpax/dynamic/reddit/reddit-submit-new-link> @ #x1068eb72>
     is an instance of #<STANDARD-CLASS S-HTTP-SERVER-REQUEST-RESPONSE>:
The following slots have :INSTANCE allocation:
   ATTRIBUTES              ((:DISPATCH-TIMESTAMP . 7287069527))
   URI-STRING              "/kpax/dynamic/reddit/reddit-submit-new-link"
   URI                     NIL
   SERVER                  #<S-HTTP-SERVER :RUNNING @ #x10682ef2>
   APPLICATION             #<WEB-APP :REDDIT @ #x10682dca>
   SESSION                 #<SESSION 13362880952977667847 @ #x10699972>
   SUB-PATH                ("reddit-submit-new-link")
   REQUEST-STATE           :BODY-READ
   RESPONSE-STATE          :RESPONSE-FLUSHED
   RESPONSE-STATUS         :MOVED
   RESPONSE-MIME-TYPE      "text/html"
   RESPONSE-HEADERS        (("Content-Type" . "text/html")
                            ("Content-Length" . "0")
                            ("Location"
                             . "/kpax/dynamic/reddit/reddit-home"))
   BODY                    "url=http%3A%2F%2Fcommon- 
lisp.net&title=Common-Lisp.net"
   CONTENT-STREAM          NIL
   S-HTTP-SERVER-REQUEST   #<S-HTTP-SERVER:HTTP-REQUEST
                             POST "/kpax/dynamic/reddit/reddit-submit- 
new-link"
                             @ #x106b41da>
   SOCKET-STREAM           #<MULTIVALENT stream socket
                             closed, but was connected from
                             localhost/2001 to localhost/53713 @
                             #x106b41f2>
   PARAMETERS              (("url" . "http://common-lisp.net")
                            ("title" . "Common-Lisp.net"))
KPAX(12): ;; S-HTTP-SERVER: [3] Handling #<S-HTTP-SERVER:HTTP-REQUEST
                                            GET "/kpax/dynamic/admin"
                                            @
                                            #x106e9eaa>
;; S-HTTP-SERVER: Running KPAX s-http-server-handler
;; KPAX 20061013T175031 INFO handling /kpax/dynamic/admin
;; KPAX 20061013T175031 ERROR error No
                                     web
                                     app
                                     found
                                     for
                                     "/kpax/dynamic/admin"
Error: No web app found for "/kpax/dynamic/admin"
   [condition type: SIMPLE-ERROR]

Restart actions (select using :continue):
0: Retry handling failed request
1: Continue by returning an error page
2: Abort entirely from this (lisp) process.
[Current process: connection-handler-3]
[1] CL-USER(1):





More information about the kpax-devel mailing list