From: Gabor Melis
Subject: Guess the culprit: ILISP, CMUCL, AServe
Date: 
Message-ID: <fb0fb805.0308281405.67b47a2c@posting.google.com>
I'm trying to develop a small site with portable AServe, but the
debugging is getting on my nerves. Sometimes, too often really, when
doing and eval-defun-lisp (C-M-x) strange things happen:



;;; Evaluating defun render-add-wish-page
#<Bogus-Debug-Function "Foreign function call land"> has no 
debug-variable information.
0] q


Error in KERNEL::UNBOUND-SYMBOL-ERROR-HANDLER:  the variable ··@| is
unbound.

Restarts:
  0: [ABORT  ] Return to Top-Level.
  1: [DESTROY] Destroy the process

Debug  (type H for help)

(EVAL ··@|)
Source: (SYMBOL-VALUE EXP)
0] q
* ;;; Evaluating defun render-add-wish-page
Error in function ILISP:ILISP-FIND-PACKAGE:
   package Foreign function call land not found

Restarts:
  0: [ABORT  ] Return to Top-Level.
  1: [DESTROY] Destroy the process

Debug  (type H for help)

(ILISP:ILISP-FIND-PACKAGE "Foreign function call land" :ERROR-P T)
Source: 
; File: /usr/share/common-lisp/source/ilisp/cl-ilisp.lisp
(ERROR "package ~a not found" PACKAGE-NAME)
0] 


Similar things can happen when typing directly into the *cmulisp*
buffer.

I alternate between blaming ILISP and CMUCL's multiprocessing, but
couldn't solve this problem so far. All this on Debian/Sarge.

Cheers, Gabor

From: Matthew Danish
Subject: Re: Guess the culprit: ILISP, CMUCL, AServe
Date: 
Message-ID: <20030828233401.GM1454@mapcar.org>
It's ILISP.  I assure you.  I do plenty of work with ILISP and
Allegroserve, and ILISP does not play well at all when something prints
and messes up the prompt.

You can either:
1. Ensure a visible prompt at the end of the buffer all the time
2. 
(setf (net.aserve::vhost-log-stream
       (net.aserve::wserver-default-vhost *wserver*))
      *log-stream*)
(setf (net.aserve::vhost-error-stream
       (net.aserve::wserver-default-vhost *wserver*))
      *error-stream*)
(setf net.aserve::*enable-logging* nil)

*log-stream* and *error-stream* could go to a file, or to
(make-broadcast-stream) which is a bitbucket.

Part of the problem is that CMUCL uses SIMPLE-ERRORs instead of STREAM-ERRORs,
and also that PAserve doesn't know how to distinguish the various kinds of
stream errors in CMUCL.  You would probably see a lot less text that way.

-- 
; Matthew Danish <·······@andrew.cmu.edu>
; OpenPGP public key: C24B6010 on keyring.debian.org
; Signed or encrypted mail welcome.
; "There is no dark side of the moon really; matter of fact, it's all dark."
From: Gabor Melis
Subject: Re: Guess the culprit: ILISP, CMUCL, AServe
Date: 
Message-ID: <fb0fb805.0308290744.24105228@posting.google.com>
Matthew Danish <·······@andrew.cmu.edu> wrote in message news:<·····················@mapcar.org>...
> It's ILISP.  I assure you.  I do plenty of work with ILISP and
> Allegroserve, and ILISP does not play well at all when something prints
> and messes up the prompt.
> 
> You can either:
> 1. Ensure a visible prompt at the end of the buffer all the time

Manually? Or by hacking ILISP? I've been ensuring it manually which is
exactly what I'd like to avoid. This business of pressing 0's and q's
is tiresome.

> 2. 
> (setf (net.aserve::vhost-log-stream
>        (net.aserve::wserver-default-vhost *wserver*))
>       *log-stream*)
> (setf (net.aserve::vhost-error-stream
>        (net.aserve::wserver-default-vhost *wserver*))
>       *error-stream*)
> (setf net.aserve::*enable-logging* nil)
> 
> *log-stream* and *error-stream* could go to a file, or to
> (make-broadcast-stream) which is a bitbucket.

That did it. Except upon exiting the debugger (using
(net.aserve::debug-on :notrap)) I still get no prompt promptly. I have
to type something which brings up the debugger again, exit it and
finally there is my prompt.

Just for the record when using (net.aserve::debug-on :info :xmit) I
also need to set net.aserve::*debug-stream*. And due to a bug
acl-compat.excl:*initial-terminal-io*, too. This way logging can stay
enabled:

(setq ext:*gc-verbose* nil)
(setf net.aserve::*enable-logging* t)
(setf net.aserve::*debug-stream* *log-stream*)
(setf acl-compat.excl:*initial-terminal-io* *log-stream*)

I also thought about starting a lisp listener as in the CMUCL faq to
somehow separate it from the ilisp buffer ...

How do you deal with this on a daily basis? Do you not use :notrap?
From: Matthew Danish
Subject: Re: Guess the culprit: ILISP, CMUCL, AServe
Date: 
Message-ID: <20030830005903.GO1454@mapcar.org>
On Fri, Aug 29, 2003 at 08:44:57AM -0700, Gabor Melis wrote:
> Matthew Danish <·······@andrew.cmu.edu> wrote in message news:<·····················@mapcar.org>...
> > 1. Ensure a visible prompt at the end of the buffer all the time
> Manually? Or by hacking ILISP? I've been ensuring it manually which is
> exactly what I'd like to avoid. This business of pressing 0's and q's
> is tiresome.

Hehe, well, either way =)  I never got around to hacking ILISP, so I
finally went to (2) after getting sick of pressing 0's and q's.

Makes me appreciate ELI a lot more when I use it.

> How do you deal with this on a daily basis? Do you not use :notrap?

Generally, I only turn on :notrap when there is a bug I want to isolate,
and it is caused by a request.  It should definitely remain off for
production (and also, other people are using the system as I work on it,
so I can't have it down too much).

-- 
; Matthew Danish <·······@andrew.cmu.edu>
; OpenPGP public key: C24B6010 on keyring.debian.org
; Signed or encrypted mail welcome.
; "There is no dark side of the moon really; matter of fact, it's all dark."