[slime-devel] Crash when invoking restarts in break loop view

Paolo Amoroso amoroso at mclink.it
Tue Jan 6 14:22:01 UTC 2004


After updating SLIME half a dozen hours ago from the latest CVS head
sources, and I have found a reproducible way of crashing it with CMUCL
18e and GNU Emacs 20.7.2 under Debian Woody. Do the following:

1) Create a file such as the following, which contains a Lisp form
   that generates an error:

(defun toward-infinity ()
  (/ 1 0))

(toward-infinity)

2) Evaluate each form with `C-x C-e'

3) When SLIME's break loop and backtrace view appears, press `q' or
   invoke another restart with the corresponding numer. The following
   message is displayed:

------------------------------------------------------------------------
You have encountered a bug in SLIME.

The communication state machine received an event that was illegal for
its current state, which means that the communication between Emacs
and Lisp has lost synchronization. The connection to Lisp has
therefore been closed.

You can open a fresh connection with `M-x slime'.

Please report this problem to your friendly neighbourhood SLIME
hacker, or the mailing list at slime-devel at common-lisp.net. Please
include in your report:

  A description of what you were doing when the problem occured,
  the version of SLIME, Emacs, and Lisp that you are using,
  the Lisp backtrace, if one was printed,
  and the information printed below:

The event was:
(:aborted)


The state stack was:
(slime-debugging-state slime-evaluating-state slime-idle-state)


The content of the *slime-events* buffer:
(:emacs-evaluate "(swank:getpid)" nil
		 (:catch-tag slime-result-80998))
(activate) ; slime-evaluating-state
(:%apply "slime-open-stream-to-lisp"
	 (32806))
(:new-features
 ("PCL-STRUCTURES" "PORTABLE-COMMONLOOPS" "PCL" "PYTHON" "PENTIUM" "I486" "LINKAGE-TABLE" "MP" "GENCGC" "GLIBC2.1" "CMU18" "CMU18E" "RELATIVE-PACKAGE-NAMES" "CONSERVATIVE-FLOAT-TYPE" "RANDOM-MT19937" "HASH-NEW" "X86" "LINUX" "GLIBC2" "UNIX" "COMMON" "CMU" "NEW-COMPILER" "COMMON-LISP" "ANSI-CL" "IEEE-FLOATING-POINT"))
(:ok 574)
(activate) ; slime-idle-state
(:emacs-evaluate "(swank:interactive-eval \"(defun toward-infinity ()\n  (/ 1 0))\n\")" nil
		 (:function
		  (lambda
		    (&rest --cl-rest--)
		    (apply
		     '(lambda
			(G81043 value)
			(save-current-buffer
			  (set-buffer
			   (symbol-value G81043))
			  (slime-show-evaluation-result value)))
		     '--buffer-- --cl-rest--))))
(activate) ; slime-evaluating-state
(:ok "TOWARD-INFINITY")
(activate) ; slime-idle-state
(:emacs-evaluate "(swank:interactive-eval \"(toward-infinity)\")" nil
		 (:function
		  (lambda
		    (&rest --cl-rest--)
		    (apply
		     '(lambda
			(G81081 value)
			(save-current-buffer
			  (set-buffer
			   (symbol-value G81081))
			  (slime-show-evaluation-result value)))
		     '--buffer-- --cl-rest--))))
(activate) ; slime-evaluating-state
(:debug 1
	("Arithmetic error DIVISION-BY-ZERO signalled.\nOperation was KERNEL::DIVISION, operands (1 0)." "   [Condition of type DIVISION-BY-ZERO]")
	(("ABORT" "Return to Slime toplevel.")
	 ("ABORT" "Return to Top-Level."))
	((0 "(KERNEL::INTEGER-/-INTEGER 1 0)")
	 (1 "(/ 1 0)")
	 (2 "(SWANK:INTERACTIVE-EVAL \"(toward-infinity)\")")
	 (3 "(SWANK:INTERACTIVE-EVAL 1 \"(toward-infinity)\")[:EXTERNAL]")
	 (4 "(SWANK:EVAL-STRING \"(swank:interactive-eval \\\"(toward-infinity)\\\")\" NIL)")
	 (5 "(SWANK:EVAL-STRING 2 \"(swank:interactive-eval \\\"(toward-infinity)\\\")\" NIL)[:EXTERNAL]")
	 (6 "(SWANK::CALL-WITH-SLIME-STREAMS #<SWANK::SLIME-INPUT-STREAM {484CB23D}> #<Stream for descriptor 8> #<Two-Way Stream, Input = #<SWANK::SLIME-INPUT-STREAM {484CB23D}>, Output = #<Stream for descriptor 8>> #<Function FUNCALL {10060F79}> ...)")
	 (7 "(SWANK::CALL-WITH-SLIME-STREAMS 5 #<SWANK::SLIME-INPUT-STREAM {484CB23D}> #<Stream for descriptor 8> #<Two-Way Stream, Input = #<SWANK::SLIME-INPUT-STREAM {484CB23D}>, Output = #<Stream for descriptor 8>> ...)[:EXTERNAL]")
	 (8 "(SWANK::READ-FROM-EMACS)")
	 (9 "(SWANK::READ-FROM-EMACS 0)[:EXTERNAL]")
	 (10 "(SWANK::SERVE-ONE-REQUEST #<Stream for descriptor 6> #<Stream for descriptor 8> #<SWANK::SLIME-INPUT-STREAM {484CB23D}> #<Two-Way Stream, Input = #<SWANK::SLIME-INPUT-STREAM {484CB23D}>, Output = #<Stream for descriptor 8>>)")
	 (11 "(SWANK::SERVE-ONE-REQUEST 4 #<Stream for descriptor 6> #<Stream for descriptor 8> #<SWANK::SLIME-INPUT-STREAM {484CB23D}> ...)[:EXTERNAL]")
	 (12 "(\"DEFUN REQUEST-LOOP\" #<unused-arg>)")
	 (13 "(\"DEFUN REQUEST-LOOP\" 1 #<unused-arg>)[:EXTERNAL]")
	 (14 "(COMMON-LISP::SUB-SERVE-EVENT 1 0)")
	 (15 "(SYSTEM:WAIT-UNTIL-FD-USABLE 0 :INPUT NIL)")
	 (16 "(COMMON-LISP::DO-INPUT #<Stream for Standard Input>)")
	 (17 "(COMMON-LISP::INPUT-CHARACTER #<Stream for Standard Input> NIL (COMMON-LISP::*EOF*))")
	 (18 "(COMMON-LISP::SYNONYM-IN #<Synonym Stream to SYSTEM:*STDIN*> NIL (COMMON-LISP::*EOF*))")
	 (19 "(COMMON-LISP::TWO-WAY-IN #<Two-Way Stream, Input = #<Synonym Stream to SYSTEM:*STDIN*>, Output = #<Synonym Stream to SYSTEM:*STDOUT*>> NIL (COMMON-LISP::*EOF*))")))
(activate) ; slime-debugging-state
(:emacs-evaluate "(swank:throw-to-toplevel)" nil
		 (:function
		  (lambda
		    (_))))
(activate) ; slime-evaluating-state
(:aborted)
(activate) ; slime-debugging-state
(:debug-return 1)
(:aborted)


The content of the *cl-connection* buffer:

------------------------------------------------------------------------

The *inferior-lisp* buffer contains:

* ;; Swank started at port: 32804.

#<Handler for INPUT on descriptor 5: #<Closure Over Function "DEFUN ACCEPT-LOOP"
                                       {484C2D71}>>
* ;; Connection to Emacs lost.
;; [End-of-File on #<Stream for descriptor 6>]

After the error message is displayed, SLIME becomes unusable even
after starting a fresh session.

Incidentally, the error message has a typo:

  A description of what you were doing when the problem occured,
                                                        ^^^^^^^


Paolo
-- 
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film




More information about the slime-devel mailing list