interrupt causing infinite loop after type error

Bug #625723 reported by Matt Kaufmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Confirmed
Medium
Unassigned

Bug Description

[As far as I know this is not the same as #404441. Otherwise,
my apologies.]

The following small example illustrates how interrupts can cause an
infinite loop that requires killing the session.

==============================

* (defun fib (n)
    (if (< n 2) 1 (+ (fib (- n 1)) (fib (- n 2)))))

FIB
* (trace fib)

(FIB)
* (fib 30)
  0: (FIB 30)
    1: (FIB 29)
....

<Interrupt with control-c>
0 ; to continue
<Interrupt with control-c>
0 ; to continue

; Then we get a type error followed by an infinite loop, as shown
; below.

0] 0

debugger invoked on a TYPE-ERROR in thread #<THREAD "initial thread" RUNNING
                                             {A9F5EE9}>:
  The value -22 is not of type (MOD 536870909).

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(SB-IMPL::WRITE-OUTPUT-FROM-QUEUE
 #<SB-SYS:FD-STREAM for "standard output" {A9F6661}>)
0]

debugger invoked on a TYPE-ERROR in thread #<THREAD "initial thread" RUNNING
                                             {A9F5EE9}>:
  The value NIL is not of type SB-IMPL::BUFFER.

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(SB-IMPL::WRITE-OUTPUT-FROM-QUEUE
 #<SB-SYS:FD-STREAM for "standard output" {A9F6661}>)
0[2]

==============================

Additional information, as requested by SBCL bug reporting guidelines:

lhug-8:~> sbcl-1.0.40 --version
SBCL 1.0.40
lhug-8:~> uname -a
Linux lhug-8.cs.utexas.edu 2.6.24.6.desktop11.28.75 #1 SMP Fri Aug 20 13:00:30 CDT 2010 i686 GNU/Linux
lhug-8:~> sbcl-1.0.40
This is SBCL 1.0.40, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* *features*

(:ANSI-CL :COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS
 :SB-UNICODE :SB-EVAL :SB-SOURCE-LOCATIONS :IEEE-FLOATING-POINT :X86 :UNIX :ELF
 :LINUX :SB-THREAD :LARGEFILE :GENCGC :STACK-GROWS-DOWNWARD-NOT-UPWARD
 :C-STACK-IS-CONTROL-STACK :COMPARE-AND-SWAP-VOPS :UNWIND-TO-FRAME-AND-CALL-VOP
 :RAW-INSTANCE-INIT-VOPS :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-VECTORS
 :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-FIXED-OBJECTS :ALIEN-CALLBACKS
 :CYCLE-COUNTER :INLINE-CONSTANTS :LINKAGE-TABLE :OS-PROVIDES-DLOPEN
 :OS-PROVIDES-PUTWC :OS-PROVIDES-SUSECONDS-T)
*

Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

Confirmed on un-threaded x86-64 Darwin.

Changed in sbcl:
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.