[Openmcl-devel] Bug when writing to broken pipe?

Ron Garret ron at flownet.com
Wed Dec 3 21:55:20 UTC 2014


On Dec 3, 2014, at 12:35 PM, Gary Byers <gb at clozure.com> wrote:

> i haven't looked at this or even thought about it much yet, but my first reaction - which could be misguided - is to suggest running the saved image with the --batch option.  That should cause any unhandled error to abruptly terminate the application and may (I don't remember the details) cause *TERMINAL-IO* to be initialized differently, and I expect that the death spiral you're getting has to do with the fact that the initial thread is trying to FORCE-OUTPUT on the output side of *TERMINAL-IO*, which is ordinarily the same stream as *STANDARD-OUTPUT* …

It has nothing to do with any of that.  It’s simply a bug: the -b flag doesn’t work as advertised when entering a break loop:

[ron at mighty:~]➔ ~/devel/ccl/active/dx86cl64 -b -e '(error "foo")'
> Error of type SIMPLE-ERROR: foo
> While executing: CCL::CHEAP-EVAL, in process listener(1).
 (20E19A58) : 0 (PRINT-CALL-HISTORY :CONTEXT NIL :PROCESS NIL :ORIGIN NIL :DETAILED-P T :COUNT 1152921504606846975 :START-FRAME-NUMBER 0 :STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #x30200045397D> :PRINT-LEVEL 2 :PRINT-LENGTH 5 :SHOW-INTERNAL-FRAMES NIL :FORMAT :TRADITIONAL) 845
  (&KEY :CONTEXT :PROCESS :ORIGIN :DETAILED-P :COUNT :START-FRAME-NUMBER :STREAM :PRINT-LEVEL :PRINT-LENGTH :SHOW-INTERNAL-FRAMES :FORMAT)
   CCL::CONTEXT: NIL
   PROCESS: NIL
   CCL::ORIGIN: NIL
   CCL::DETAILED-P: T
   COUNT: 1152921504606846975
   CCL::START-FRAME-NUMBER: 0
   STREAM: #<SYNONYM-STREAM to *TERMINAL-IO* #x30200045397D>
   CCL::PRINT-LEVEL: 2
   CCL::PRINT-LENGTH: 5
   CCL::SHOW-INTERNAL-FRAMES: NIL
   FORMAT: :TRADITIONAL

  CCL::FRAME-NUMBER: 0
  *BACKTRACE-PRINT-LEVEL*: 2
  *BACKTRACE-PRINT-LENGTH*: 5
  *BACKTRACE-FORMAT*: :TRADITIONAL
  *STANDARD-OUTPUT*: #<SYNONYM-STREAM to *TERMINAL-IO* #x30200045397D>
  *PRINT-CIRCLE*: NIL

 (20E19BC0) : 1 (ABNORMAL-APPLICATION-EXIT) 245
  NIL

  #:G153982: (ERROR)
  CCL::%HANDLERS%: ((ERROR) (PROCESS-RESET))

 (20E19BF0) : 2 (BREAK-LOOP-HANDLE-ERROR #<SIMPLE-ERROR #x30200091001D> 68957073) 1589
  (CONDITION *TOP-ERROR-FRAME*)
   CONDITION: #<SIMPLE-ERROR #x30200091001D>
   *TOP-ERROR-FRAME*: 68957073

  CCL::BOGUS-GLOBALS: NIL
  CCL::NEWVALS: NIL
  CCL::OLDVALS: NIL

 (20E19C60) : 3 (%ERROR #<SIMPLE-ERROR #x30200091001D> NIL 68957073) 333
  (CONDITION CCL::ARGS CCL::ERROR-POINTER)
   CONDITION: #<SIMPLE-ERROR #x30200091001D>
   CCL::ARGS: NIL
   CCL::ERROR-POINTER: 68957073



 (20E19C88) : 4 (CALL-CHECK-REGS ERROR "foo") 221
  (CCL::FN &REST CCL::ARGS)
   CCL::FN: ERROR
   CCL::ARGS: ("foo")

  CCL::OLD-REGS: (("home:ccl-init" "home:\\.ccl-init") "(error \"foo\")" (#) 919906)

 (20E19CC0) : 5 (CHEAP-EVAL (ERROR "foo")) 101
  (CCL::FORM)
   CCL::FORM: (ERROR "foo")

  CCL::*NX-SOURCE-NOTE-MAP*: NIL

 (20E19CF8) : 6 (FUNCALL #'#<(:INTERNAL CCL::EVAL-STRING CCL::STARTUP-CCL)> "(error \"foo\")") 485
  (CCL::S)
   CCL::S: "(error \"foo\")"

  #:CONTINUE: #<RESTART CONTINUE #x20F3C46D>
  #:G153564: (#<RESTART CONTINUE #x20F3C46D>)
  CCL::%RESTARTS%: ((#<# # #x20F3C46D>) (#<# # #x20F3C58D>) (#<# # #x20F3C7DD> #<# # #x20F3C82D>))

 (20E19D40) : 7 (STARTUP-CCL ("home:ccl-init" "home:\\.ccl-init")) 1541
  (&OPTIONAL CCL::INIT-FILE)
   CCL::INIT-FILE: ("home:ccl-init" "home:\\.ccl-init")

  #:ABORT: #<RESTART ABORT #x20F3C58D>
  #:G153552: (#<RESTART ABORT #x20F3C58D>)
  CCL::%RESTARTS%: ((#<# # #x20F3C58D>) (#<# # #x20F3C7DD> #<# # #x20F3C82D>))
  #:G153557: ((:EVAL . "(error \"foo\")"))
  CCL::P: (:EVAL . "(error \"foo\")")
  CCL::PARAM: "(error \"foo\")"
  #:G153560: :EVAL

 (20E19DA8) : 8 (FUNCALL #'#<(:INTERNAL (TOPLEVEL-FUNCTION (CCL::LISP-DEVELOPMENT-SYSTEM T)))>) 61
  NIL

  CCL::F: CCL::LISTENER-FUNCTION
  CCL::INIT-FILE: ("home:ccl-init" "home:\\.ccl-init")

 (20E19DC8) : 9 (FUNCALL #'#<(:INTERNAL CCL::MAKE-MCL-LISTENER-PROCESS)>) 661
  NIL

  *TERMINAL-IO*: #<ECHOING-TWO-WAY-STREAM input #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (TTY/4) #x30200045448D>, output #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (TTY/4) #x3020004541DD> #x30200045D9ED>
  CCL::CLOSE-STREAMS: NIL
  CCL::CLEANUP-FUNCTION: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x302000452DAF>
  CCL::INITIAL-FUNCTION: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x302000452D5F>
  CCL::AUTO-FLUSH: T
  OUTPUT-STREAM: #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (TTY/4) #x3020004541DD>
  INPUT-STREAM: #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (TTY/4) #x30200045448D>
  CCL::ECHOING: T

 (20E19E60) : 10 (RUN-PROCESS-INITIAL-FORM #<TTY-LISTENER listener(1) [Active] #x3020004528AD> (#<COMPILED-LEXICAL-CLOSURE # #x3020004523DF>)) 669
  (PROCESS CCL::INITIAL-FORM)
   PROCESS: #<TTY-LISTENER listener(1) [Active] #x3020004528AD>
   CCL::INITIAL-FORM: (#<COMPILED-LEXICAL-CLOSURE # #x3020004523DF>)

  CCL::EXITED: NIL
  #:G155874: (PROCESS-RESET)
  CCL::%HANDLERS%: ((PROCESS-RESET))
  #:ABORT: #<RESTART ABORT #x20F3C82D>
  #:ABORT-BREAK: #<RESTART ABORT-BREAK #x20F3C7DD>
  #:G155875: (#<RESTART ABORT-BREAK #x20F3C7DD> #<RESTART ABORT #x20F3C82D>)
  CCL::%RESTARTS%: ((#<# # #x20F3C7DD> #<# # #x20F3C82D>))

 (20E19EF0) : 11 (FUNCALL #'#<(:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (PROCESS)))> #<TTY-LISTENER listener(1) [Active] #x3020004528AD> (#<COMPILED-LEXICAL-CLOSURE # #x3020004523DF>)) 573
  (PROCESS CCL::INITIAL-FORM)
   PROCESS: #<TTY-LISTENER listener(1) [Active] #x3020004528AD>
   CCL::INITIAL-FORM: (#<COMPILED-LEXICAL-CLOSURE # #x3020004523DF>)

  *CURRENT-PROCESS*: #<TTY-LISTENER listener(1) [Active] #x3020004528AD>
  #:G155860: (*PRINT-PPRINT-DISPATCH* CCL::*FREE-XPS* CCL::*FREE-CIRCULARITY-HASH-TABLES* CCL::*LOGICAL-BLOCK-XP* CCL::*FORMAT-TOP-LEVEL* ...)
  #:G155861: (#<PPRINT-DISPATCH-TABLE #x30200045E58D> NIL NIL NIL NIL ...)
  CCL::*INTERRUPT-LEVEL*: 0
  #:G155862: ("Active")
  #:G155863: "Reset"

 (20E19F98) : 12 (FUNCALL #'#<(:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 277
  NIL

  CCL::*CURRENT-LISP-THREAD*: #<LISP-THREAD listener [tcr @ #x704B10] #x3020004524BD>
  CCL::INITIAL-FUNCTION: (#<Compiled-function # (Non-Global)  #x3000004A4FBF> #<TTY-LISTENER listener(1) [Active] #x3020004528AD> (#))
  CCL::TCR: 919906
  CCL::THREAD: #<LISP-THREAD listener [tcr @ #x704B10] #x3020004524BD>

Version 1.11-dev-r16306M-trunk  (DarwinX8664)
[


More information about the Openmcl-devel mailing list