[iolib-devel] traceback help

elliott elliott at elliottjohnson.net
Fri Jun 6 15:21:16 UTC 2008


Marko Tapio Manninen wrote:
> Hi,
>
> every now and then i get the mysterious traceback with emacs and slime 
> and i cant always figure out, how to detect the problem. In this case 
> anonymous function is called with invalid arguments, but how do i 
> know, what is the specific function, where it is and so on? 

I'm not sure of your level of familiarity with debugging, but usually 
when I get a backtrace I locate the area of code it's referring to and 
put break points or TRACE the function calls to see things a bit 
clearer.  The fact that this involves an anonymous function call I'd say 
to pay close attention to lambda statements, LABELS, FLET's and the 
like.  I would spend some time with the primary method for 
IO.MULTIPLEX:EVENT-DISPATCH as the backtrace indicates that was the most 
recent method called before the backtrace.

I've rarely used (*)MCL, so I'm not sure that I can be a big help on 
that end.  Looking at the code I can't see any function calls with extra 
arguments, so it could be a bug local to your CCL or something else 
strange.  Have you tried another lisp implementation to see if the 
problem is cross implementation?

elliott

> This error comes, when using iolib tutorial socket server and while it 
> talk about ccl threads, i thought if you could help with it:
>
> Invalid program: Too many arguments in call to #<Anonymous Function 
> #x30004108C64F>:
> 1 arguments provided, at most 0 accepted.
>    [Condition of type CCL::SIMPLE-PROGRAM-ERROR]
>
> Backtrace:
>   0: (IO.MULTIPLEX::MIN-TIMEOUT 6397.371749698D0 6402.371506881D0 1)
>       Locals:
>         IO.MULTIPLEX::TIMEOUTS = (6397.371749698D0 6402.371506881D0 1)
>   1: (#<STANDARD-METHOD IO.MULTIPLEX:EVENT-DISPATCH 
> (IO.MULTIPLEX:EVENT-BASE)> #<event base, 1 FDs monitored, using: 
> #<kqueue(2) multiplexer> #x3000415EC40D> ':ONE-SHOT 'NIL ':TIMEOUT 10 
> ':MAX-TIMEOUT 1)
>       Locals:
>         IO.MULTIPLEX::ONE-SHOT = NIL
>         IO.MULTIPLEX::TIMEOUT = 10
>         IO.MULTIPLEX::MAX-TIMEOUT = 1
>         IO.MULTIPLEX::GOT-FD-EVENTS-P = NIL
>         IO.MULTIPLEX::GOT-FD-TIMEOUTS-P = NIL
>         IO.MULTIPLEX::GOT-TIMERS-P = NIL
>   2: (CCL::%CALL-NEXT-METHOD '(NIL
>        #<STANDARD-METHOD IO.MULTIPLEX:EVENT-DISPATCH 
> (IO.MULTIPLEX:EVENT-BASE)>
>        . 2638791))
>       Locals:
>         CCL::ARGS = NIL
>         CCL::*INTERRUPT-LEVEL* = 0
>         CCL::*INTERRUPT-LEVEL* = -1
>         CDR = NIL
>         METHOD-FUNCTION = #<METHOD-FUNCTION 
> IO.MULTIPLEX:EVENT-DISPATCH (IO.MULTIPLEX:EVENT-BASE)>
>       Catch-tags:
>         NIL
>   3: (CCL::%%STANDARD-COMBINED-METHOD-DCODE '(#<STANDARD-METHOD 
> IO.MULTIPLEX:EVENT-DISPATCH :AROUND (IO.MULTIPLEX:EVENT-BASE)>
>        #<STANDARD-METHOD IO.MULTIPLEX:EVENT-DISPATCH 
> (IO.MULTIPLEX:EVENT-BASE)>) 2638791)
>       Locals:
>         CCL::CELL-2 = (#<STANDARD-METHOD IO.MULTIPLEX:EVENT-DISPATCH 
> (IO.MULTIPLEX:EVENT-BASE)> . 2638791)
>         #:G47718 = #<METHOD-FUNCTION IO.MULTIPLEX:EVENT-DISPATCH 
> :AROUND (IO.MULTIPLEX:EVENT-BASE)>
>   4: ((:INTERNAL ECHO-SERVER::%RUN-SERVER ECHO-SERVER:RUN-SERVER))
>       Locals:
>         ECHO-SERVER::TIMEOUT = 10
>         ECHO-SERVER::PORT = 7000
>         ECHO-SERVER::HOST = @0.0.0.0
>         CCL::*INTERRUPT-LEVEL* = 0
>         CCL::*INTERRUPT-LEVEL* = -1
>       Catch-tags:
>         NIL
>   5: (CCL::RUN-PROCESS-INITIAL-FORM #<PROCESS Anonymous(7) [Active] 
> #x3000417C327D> '(#<COMPILED-LEXICAL-CLOSURE (:INTERNAL
>                                    CCL::%PROCESS-RUN-FUNCTION) 
> #x3000417C310F>))
>       Locals:
>         CCL::INITIAL-FORM = (#<COMPILED-LEXICAL-CLOSURE (:INTERNAL 
> CCL::%PROCESS-RUN-FUNCTION) #x30004163AA0F>)
>         CCL::EXITED = NIL
>         #:G59697 = (PROCESS-RESET)
>         CCL::%HANDLERS% = NIL
>         #:ABORT = #<RESTART ABORT #x1632B5D>
>         #:ABORT-BREAK = #<RESTART ABORT-BREAK #x1632B0D>
>         CCL::%RESTARTS% = NIL
>       Catch-tags:
>         (:RESTART ABORT-BREAK)
>         NIL
>   6: ((:INTERNAL CCL::%PROCESS-PRESET-INTERNAL) #<PROCESS Anonymous(7) 
> [Active] #x3000417C327D> '(#<COMPILED-LEXICAL-CLOSURE (:INTERNAL
>                                    CCL::%PROCESS-RUN-FUNCTION) 
> #x3000417C310F>))
>       Locals:
>         CCL::INITIAL-FORM = (#<COMPILED-LEXICAL-CLOSURE (:INTERNAL 
> CCL::%PROCESS-RUN-FUNCTION) #x30004163AA0F>)
>         *CURRENT-PROCESS* = #<PROCESS Initial(0) [Active] #x300040432DAD>
>         CCL::SYMS = (CCL::*FREE-XPS* 
> CCL::*FREE-CIRCULARITY-HASH-TABLES* CCL::*VINSN-VARPARTS* 
> CCL::*VINSN-LABEL-FREELIST* CCL::*VINSN-FREELIST* 
> CCL::*LCELL-FREELIST* ...)
>         VALUES = (NIL NIL #<POOL  #x300041640DFD> #<POOL  
> #x300041640DCD> #<POOL  #x300041640D9D> #<POOL  #x300041640D6D> ...)
>       Catch-tags:
>         NIL
>   7: ((:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION))
>       Locals:
>         CCL::TCR = 144432
>         CCL::THREAD = #<LISP-THREAD Anonymous [tcr @ #x11A180] 
> #x30004163ADBD>
>         CCL::*CURRENT-LISP-THREAD* = #<LISP-THREAD Initial [tcr @ 
> #x1007A0] #x3000404020ED>
>         CCL::INITIAL-FUNCTION = (#<Compiled-function (:INTERNAL 
> CCL::%PROCESS-PRESET-INTERNAL) (Non-Global)  #x30004043065F> #<PROCESS 
> Anonymous(7) [Active] #x30004163AA9D> (#<COMPILED-LEXICAL-CLOSURE 
> (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #x30004163AA0F>))
>
> _______________________________________________
> iolib-devel mailing list
> iolib-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/iolib-devel




More information about the iolib-devel mailing list