[Openmcl-devel] Getting a stuck process' stack trace

Gary Byers gb at clozure.com
Wed May 19 01:58:54 PDT 2004



On Wed, 19 May 2004, Sven Van Caekenberghe wrote:

> I need some rather urgent help ;-)
>
> I have a long running server in OpenMCL 0.13.6, where a batch job
> process doing a large bulk mail got stuck (terminal input wait). I can
> only access this server process using my own remote-repl code but when
> I have such a listener, I cannot yield terminal control to one of the
> stuck processes:
>
> ? (:y 24)
> ;; only the initial procss can yield control of the terminal.
>
> I understand the error: the listener is just another process, the
> initial process entered a sleep loop many, many days ago when the
> server booted. That in itself is not my main problem, however I do
> (desperately) want to find out what went wrong in that process, in
> other words, could I get a stack trace and/or condition report for that
> process; I already tried describing the process and the stack group but
> that was probably a bit naive...

If *P* is the lisp process that's hung, you can get your hands on the
underlying stack group by calling:

? (CCL:PROCESS-STACK-GROUP *P*)

If *SG* is the stack-group of the wedged process, you should be able to
get a backtrace by doing:

? (CCL:PRINT-CALL-HISTORY :STACK-GROUP *sg*
                          :START-FRAME (CCL::%GET-FRAME-PTR *SG*))

PRINT-CALL-HISTORY writes its output to *DEBUG-IO*, which is ordinarily
a SYNONYM-STREAM to *TERMINAL-IO*.  If the listener you're telneted into
has *TERMINAL-IO* set up appropriately, you should see the backtrace
in that listener.

>
> Help greatly appreciated,
>
> Sven
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list