Paste number 14092: causes SIGPIPE on SBCL 0.9.6 + mcclim

Index of paste annotations: 1 | 2 | 3

Paste number 14092: causes SIGPIPE on SBCL 0.9.6 + mcclim
Pasted by: therp
When:8 years, 10 months ago
Share:Tweet this! | http://paste.lisp.org/+AVG
Channel:#lisp
Paste contents:
Raw Source | XML | Display As
(define-application-frame crasher ()
  ()
  (:pane
   (make-pane 'basic-pane :hs 200 :hs+ +fill+ :vs 50)))

Annotations for this paste:

Annotation number 1: error
Pasted by: therp
When:8 years, 10 months ago
Share:Tweet this! | http://paste.lisp.org/+AVG/1
Paste contents:
Raw Source | Display As
SIGPIPE at #XFFFFE410
   [Condition of type SIMPLE-ERROR]

Restarts:
  0: [ABORT-REQUEST] Abort handling SLIME request.
  1: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: ((FLET #:G181))
  1: (SB-UNIX::SIGPIPE-HANDLER #<unavailable argument> #<unavailable argument> #.(SB-SYS:INT-SAP #X4048FD80))
  2: (SB-SYS:INVOKE-INTERRUPTION #<CLOSURE (LAMBDA NIL) {B6C3C95}>)
  3: ("foreign function: call_into_lisp")
  4: ("foreign function: funcall3")
  5: ("foreign function: interrupt_handle_now")
  6: ("foreign function: #x8051BF9")
  7: ("bogus stack frame")
  8: (SB-IMPL::FROB-OUTPUT #<SB-SYS:FD-STREAM for "a constant string" {B168679}> #.(SB-SYS:INT-SAP #X406E4000) 0 580 T)
  9: (SB-IMPL::FLUSH-OUTPUT-BUFFER #<SB-SYS:FD-STREAM for "a constant string" {B168679}>)
 10: (FORCE-OUTPUT #<SB-SYS:FD-STREAM for "a constant string" {B168679}>)
 11: (XLIB::BUFFER-FORCE-OUTPUT #<XLIB:DISPLAY :0 (Gentoo (The X.Org Foundation 6.8.2, revision r4-0.1.10.2) R60802000)>)
 12: (XLIB:ALLOC-COLOR #<XLIB:COLORMAP TRUE-COLOR :0 32> #<XLIB:COLOR 0.8392 0.8392 0.8392>)
 13: (CLIM-CLX::REALIZE-MIRROR-AUX #<CLIM-CLX::CLX-PORT :HOST "" :DISPLAY-ID 0 {B2D3E49}> #<CLIM-INTERNALS::TOP-LEVEL-SHEET-PANE CLIM-INTERNALS::TOP-LEVEL-SHEET {B6BD541}> :WIDTH 200 :HEIGHT 204 :X 0 :Y 0 :BORDER-WIDTH #<unused argument> :BORDER 0 :OVERRIDE-REDIRECT :OFF :MAP NIL :BACKING-STORE :NOT-USEFUL :EVENT-MASK NIL)
 14: ((SB-PCL::FAST-METHOD REALIZE-MIRROR (CLIM-CLX::CLX-PORT CLIM-INTERNALS::TOP-LEVEL-SHEET-PANE)) #<unavailable argument> #<unavailable argument> #<CLIM-CLX::CLX-PORT :HOST "" :DISPLAY-ID 0 {B2D3E49}> #<CLIM-INTERNALS::TOP-LEVEL-SHEET-PANE CLIM-INTERNALS::TOP-LEVEL-SHEET {B6BD541}>)
 15: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0.)) #<unavailable argument> #<unavailable argument> #<CLIM-INTERNALS::TOP-LEVEL-SHEET-PANE CLIM-INTERNALS::TOP-LEVEL-SHEET {B6BD541}>)
 16: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1.)) #<unavailable argument> #<unavailable argument> #<CLIM-CLX::CLX-GRAFT {9909E69}> #<CLIM-INTERNALS::TOP-LEVEL-SHEET-PANE CLIM-INTERNALS::TOP-LEVEL-SHEET {B6BD541}>)
 17: ((SB-PCL::FAST-METHOD GENERATE-PANES :AFTER (T APPLICATION-FRAME)) #<unavailable argument> #<unavailable argument> #<unavailable argument> #<CRASHER {B6BBFE1}>)
 18: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1.)) #<unavailable argument> #<unavailable argument> #<CLIM-CLX::CLX-FRAME-MANAGER {9760349}> #<CRASHER {B6BBFE1}>)
 19: ((SB-PCL::FAST-METHOD ADOPT-FRAME (FRAME-MANAGER APPLICATION-FRAME)) (#(NIL 1 15 12) . #()) #<unavailable argument> #<CLIM-CLX::CLX-FRAME-MANAGER {9760349}> #<CRASHER {B6BBFE1}>)
 20: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1.)) #<unavailable argument> #<unavailable argument> #<CLIM-CLX::CLX-FRAME-MANAGER {9760349}> #<CRASHER {B6BBFE1}>)
 21: ((SB-PCL::FAST-METHOD RUN-FRAME-TOP-LEVEL :AROUND (APPLICATION-FRAME)) #<unavailable argument> #S(SB-PCL::FAST-METHOD-CALL :FUNCTION #<FUNCTION (SB-PCL::FAST-METHOD RUN-FRAME-TOP-LEVEL #)> :PV-CELL NIL :NEXT-METHOD-CALL NIL :ARG-INFO (1 . T)) #<CRASHER {B6BBFE1}> NIL)
 22: (SB-INT:EVAL-IN-LEXENV (RUN-FRAME-TOP-LEVEL (MAKE-APPLICATION-FRAME (QUOTE CRASHER))) #<NULL-LEXENV>)
 23: (SWANK::EVAL-REGION "(run-frame-top-level (make-application-frame 'crasher))

Annotation number 2: possible fix for (clim:destroy-port (car climi::*all-ports*))
Pasted by: therp
When:8 years, 10 months ago
Share:Tweet this! | http://paste.lisp.org/+AVG/2
Paste contents:
Raw Source | Display As
Index: Backends/CLX/port.lisp
===================================================================
RCS file: /project/mcclim/cvsroot/mcclim/Backends/CLX/port.lisp,v
retrieving revision 1.112
diff -u -r1.112 port.lisp
--- Backends/CLX/port.lisp      16 Jun 2005 09:27:49 -0000      1.112
+++ Backends/CLX/port.lisp      29 Nov 2005 09:57:25 -0000
@@ -536,7 +536,7 @@
   (xlib:unmap-window (sheet-direct-mirror mirror)) )
 
 (defmethod destroy-port :before ((port clx-port))
-  (xlib:close-display (clx-port-display port)))
+  (xlib:close-display (clx-port-display port) :abort t))
 
 (defmethod port-motion-hints ((port clx-port) (sheet mirrored-sheet-mixin))
   (let ((event-mask (xlib:window-event-mask (sheet-direct-mirror sheet))))

Annotation number 3: better fix
Pasted by: therp
When:8 years, 10 months ago
Share:Tweet this! | http://paste.lisp.org/+AVG/3
Paste contents:
Raw Source | Display As
With the following fix and signals disables for SIGPIPE, it's possible to recover from an xkilled clim port with (clim:destroy-port (car climi::*all-ports*)). 

(sb-sys:ignore-interrupt sb-unix:sigpipe)

Index: port.lisp
===================================================================
RCS file: /project/mcclim/cvsroot/mcclim/Backends/CLX/port.lisp,v
retrieving revision 1.114
diff -u -r1.114 port.lisp
--- port.lisp   28 Nov 2005 14:21:45 -0000      1.114
+++ port.lisp   30 Nov 2005 08:01:31 -0000
@@ -536,7 +536,8 @@
   (xlib:unmap-window (sheet-direct-mirror mirror)) )
 
 (defmethod destroy-port :before ((port clx-port))
-  (xlib:close-display (clx-port-display port)))
+  (handler-case (xlib:close-display (clx-port-display port))
+    (stream-error) () (xlib:close-display (clx-port-display port) :abort t)))
 
 (defmethod port-motion-hints ((port clx-port) (sheet mirrored-sheet-mixin))
   (let ((event-mask (xlib:window-event-mask (sheet-direct-mirror sheet))))

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.