From: Yang, Chul-Woong
Subject: How to debug multithreaded SBCL application?
Date: 
Message-ID: <iiYYb.112359$S3.1067380@news.bora.net>
Hi.

I've posted this question some weeks ago, but got no response.
So.. I put this question different way.


* (sb-thread:make-thread #'(lambda () (car 'a)))

5546
*
debugger invoked on a TYPE-ERROR in thread 5546:
  The value A is not of type LIST.


When I ran above commands, foreground job is remained on
parent thread. So I couldn't do anything to inspect/correct error.

Does interactive debugger runs on thread 5546?
If so, how can I switch to debug-session on thread 5546?
(if possible)

At this time, apropos and google doesn't help me. :-(
Any suggestion welcomes. TIA

Yang, Chul-Woong
······@aratech.co.kr

From: Christophe Rhodes
Subject: Re: How to debug multithreaded SBCL application?
Date: 
Message-ID: <sqk72jh0cw.fsf@lambda.dyndns.org>
"Yang, Chul-Woong" <······@aratech.co.kr> writes:

> * (sb-thread:make-thread #'(lambda () (car 'a)))
>
> 5546
> *
> debugger invoked on a TYPE-ERROR in thread 5546:
>   The value A is not of type LIST.
>
> When I ran above commands, foreground job is remained on
> parent thread. So I couldn't do anything to inspect/correct error.
>
> Does interactive debugger runs on thread 5546?
> If so, how can I switch to debug-session on thread 5546?
> (if possible)

If you're running from the terminal, I believe you need to run
(sb-thread:release-foreground), which should give you a debugger
prompt in the other thread.  However, this isn't the ideal mode of
operation -- there exist a port of LEP, and I believe SLIME has some
facility for opening a new debugger window on an error in a thread,
too.

Christophe
-- 
http://www-jcsu.jesus.cam.ac.uk/~csr21/       +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%")    (pprint #36rJesusCollegeCambridge)
From: Daniel Barlow
Subject: Re: How to debug multithreaded SBCL application?
Date: 
Message-ID: <87llmyhe1y.fsf@noetbook.telent.net>
Christophe Rhodes <·····@cam.ac.uk> writes:

> If you're running from the terminal, I believe you need to run
> (sb-thread:release-foreground), which should give you a debugger
[...]

Note further (to the OP, and anyone else reading): you probably get
better answers on the sbcl mailing lists than by asking on Usenet.

Oh, and if you're using threads for anything strenuous, an upgrade to
Linux kernel 2.6 (or a vendor kernel that supports NPTL) is strongly
recommended.  


-dan

-- 
"please make sure that the person is your friend before you confirm"