[Openmcl-devel] swank-backend:map-backtrace

Marco Baringer mb at bese.it
Thu Jul 8 15:58:42 UTC 2004


this (see below) happens "fairly" regularly when debugging multi
threaded apps with slime. the fact that i've _never_ seen it happen
unless i've got more than a few threads open and the fact that it
happens more or less randomly mokes me think it's a race condition
somewhere, but i can't figure out where.

Unhandled exception 11 at 0x02002c14, context->regs at #xf0268498
Read operation to unmapped address 0xf039bba4
 While executing: #<Function %CFP-LFUN #x0600177e>
? for help
[4478] OpenMCL kernel debugger: B


(#xF0268980) #x064DC000 : #<Function MAP-BACKTRACE #x064dc106> + 196
(#xF0268990) #x064DB454 : #<Method-Function COMPUTE-BACKTRACE (T T) #x064db476> + 152
(#xF02689A0) #x064F25A8 : #<Function BACKTRACE #x064f26b6> + 60
(#xF02689B0) #x06550018 : #<Anonymous Function #x0655017e> + 60
(#xF02689C0) #x00004D7C : (subprimitive _ret1valn)
(#xF02689D0) #x064DC2F0 : #<Method-Function CALL-WITH-DEBUGGING-ENVIRONMENT (T) #x064dc306> + 52
(#xF02689E0) #x00004D7C : (subprimitive _ret1valn)
(#xF02689F0) #x06550200 : #<Function COLLECT-BACKTRACE #x06550216> + 76
(#xF0268A00) #x0654F3E4 : #<Method-Function HANDLE-REQUEST-ERROR (ERROR T T) #x0654f70e> + 208
(#xF0268A10) #x00004D7C : (subprimitive _ret1valn)
(#xF0268A20) #x020BB99C : #<Function %CALL-NEXT-METHOD #x0608dfae> + 504
(#xF0268A30) #x020BB848 : #<Function %CALL-NEXT-METHOD #x0608dfae> + 164
(#xF0268A40) #x00004D7C : (subprimitive _ret1valn)
(#xF0268A50) #x0654FD14 : #<Method-Function HANDLE-REQUEST-ERROR :AROUND (ERROR T T) #x0654fd1e> + 128
(#xF0268A60) #x00004D7C : (subprimitive _ret1valn)
(#xF0268A70) #x020BC4E4 : #<Function %%STANDARD-COMBINED-METHOD-DCODE #x0608e88e> + 368
(#xF0268A80) #x00006FA0 : (subprimitive _popj)
(#xF0268A90) #x02107A60 : #<Function SIGNAL #x0610cfb6> + 532
(#xF0268AA0) #x0213A07C : #<Function %ERROR #x06162bee> + 72
(#xF0268AB0) #x020C9354 : #<Method-Function NO-APPLICABLE-METHOD (T) #x060a3936> + 48
(#xF0268AC0) #x00006FA0 : (subprimitive _popj)
(#xF0268AD0) #x066CAB90 : #<Method-Function RENDER-ON (RESPONSE BOOKSHELF-VIEWER) #x066cae7e> + 92
(#xF0268AE0) #x00004D7C : (subprimitive _ret1valn)
(#xF0268AF0) #x020BB99C : #<Function %CALL-NEXT-METHOD #x0608dfae> + 504
(#xF0268B00) #x020BB848 : #<Function %CALL-NEXT-METHOD #x0608dfae> + 164
(#xF0268B10) #x06557938 : #<Method-Function RENDER-ON :AROUND (RESPONSE STANDARD-COMPONENT) #x06557b16> + 252
(#xF0268B20) #x06557AD8 : #<Method-Function RENDER-ON :AROUND (RESPONSE STANDARD-COMPONENT) #x06557b16> + 668
(#xF0268B30) #x00004D7C : (subprimitive _ret1valn)
(#xF0268B40) #x020BC4E4 : #<Function %%STANDARD-COMBINED-METHOD-DCODE #x0608e88e> + 368
(#xF0268B50) #x00004D7C : (subprimitive _ret1valn)
(#xF0268B60) #x00004CE0 : (subprimitive _nvalret)
(#xF0268B70) #x00004D7C : (subprimitive _ret1valn)
(#xF0268B80) #x0655E908 : #<Function SERVICE-ACTION #x0655e98e> + 428
(#xF0268B90) #x0655E934 : #<Function SERVICE-ACTION #x0655e98e> + 472
(#xF0268BA0) #x00004D7C : (subprimitive _ret1valn)
(#xF0268BB0) #x020BBC64 : #<Function %%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE #x0608e21e> + 616
(#xF0268BC0) #x00004D7C : (subprimitive _ret1valn)
(#xF0268BD0) #x020BC408 : #<Function %%STANDARD-COMBINED-METHOD-DCODE #x0608e88e> + 148
(#xF0268BE0) #x00004D7C : (subprimitive _ret1valn)
(#xF0268BF0) #x00004CE0 : (subprimitive _nvalret)
(#xF0268C00) #x00004D7C : (subprimitive _ret1valn)
(#xF0268C10) #x020BBC64 : #<Function %%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE #x0608e21e> + 616
(#xF0268C20) #x00004D7C : (subprimitive _ret1valn)
(#xF0268C30) #x020BC408 : #<Function %%STANDARD-COMBINED-METHOD-DCODE #x0608e88e> + 148
(#xF0268C40) #x00004D7C : (subprimitive _ret1valn)
(#xF0268C50) #x00004CE0 : (subprimitive _nvalret)
(#xF0268C60) #x00004D7C : (subprimitive _ret1valn)
(#xF0268C70) #x020BC408 : #<Function %%STANDARD-COMBINED-METHOD-DCODE #x0608e88e> + 148
(#xF0268C80) #x00004D7C : (subprimitive _ret1valn)
(#xF0268C90) #x00004CE0 : (subprimitive _nvalret)
(#xF0268CA0) #x00004D7C : (subprimitive _ret1valn)
(#xF0268CB0) #x06553024 : #<Method-Function HANDLE-REQUEST (STANDARD-SERVER REQUEST RESPONSE) #x0655314e> + 1152
(#xF0268CC0) #x06553050 : #<Method-Function HANDLE-REQUEST (STANDARD-SERVER REQUEST RESPONSE) #x0655314e> + 1196
(#xF0268CD0) #x0655312C : #<Method-Function HANDLE-REQUEST (STANDARD-SERVER REQUEST RESPONSE) #x0655314e> + 1416
(#xF0268CE0) #x06552CC4 : #<Method-Function HANDLE-REQUEST (STANDARD-SERVER REQUEST RESPONSE) #x0655314e> + 288
(#xF0268CF0) #x065A0674 : #<Anonymous Function #x065a068e> + 112
(#xF0268D00) #x020FD044 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 400
(#xF0268D10) #x020FD080 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 460
(#xF0268D20) #x020FD194 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 736
(#xF0268D30) #x00004D7C : (subprimitive _ret1valn)
(#xF0268D40) #x020FD314 : #<Anonymous Function #x06101d3e> + 152
(#xF0268D50) #x020FD2FC : #<Anonymous Function #x06101d3e> + 128
(#xF0268D60) #x020F5450 : #<Anonymous Function #x060f491e> + 172
(#xF0268D70) #x0000881C : (subprimitive toplevel_loop)
(#xF0268D80) #x00008828 : (subprimitive toplevel_loop)
(#xf0268d90) #x000088F4 : _start_lisp + 180
(#xf0268e50) #x00012CAC : _lisp_thread_entry + 152
(#xf0268eb0) #x90020C28 : __pthread_body + 40
(#xf0268f00) #x00000000 : (null) + 0


cstack area #x00093d90


(#xF0734BD0) #x020E587C : #<Function %WAIT-ON-SEMAPHORE-PTR #x060e2a7e> + 120
(#xF0734BE0) #x020FC8B4 : #<Function PROCESS-WAIT #x0610123e> + 216
(#xF0734BF0) #x020FC84C : #<Function PROCESS-WAIT #x0610123e> + 112
(#xF0734C00) #x064E278C : #<Method-Function RECEIVE () #x064e28ae> + 136
(#xF0734C10) #x064F8BDC : #<Function READ-FROM-EMACS #x064f8bf6> + 80
(#xF0734C20) #x00004D7C : (subprimitive _ret1valn)
(#xF0734C30) #x064E897C : #<Anonymous Function #x064e89a6> + 240
(#xF0734C40) #x064E8984 : #<Anonymous Function #x064e89a6> + 248
(#xF0734C50) #x00004D7C : (subprimitive _ret1valn)
(#xF0734C60) #x064F8F88 : #<Function CALL-WITH-REDIRECTED-IO #x064f8fae> + 252
(#xF0734C70) #x00004D7C : (subprimitive _ret1valn)
(#xF0734C80) #x064E8AB0 : #<Function HANDLE-REQUEST #x064e8bde> + 140
(#xF0734C90) #x064E8BCC : #<Function HANDLE-REQUEST #x064e8bde> + 424
(#xF0734CA0) #x064E5BD4 : #<Anonymous Function #x064e5bee> + 80
(#xF0734CB0) #x00004D7C : (subprimitive _ret1valn)
(#xF0734CC0) #x064F8F88 : #<Function CALL-WITH-REDIRECTED-IO #x064f8fae> + 252
(#xF0734CD0) #x00004D7C : (subprimitive _ret1valn)
(#xF0734CE0) #x064E5CA4 : #<Function REPL-LOOP #x064e5d1e> + 152
(#xF0734CF0) #x064E5D0C : #<Function REPL-LOOP #x064e5d1e> + 256
(#xF0734D00) #x020FD044 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 400
(#xF0734D10) #x020FD080 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 460
(#xF0734D20) #x020FD194 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 736
(#xF0734D30) #x00004D7C : (subprimitive _ret1valn)
(#xF0734D40) #x020FD314 : #<Anonymous Function #x06101d3e> + 152
(#xF0734D50) #x020FD2FC : #<Anonymous Function #x06101d3e> + 128
(#xF0734D60) #x020F5450 : #<Anonymous Function #x060f491e> + 172
(#xF0734D70) #x0000881C : (subprimitive toplevel_loop)
(#xF0734D80) #x00008828 : (subprimitive toplevel_loop)
(#xf0734d90) #x000088F4 : _start_lisp + 180
(#xf0734e50) #x00012CAC : _lisp_thread_entry + 152
(#xf0734eb0) #x90020C28 : __pthread_body + 40
(#xf0734f00) #x00000000 : (null) + 0


cstack area #x00091850


(#xF0601C30) #x020E1B4C : #<Function FD-INPUT-AVAILABLE-P #x060df146> + 344
(#xF0601C40) #x020E2004 : #<Function PROCESS-INPUT-WAIT #x060df676> + 240
(#xF0601C50) #x020E1370 : #<Function FD-STREAM-ADVANCE #x060dc5a6> + 460
(#xF0601C60) #x020D94DC : #<Function %IOBLOCK-TYI #x060c6e0e> + 384
(#xF0601C70) #x00004D7C : (subprimitive _ret1valn)
(#xF0601C80) #x020DFB60 : #<Method-Function STREAM-READ-CHAR (BUFFERED-CHARACTER-INPUT-STREAM-MIXIN) #x060d7a26> + 204
(#xF0601C90) #x020DFAF4 : #<Method-Function STREAM-READ-CHAR (BUFFERED-CHARACTER-INPUT-STREAM-MIXIN) #x060d7a26> + 96
(#xF0601CA0) #x021E767C : #<Function READ-CHAR #x062664ee> + 128
(#xF0601CB0) #x064F8828 : #<Function NEXT-BYTE #x064f883e> + 36
(#xF0601CC0) #x064F8914 : #<Function DECODE-MESSAGE #x064f8a96> + 192
(#xF0601CD0) #x064F8A40 : #<Function DECODE-MESSAGE #x064f8a96> + 492
(#xF0601CE0) #x064E7C10 : #<Function READ-LOOP #x064e7c7e> + 140
(#xF0601CF0) #x064E7C48 : #<Function READ-LOOP #x064e7c7e> + 196
(#xF0601D00) #x020FD044 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 400
(#xF0601D10) #x020FD080 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 460
(#xF0601D20) #x020FD194 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 736
(#xF0601D30) #x00004D7C : (subprimitive _ret1valn)
(#xF0601D40) #x020FD314 : #<Anonymous Function #x06101d3e> + 152
(#xF0601D50) #x020FD2FC : #<Anonymous Function #x06101d3e> + 128
(#xF0601D60) #x020F5450 : #<Anonymous Function #x060f491e> + 172
(#xF0601D70) #x0000881C : (subprimitive toplevel_loop)
(#xF0601D80) #x00008828 : (subprimitive toplevel_loop)
(#xf0601d90) #x000088F4 : _start_lisp + 180
(#xf0601e50) #x00012CAC : _lisp_thread_entry + 152
(#xf0601eb0) #x90020C28 : __pthread_body + 40
(#xf0601f00) #x00000000 : (null) + 0


cstack area #x0008f310


(#xF04CECA0) #x020E587C : #<Function %WAIT-ON-SEMAPHORE-PTR #x060e2a7e> + 120
(#xF04CECB0) #x020FC8B4 : #<Function PROCESS-WAIT #x0610123e> + 216
(#xF04CECC0) #x020FC84C : #<Function PROCESS-WAIT #x0610123e> + 112
(#xF04CECD0) #x064E278C : #<Method-Function RECEIVE () #x064e28ae> + 136
(#xF04CECE0) #x064E79F0 : #<Function DISPATCH-LOOP #x064e7a3e> + 212
(#xF04CECF0) #x064E7A14 : #<Function DISPATCH-LOOP #x064e7a3e> + 248
(#xF04CED00) #x020FD044 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 400
(#xF04CED10) #x020FD080 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 460
(#xF04CED20) #x020FD194 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 736
(#xF04CED30) #x00004D7C : (subprimitive _ret1valn)
(#xF04CED40) #x020FD314 : #<Anonymous Function #x06101d3e> + 152
(#xF04CED50) #x020FD2FC : #<Anonymous Function #x06101d3e> + 128
(#xF04CED60) #x020F5450 : #<Anonymous Function #x060f491e> + 172
(#xF04CED70) #x0000881C : (subprimitive toplevel_loop)
(#xF04CED80) #x00008828 : (subprimitive toplevel_loop)
(#xf04ced90) #x000088F4 : _start_lisp + 180
(#xf04cee50) #x00012CAC : _lisp_thread_entry + 152
(#xf04ceeb0) #x90020C28 : __pthread_body + 40
(#xf04cef00) #x00000000 : (null) + 0


cstack area #x000814a0


(#xF0135B10) #x020E1B4C : #<Function FD-INPUT-AVAILABLE-P #x060df146> + 344
(#xF0135B20) #x020E2004 : #<Function PROCESS-INPUT-WAIT #x060df676> + 240
(#xF0135B30) #x020E1370 : #<Function FD-STREAM-ADVANCE #x060dc5a6> + 460
(#xF0135B40) #x020D94DC : #<Function %IOBLOCK-TYI #x060c6e0e> + 384
(#xF0135B50) #x00004D7C : (subprimitive _ret1valn)
(#xF0135B60) #x020DFB60 : #<Method-Function STREAM-READ-CHAR (BUFFERED-CHARACTER-INPUT-STREAM-MIXIN) #x060d7a26> + 204
(#xF0135B70) #x020DFAF4 : #<Method-Function STREAM-READ-CHAR (BUFFERED-CHARACTER-INPUT-STREAM-MIXIN) #x060d7a26> + 96
(#xF0135B80) #x0210B1C4 : #<Function %NEXT-CHAR-AND-ATTR #x061105b6> + 88
(#xF0135B90) #x00004D7C : (subprimitive _ret1valn)
(#xF0135BA0) #x0210B108 : #<Function %NEXT-NON-WHITESPACE-CHAR-AND-ATTR #x06110516> + 52
(#xF0135BB0) #x02108724 : #<Function %READ-FORM #x0610e026> + 192
(#xF0135BC0) #x00004D7C : (subprimitive _ret1valn)
(#xF0135BD0) #x02108DD8 : #<Function READ #x0610e52e> + 212
(#xF0135BE0) #x020E5C4C : #<Method-Function READ-TOPLEVEL-FORM (INPUT-STREAM T) #x060e2f96> + 64
(#xF0135BF0) #x00004D7C : (subprimitive _ret1valn)
(#xF0135C00) #x020BBC64 : #<Function %%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE #x0608e21e> + 616
(#xF0135C10) #x00004D7C : (subprimitive _ret1valn)
(#xF0135C20) #x020BC408 : #<Function %%STANDARD-COMBINED-METHOD-DCODE #x0608e88e> + 148
(#xF0135C30) #x00004D7C : (subprimitive _ret1valn)
(#xF0135C40) #x00004CE0 : (subprimitive _nvalret)
(#xF0135C50) #x00004D7C : (subprimitive _ret1valn)
(#xF0135C60) #x0210EA70 : #<Function READ-LOOP #x06116846> + 684
(#xF0135C70) #x0210EB48 : #<Function READ-LOOP #x06116846> + 900
(#xF0135C80) #x0210EB74 : #<Function READ-LOOP #x06116846> + 944
(#xF0135C90) #x0210EBA0 : #<Function READ-LOOP #x06116846> + 988
(#xF0135CA0) #x0210F8E0 : #<Function TOPLEVEL-LOOP #x06117bde> + 44
(#xF0135CB0) #x0210F8E8 : #<Function TOPLEVEL-LOOP #x06117bde> + 52
(#xF0135CC0) #x020F8720 : #<Anonymous Function #x060f8b36> + 68
(#xF0135CD0) #x00004D7C : (subprimitive _ret1valn)
(#xF0135CE0) #x021223EC : #<Anonymous Function #x0613f64e> + 592
(#xF0135CF0) #x021221EC : #<Anonymous Function #x0613f64e> + 80
(#xF0135D00) #x020FD044 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 400
(#xF0135D10) #x020FD080 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 460
(#xF0135D20) #x020FD194 : #<Function RUN-PROCESS-INITIAL-FORM #x06101c0e> + 736
(#xF0135D30) #x00004D7C : (subprimitive _ret1valn)
(#xF0135D40) #x020FD314 : #<Anonymous Function #x06101d3e> + 152
(#xF0135D50) #x020FD2FC : #<Anonymous Function #x06101d3e> + 128
(#xF0135D60) #x020F5450 : #<Anonymous Function #x060f491e> + 172
(#xF0135D70) #x0000881C : (subprimitive toplevel_loop)
(#xF0135D80) #x00008828 : (subprimitive toplevel_loop)
(#xf0135d90) #x000088F4 : _start_lisp + 180
(#xf0135e50) #x00012CAC : _lisp_thread_entry + 152
(#xf0135eb0) #x90020C28 : __pthread_body + 40
(#xf0135f00) #x00000000 : (null) + 0


cstack area #x0007bc90


(#xBFFFF990) #x020F6248 : #<Function %NANOSLEEP #x060f5946> + 268
(#xBFFFF9A0) #x020F8588 : #<Anonymous Function #x060f8a5e> + 300
(#xBFFFF9B0) #x020F85AC : #<Anonymous Function #x060f8a5e> + 336
(#xBFFFF9C0) #x020F85B4 : #<Anonymous Function #x060f8a5e> + 344
(#xBFFFF9D0) #x020F85E8 : #<Anonymous Function #x060f8a5e> + 396
(#xBFFFF9E0) #x0000881C : (subprimitive toplevel_loop)
(#xBFFFF9F0) #x00008828 : (subprimitive toplevel_loop)
(#xbffffa00) #x000088F4 : _start_lisp + 180
[4478] OpenMCL kernel debugger: 

For what it's worth, here are the current values of the registers:

[4478] OpenMCL kernel debugger: L
rcontext = 0x00083610 
nargs = 1
r15 (fn) = 0
r23 (arg_z) = -66162968
r22 (arg_y) = -66162968
r21 (arg_x) = -66477220
r20 (temp0) = #<25-element vector subtag = 2F @#x02002c16>
r19 (temp1/next_method_context) = #(#<3-element vector subtag = 72 @#x060a0966> #<3-element vector subtag = 72 @#x060a0346> () #<3-element vector subtag = 72 @#x06097cb6> #<3-element vector subtag = 72 @#x060a0966> #<3-element vector subtag = 72 @#x060a0286> () #<3-element vector subta...
r18 (temp2/nfn) = #<Function %CFP-LFUN #x0600177e>
r17 (temp3/fname) = %CFP-LFUN
r16 (temp4) = T
r31 (save0) = -66162968
r30 (save1) = 0
r29 (save2) = ()
r28 (save3) = ESCAPE-AS-HTML
r27 (save4) = PRINC-TO-STRING
r26 (save5) = (ERROR #<Anonymous Function #x066ee00e>)
r25 (save6) = BOOKSHELF-VIEWER.BOOKSHELF
r24 (save7) = #<3-element vector subtag = 72 @#x066eae8e>
[4478] OpenMCL kernel debugger: 

Here's the definiton of map-backtrace i'm using:

(defun map-backtrace (function &optional
                      (start-frame-number 0)
                      (end-frame-number most-positive-fixnum))
  "Call FUNCTION passing information about each stack frame
 from frames START-FRAME-NUMBER to END-FRAME-NUMBER."
  (let ((context (backtrace-context))
        (frame-number 0)
        (top-stack-frame (or *swank-debugger-stack-frame* 
                             (ccl::%get-frame-ptr))))
    (do* ((p top-stack-frame (ccl::parent-frame p context))
          (q (ccl::last-frame-ptr context)))
         ((or (null p) (eq p q) (ccl::%stack< q p context))
          (values))
      (multiple-value-bind (lfun pc) (ccl::cfp-lfun p)
        (when lfun
          (if (and (>= frame-number start-frame-number)
                   (< frame-number end-frame-number))
              (funcall function frame-number p context lfun pc))
          (incf frame-number))))))

is there anything else i can do to debug this?

-- 
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
     -Leonard Cohen



More information about the Openmcl-devel mailing list