set-pprint-dispatch on nonexistent type causes maximum error depth excession
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
(set-pprint-
Help! 11 nested errors. SB-KERNEL:
Backtrace for: #<SB-THREAD:THREAD "repl-thread" RUNNING {10045000B3}>
Help! 11 nested errors. SB-KERNEL:
Backtrace for: #<SB-THREAD:THREAD "repl-thread" RUNNING {10045000B3}>
Help! 11 nested errors. SB-KERNEL:
Backtrace for: #<SB-THREAD:THREAD "repl-thread" RUNNING {10045000B3}>
Help! 11 nested errors. SB-KERNEL:
Backtrace for: #<SB-THREAD:THREAD "Swank Sentinel" RUNNING {100352A1D3}>
This does not happen outside of SLIME, probably because of SLIME's printer settings.
What seems to be happening is that set-pprint-dispatch computes a function to run typep, and actually calling that function causes an error; so pretty printing anything at all after set-pprint-dispatch puts you in a pit of recursive errors. This results in difficult behavior like my capture attempts breaking just as badly (ignore-errors, handler-bind, binding *debugger-hook*, that sort of thing). |3b| deduced that if you just set *print-pretty* to NIL before the bad set-pprint-dispatch you get no error, but later pprinting of anything causes recursive death.
In any case, more desirable behavior would be pprint just giving a warning that a given type tester errored and continuing on its way. Probably debatable.
In 1.2.6 and 1.2.8 (says axion).
uname -a
Linux Syadavaktavyah 3.18.6-1-ARCH #1 SMP PREEMPT Sat Feb 7 08:44:05 CET 2015 x86_64 GNU/Linux
*features*
(:SWANK :QUICKLISP :SB-BSD-
:ASDF3 :ASDF2 :ASDF :OS-UNIX :NON-BASE-
:ALIEN-CALLBACKS :ANSI-CL :ASH-RIGHT-VOPS :C-STACK-
:COMMON-LISP :COMPARE-
:FLOAT-EQL-VOPS :GENCGC :IEEE-FLOATING-
:INTERLEAVED-
:MEMORY-
:OS-PROVIDES-
:OS-PROVIDES-POLL :OS-PROVIDES-PUTWC :OS-PROVIDES-
:PACKAGE-
:SB-EVAL :SB-FUTEX :SB-LDB :SB-PACKAGE-LOCKS :SB-SIMD-PACK
:SB-SOURCE-
:STACK-
:STACK-
:STACK-
:UNWIND-
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
FTR, i have an old github pull request and/or patch here on lp that attempts to print a backtrace in such cases (https:/ /github. com/sbcl/ sbcl/pull/ 3), and in general try to provide more information for debugging, because i had many headaches with such errors. this is what it prints into the inferior lisp buffer (looks like it's multiple threads printing in parallel):
Help! 11 nested errors. SB-KERNEL: *MAXIMUM- ERROR-DEPTH* exceeded. *MAXIMUM- ERROR-DEPTH* exceeded. THREAD: THREAD: THREAD "repl-thread"S ank SenRUNNINGtinel "1007840033} >RUNNING :FUNCALL- WITH-DEBUG- IO-SYNTAX) ) :FUNCALL- WITH-DEBUG- IO-SYNTAX) )1: (SB-IMPL: :CALL-WITH- SANE-IO- SYNTAX #<CLOSURE (LAMBDA NIL :IN SB-DEBUG: :FUNCALL- WITH-DEBUG- IO-SYNTAX) {1008EA2FEB}>) :CALL-WITH- SANE-IO- SY2: (SB-IMPL: :%WITH- STANDARD- IO-SYNTAX #<CLOSURE (LAMBDA NIL :IN SB-DEBUG: :FUNCALL- WITH-DEBUG- IO-SYNTAX) {1008EA2FBB}>) :%WITH- STANDARD- IO-SYNTAX #<CLOSURE (LAMBDA NIL :IN SB-DEBUG: :FUNCALL- WITH-DEBUG- IO-SYNTAX) {1008E42F3B}>) BEST-EFFORT T) BEST-EFFORT T) :TRY-TO- INVOKE- DEBUGGER :IN SB-IMPL: :ERROR- ERROR)) :TRY-TO- INVOKE- DEBUGGER :IN SB-IMPL: :ERROR- ERROR)) :ERROR- ERROR)) :ERROR- ERROR)) :%WITH- STANDARD- IO-SYNTAX #<CLOSURE (LAMBDA NIL :IN SB-IMPL: :ERROR- ERROR) {1008EA1B2B}>) :%WITH- STANDARD- IO-SYNTAX #<CLOSURE (LAMBDA NIL :IN SB-IMPL: :ERROR- ERROR) {1008E41B2B}>) :ERROR- ERROR "Help! " 11 " nested errors. " "SB-KERNEL: *MAXIMUM- ERROR-DEPTH* exceeded.") :ERROR- ERROR "Help! " 11 " nested errors. " "SB-KERNEL: *MAXIMUM- ERROR-DEPTH* exceeded.")8: (SB-IMPL: :INFINITE- ERROR-PROTECTOR ) :INFINITE- ERROR-PROTECTOR ) DEADLINE- TIMEOUT {1008EA1AA3}>) DEADLINE- TIMEOUT {1008E41AA3}>) SIGNAL- DEADLINE) SIGNAL- DEADLINE) CONDITION- WAIT)) [cleanup] CONDITION- WAIT)) [cleanup] INTERRUPTS- BODY-558 :IN SB-THREAD: CONDITION- WAIT))
Help! 11 nested errors. SB-KERNEL:
Backtrace for:
#<Backtrace for: #<SB-THREADSB-
100A3E21B3}>
0: ((LAMBDA NIL :IN SB-DEBUG:
0: ((LAMBDA NIL :IN SB-DEBUG:
1: (SB-IMPL:
2: (SB-IMPL:
3: (PRINT-BACKTRACE :STREAM #<SYNONYM-STREAM :SYMBOL SB-SYS:*TTY* {1008EA2D83}> :START 0 :FROM :DEBUGGER-FRAME :COUNT NIL :PRINT-THREAD T :PRINT-FRAME-SOURCE NIL :METHOD-FRAME-STYLE NIL :EMERGENCY-
3: (PRINT-BACKTRACE :STREAM #<SYNONYM-STREAM :SYMBOL SB-SYS:*TTY* {1008E42D03}> :START 0 :FROM :DEBUGGER-FRAME :COUNT NIL :PRINT-THREAD T :PRINT-FRAME-SOURCE NIL :METHOD-FRAME-STYLE NIL :EMERGENCY-
4: ((FLET SB-IMPL:
4: ((FLET SB-IMPL:
5: ((LAMBDA NIL :IN SB-IMPL:
5: ((LAMBDA NIL :IN SB-IMPL:
6: (SB-IMPL:
6: (SB-IMPL:
7: (SB-IMPL:
7: (SB-IMPL:
8: (SB-IMPL:
9: (ERROR #<SB-SYS:
9: (ERROR #<SB-SYS:
10: (SB-SYS:
10: (SB-SYS:
11: ((FLET #:CLEANUP-FUN-563 :IN SB-THREAD:
11: ((FLET #:CLEANUP-FUN-563 :IN SB-THREAD:
12: ((FLET #:WITHOUT-
13: (SB-THREAD: CONDITION- WAIT #<SB-THREAD: WAITQUEUE {1007848E53}> #<SB-THREAD:MUTEX owner: #<SB-THREAD:THREAD "repl-thread" RUNNING {1007840033}> {1007848E23}> :TIMEOUT NIL)13: (SB-THREAD: CONDITION- WAIT #<SB-THREAD: WAITQUEUE {100A3DF563}> #<SB-THREAD:MUTEX owner: #<SB-THREAD:THREAD "Swank Sentinel" RUNNING {100A3E21B3}> {100A3DF533}> :TIMEOUT NIL) :CONDITION- TIMED-WAIT) )14: ((FLET #:FORM-FUN-2872 :IN SWANK/SBCL: :CONDITION- TIMED-WAIT) ) SBCL::CONDITIO1 5: (SWANK/ SBCL::CONDITION -TIMED- WAIT #<...
14: ((FLET #:FORM-FUN-2872 :IN SWANK/SBCL:
15: (SWANK/