From: Luc Pauwels
Subject: mp:with-timeout in ACL4.3
Date: 
Message-ID: <391005D6.DEDA369A@lant.be.NOSPAM>
Hi,

I recently ran into a very nasty bug in Allegro Common Lisp 4.3.  When
using nested mp:with-timeout macros, the Lisp environment crashes when
the outer call to mp:with-timeout times out before the inner call to
mp:with-timeout.  For example, this function

  (defun timeout-bug ()
    (mp:with-timeout (5 (print 'outer-timeout))
      (print 'outer-start)
      (mp:with-timeout (10 (print 'inner-timeout))
        (print 'inner-start)
        (sleep 20)
        (print 'inner-end))
      (print 'outer-end)))

results in the following error message:

  Error: Attempt to throw to the non-existent tag
         MULTIPROCESSING::WITH-TIMEOUT-INTERNAL
    [condition type: CONTROL-ERROR]

        ...stuff deleted...

  The scheduler is attempting to recover from
  Non-structure argument NIL passed to structure-ref.

  The scheduler is attempting to recover from
  Non-structure argument NIL passed to structure-ref.
  Error: Non-structure argument NIL passed to .inv-structure-ref
  <scheduler>

The solution proposed by Franz, Inc. was to upgrade to Allegro
Common Lisp 5.0.1.  Unfortunately, this is not an option for me
at the moment.  Thus far, my workaround has been to allow only
one level of nesting.  As a consequence, only the top-level
timeout-forms will be evaluated in case of a timeout (which can
produce less-specific or even wrong results).

Any suggestions for a better ACL4.3 workaround or fix are
greatly appreciated...

Luc.

PS: please reply to me directly, I rarely have the time to read
    newsgroups :-(