Steel Bank Common Lisp

Transfer of Control during SUB-GC

Reported by Tobias C. Rittweiler on 2010-03-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

Short description of the code involved:

   Executed is: (loop repeat 100 do (do-test '...)))

   Test includes:

       - 250 threads, use of mutexes and condition-variables

       - test occassionally hangs;

       - for the case the test hangs, there's a WITH-TIMEOUT wrapped around
         the test; the TIMEOUT handler also KILL-THREADS all threads spawned
         during the test.

Platform: SBCL 1.0.36.36, on 8core x86-64, Linux

LDB backtrace:

fatal error encountered in SBCL pid 22804(tid 140737354061536):
Trapping to run pending handler while GC in progress.

Welcome to LDB, a low-level debugger for the Lisp runtime environment.
ldb> backtrace
Backtrace:
   0: Foreign fp = 0x7ffff51a0540, ra = 0x410d10
   1: Foreign fp = 0x7ffff51a0570, ra = 0x4135f4
   2: Foreign fp = 0x7ffff51a05b0, ra = 0x41179a
   3: Foreign fp = 0x7ffff51a0ab0, ra = 0x7ffff79d0a80
   4: SB-THREAD::CALL-WITH-RECURSIVE-SYSTEM-SPINLOCK/WITHOUT-GCING
   5: (COMMON-LISP::FLET BODY-FUN-[%PUTHASH]316)
   6: SB-KERNEL::%PUTHASH
   7: SB-C::SUB-FIND-SOURCE-PATHS
   8: SB-C::SUB-FIND-SOURCE-PATHS
   9: SB-C::SUB-FIND-SOURCE-PATHS
  10: SB-C::SUB-FIND-SOURCE-PATHS
  11: SB-C::SUB-FIND-SOURCE-PATHS
  12: SB-C::SUB-FIND-SOURCE-PATHS
  13: SB-C::SUB-FIND-SOURCE-PATHS
  14: SB-C::SUB-FIND-SOURCE-PATHS
  15: SB-C::FIND-SOURCE-PATHS
  16: (COMMON-LISP::LAMBDA ())
  17: (COMMON-LISP::FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK)
  18: (COMMON-LISP::FLET WITHOUT-INTERRUPTS-BODY-[CALL-WITH-RECURSIVE-LOCK]317)
  19: SB-THREAD::CALL-WITH-RECURSIVE-LOCK
  20: (COMMON-LISP::FLET SB-C::WITH-IT)
  21: SB-C::ACTUALLY-COMPILE
  22: SB-C::COMPILE-IN-LEXENV
  23: SB-IMPL::%SIMPLE-EVAL
  24: SB-INT::SIMPLE-EVAL-IN-LEXENV
  25: (COMMON-LISP::FLET SB-RT::%DO)
  26: (SB-C::HAIRY-ARG-PROCESSOR SB-RT::DO-ENTRY)
  27: TCR.SYNCHRONIZATION-TOOLS::FROB-LIGHT
  28: SB-INT::SIMPLE-EVAL-IN-LEXENV
  29: (SB-C::TL-XEP SB-EXT::INTERACTIVE-EVAL)
  30: SB-IMPL::REPL-FUN
  31: (COMMON-LISP::LAMBDA ())
  32: SB-IMPL::%WITH-REBOUND-IO-SYNTAX
  33: SB-IMPL::TOPLEVEL-REPL
  34: SB-IMPL::TOPLEVEL-INIT
  35: (COMMON-LISP::LABELS SB-IMPL::RESTART-LISP)
ldb>

Attached GDB backtrace:

Thread 1 (Thread 0x7ffff7fed6e0 (LWP 22804)):
#0 0x00007ffff74ad99b in read () from /lib/libc.so.6
#1 0x00007ffff745bb20 in _IO_file_underflow () from /lib/libc.so.6
#2 0x00007ffff745d2ee in _IO_default_uflow () from /lib/libc.so.6
#3 0x00007ffff74517a7 in _IO_getline_info () from /lib/libc.so.6
#4 0x00007ffff7450567 in fgets () from /lib/libc.so.6
#5 0x00000000004147ee in ldb_monitor () at monitor.c:469
#6 0x0000000000410d10 in lose (fmt=0x424c20 "Trapping to run pending handler while GC in progress.") at interr.c:71
#7 0x00000000004135f4 in interrupt_handle_pending (context=0x7ffff51a05c0) at interrupt.c:904
#8 0x000000000041179a in low_level_handle_now_handler (signal=-512, info=0x7ffff51a06f0, void_context=0x7ffff51a05c0)
    at interrupt.c:1713
#9 <signal handler called>
#10 0x00000010005b67a9 in ?? ()
#11 0x0000000000000208 in ?? ()
#12 0x00007ffff51a09f0 in ?? ()
#13 0x000000100383164f in ?? ()
#14 0x0000000000000000 in ?? ()
#0 0x00007ffff74ad99b in read () from /lib/libc.so.6

That's the only thread active, making it likely that we encountered a TIMEOUT,
and the TIMEOUT handler killed all childs.

We lose() with "Trapping to run pending handler while GC in progress."
in interrupt_hander_pending; *GC-PENDING* is :IN-PROGRESS at that
point.

Because *GC-PENDING* is :IN-PROGRESS, and the only place it's
set to that is SUB-GC -- and shortly later in SUB-GC, it's set to NIL,
it seems like there was a transfer-of-control out of SUB-GC before
that setting.

And, indeed, some clever trick involving *BREAK-ON-SIGNALS*
revealed:

debugger invoked on a SIMPLE-CONDITION in thread #<THREAD
                                                   "initial thread" RUNNING
                                                   {100382A091}>:
  The value -4 is not of type (MOD 1152921504606846973).
BREAK was entered because of *BREAK-ON-SIGNALS* (now rebound to NIL).

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

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Return from BREAK.
  1: [REASSIGN] Return from BREAK and assign a new value to *BREAK-ON-SIGNALS*.
  2: [ABORT ] Exit debugger, returning to top level.

(BREAK
 "~A~%BREAK was entered because of *BREAK-ON-SIGNALS* ~
                    (now rebound to NIL)."
 #<TYPE-ERROR {100382C811}>)
0]
WARNING: Starting a select without a timeout while interrupts are disabled.
:backtrace
0: (BREAK
    "~A~%BREAK was entered because of *BREAK-ON-SIGNALS* ~
                    (now rebound to NIL)."
    #<TYPE-ERROR {100382C811}>)
1: (SIGNAL #<TYPE-ERROR {100382C811}>)[:EXTERNAL]
2: (ERROR TYPE-ERROR)[:EXTERNAL]
3: (SB-KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER
    #<unavailable argument>
    #.(SB-SYS:INT-SAP #X7FFFF51A0AE0)
    #<
      SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X7FFFF51A0630 :TYPE (*
                                                                (SB-ALIEN:STRUCT
                                                                 SB-VM::OS-CONTEXT-T-STRUCT))>
    (149 21))
4: (SB-KERNEL:INTERNAL-ERROR
    #.(SB-SYS:INT-SAP #X7FFFF51A0630)
    #<unavailable argument>)
5: ("foreign function: #x4223A0")
6: ("foreign function: #x40D31C")
7: ("foreign function: #x413945")
8: ("foreign function: #x41179A")
9: ((FLET SB-THREAD::WITH-MUTEX-THUNK))
10: ((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-MUTEX]293))
11: ((FLET #:WITHOUT-INTERRUPTS-BODY-[SUB-GC]20))
12: (SB-KERNEL:SUB-GC)[:EXTERNAL]
13: (SB-KERNEL:SUB-GC :GEN 0)
14: ("foreign function: #x4223A0")
15: ("foreign function: #x40E5C4")
16: ("foreign function: #x41368E")
17: ("foreign function: #x41179A")
18: (MAKE-HASH-TABLE)[:EXTERNAL]
19: (SB-C::ACTUALLY-COMPILE
     NIL
     (LAMBDA ()
       (DECLARE (SB-EXT:MUFFLE-CONDITIONS SB-EXT:COMPILER-NOTE))
       (PROGN
        (LET ((%SPAWNED-THREADS% #))
          (MACROLET (# # #)
            (HANDLER-CASE # #)))))
     #<NULL-LEXENV>)
20: (SB-C:COMPILE-IN-LEXENV
     NIL
     (LAMBDA ()
       (DECLARE (SB-EXT:MUFFLE-CONDITIONS SB-EXT:COMPILER-NOTE))
       (PROGN
        (LET ((%SPAWNED-THREADS% #))
          (MACROLET (# # #)
            (HANDLER-CASE # #)))))
     #<NULL-LEXENV>)
21: (SB-IMPL::%SIMPLE-EVAL
     (LET ((%SPAWNED-THREADS% (SB-QUEUE:MAKE-QUEUE)))
       (MACROLET ((SPAWNED-THREADS ()
                    '(SB-QUEUE:LIST-QUEUE-CONTENTS %SPAWNED-THREADS%))
                  (SPAWN (# &BODY BODY)
                    `(SB-QUEUE:ENQUEUE # %SPAWNED-THREADS%))
                  (NAMED-SPAWN (NAME # &BODY BODY)
                    `(SB-QUEUE:ENQUEUE # %SPAWNED-THREADS%)))
         (HANDLER-CASE
          (HANDLER-BIND (#)
            (SB-EXT:WITH-TIMEOUT +TIMEOUT+
              #))
          (SERIOUS-CONDITION (C) (MAPC #'KILL-THREAD #) C))))
     #<NULL-LEXENV>)
22: (SB-INT:SIMPLE-EVAL-IN-LEXENV
     (WITH-TEST-SETUP (:TIMEOUT +TIMEOUT+)
       (LET ((N +N-THREADS+))
         (WITH-BUCKETS COLLECT-INTO
             ((CROSSED :SYNCHRONIZED T) (BROKEN :SYNCHRONIZED T))
           (WITH-SYNCHRONIZATION-BARRIERS (# # #)
             (DOTIMES # #)
             (VALUES # # #)))))
     #<NULL-LEXENV>)
23: ((FLET SB-RT::%DO))
24: (SB-RT::DO-ENTRY
     (T WITH-SYNCHRONIZATION-BARRIER.2
      (WITH-TEST-SETUP (:TIMEOUT +TIMEOUT+)
        (LET ((N +N-THREADS+))
          (WITH-BUCKETS COLLECT-INTO
              (# #)
            (WITH-SYNCHRONIZATION-BARRIERS #
              #
              #))))
      T T T)
     #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDOUT* {10001EDAD1}>)
25: (FROB-LIGHT 100)
26: (SB-INT:SIMPLE-EVAL-IN-LEXENV (FROB-LIGHT 100) #<NULL-LEXENV>)
27: (SB-EXT:INTERACTIVE-EVAL (FROB-LIGHT 100))[:EXTERNAL]
28: (SB-IMPL::REPL-FUN NIL)
29: ((LAMBDA ()))
30: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA #) {1003FB44D9}>)
31: (SB-IMPL::TOPLEVEL-REPL NIL)
32: (SB-IMPL::TOPLEVEL-INIT)
33: ((LABELS SB-IMPL::RESTART-LISP))

0]
WARNING: Starting a select without a timeout while interrupts are disabled.

The same, but with an SBCL built with QSHOW_SIGNALS:

140737354061536 /create_os_thread: creating new thread
140736207894864 /creating thread 140736207894864
140736207894864 /entering funcall0(0x100491dfc9)
140737354061536 /create_os_thread: creating new thread
140736203393360 /creating thread 140736203393360
140736203393360 /entering funcall0(0x10049291a9)
140737354061536 /create_os_thread: creating new thread
140736198891856 /creating thread 140736198891856
140736198891856 /entering funcall0(0x1004929379)
140737354061536 /create_os_thread: creating new thread
140736194390352 /creating thread 140736194390352
140736194390352 /entering funcall0(0x1004929549)
140737354061536 /create_os_thread: creating new thread
140736189888848 /creating thread 140736189888848
140736189888848 /entering funcall0(0x1004929719)
140737354061536 /create_os_thread: creating new thread
140736185387344 /creating thread 140736185387344
140736185387344 /entering funcall0(0x10049298e9)
140737354061536 /create_os_thread: creating new thread
140736180885840 /creating thread 140736180885840
140736180885840 /entering funcall0(0x1004929ab9)
140737354061536 /create_os_thread: creating new thread
140736176384336 /creating thread 140736176384336
140736176384336 /entering funcall0(0x1004929c89)
140736221399376 /exiting thread 140736221399376
140736482457936 /exiting thread 140736482457936
---------------------------------------
140737035639120 /exiting thread 140737035639120
140736216897872 /exiting thread 140736216897872
140737107597648 /exiting thread 140737107597648
140736585898320 /exiting thread 140736585898320
140736612882768 /exiting thread 140736612882768
140736198891856 /exiting thread 140736198891856
140737265006928 /exiting thread 140737265006928
140737233525072 /exiting thread 140737233525072
140736842250576 /exiting thread 140736842250576
140737040136528 /exiting thread 140737040136528
140736756799824 /exiting thread 140736756799824
140736639867216 /exiting thread 140736639867216
140736293423440 /exiting thread 140736293423440
140736788281680 /exiting thread 140736788281680
140736522934608 /exiting thread 140736522934608
140736747805008 /exiting thread 140736747805008
140736932198736 /exiting thread 140736932198736
140737125587280 /exiting thread 140737125587280
140736693836112 /exiting thread 140736693836112
140737026644304 /exiting thread 140737026644304
140737269504336 /exiting thread 140737269504336
140736716323152 /exiting thread 140736716323152
140736369949008 /exiting thread 140736369949008
140737188550992 /exiting thread 140737188550992
140737112095056 /exiting thread 140737112095056
140736459970896 /exiting thread 140736459970896
140736500447568 /exiting thread 140736500447568
140736783784272 /exiting thread 140736783784272
140736878229840 /exiting thread 140736878229840
140736666851664 /exiting thread 140736666851664
140736225900880 /exiting thread 140736225900880
140736374450512 /exiting thread 140736374450512
140737260509520 /exiting thread 140737260509520
140736558913872 /exiting thread 140736558913872
140736311429456 /exiting thread 140736311429456
140737053628752 /exiting thread 140737053628752
140736995162448 /exiting thread 140736995162448
140736869235024 /exiting thread 140736869235024
140737098602832 /exiting thread 140737098602832
140737161566544 /exiting thread 140737161566544
140736576903504 /exiting thread 140736576903504
140736455473488 /exiting thread 140736455473488
140736315930960 /exiting thread 140736315930960
140736266414416 /exiting thread 140736266414416
140737229027664 /exiting thread 140737229027664
140736941193552 /exiting thread 140736941193552
140736837753168 /exiting thread 140736837753168
140736302426448 /exiting thread 140736302426448
140737076115792 /exiting thread 140737076115792
140736567908688 /exiting thread 140736567908688
140737215535440 /exiting thread 140737215535440
140736981670224 /exiting thread 140736981670224
140736986167632 /exiting thread 140736986167632
140736342939984 /exiting thread 140736342939984
140737193048400 /exiting thread 140737193048400
140737103100240 /exiting thread 140737103100240
140737220032848 /exiting thread 140737220032848
140736792779088 /exiting thread 140736792779088
140736972675408 /exiting thread 140736972675408
140737179556176 /exiting thread 140737179556176
140737184053584 /exiting thread 140737184053584
140736846747984 /exiting thread 140736846747984
140737296488784 /exiting thread 140737296488784
140736572406096 /exiting thread 140736572406096
140736918706512 /exiting thread 140736918706512
140736527432016 /exiting thread 140736527432016
140736378952016 /exiting thread 140736378952016
140736536426832 /exiting thread 140736536426832
140736959183184 /exiting thread 140736959183184
140736905214288 /exiting thread 140736905214288
140736864737616 /exiting thread 140736864737616
140736203393360 /exiting thread 140736203393360
140736945690960 /exiting thread 140736945690960
140736927701328 /exiting thread 140736927701328
140736684841296 /exiting thread 140736684841296
140736855742800 /exiting thread 140736855742800
140737031141712 /exiting thread 140737031141712
140736900716880 /exiting thread 140736900716880
140737143576912 /exiting thread 140737143576912
140736351942992 /exiting thread 140736351942992
140736590395728 /exiting thread 140736590395728
140737282996560 /exiting thread 140737282996560
140736414959952 /exiting thread 140736414959952
140736896219472 /exiting thread 140736896219472
140737094105424 /exiting thread 140737094105424
140736662354256 /exiting thread 140736662354256
140736423962960 /exiting thread 140736423962960
140736432965968 /exiting thread 140736432965968
140736239405392 /exiting thread 140736239405392
140736248408400 /exiting thread 140736248408400
140736275417424 /exiting thread 140736275417424
140736770292048 /exiting thread 140736770292048
140736270915920 /exiting thread 140736270915920
140736324933968 /exiting thread 140736324933968
140736698333520 /exiting thread 140736698333520
140736851245392 /exiting thread 140736851245392
140736347441488 /exiting thread 140736347441488
140736243906896 /exiting thread 140736243906896
140736657856848 /exiting thread 140736657856848
140737085110608 /exiting thread 140737085110608
140736779286864 /exiting thread 140736779286864
140736518437200 /exiting thread 140736518437200
140736617380176 /exiting thread 140736617380176
140736707328336 /exiting thread 140736707328336
140736468965712 /exiting thread 140736468965712
140736401455440 /exiting thread 140736401455440
140736738810192 /exiting thread 140736738810192
140736833255760 /exiting thread 140736833255760
140737121089872 /exiting thread 140737121089872
140736648862032 /exiting thread 140736648862032
140736936696144 /exiting thread 140736936696144
140736284420432 /exiting thread 140736284420432
140737022146896 /exiting thread 140737022146896
140736653359440 /exiting thread 140736653359440
140737116592464 /exiting thread 140737116592464
140737166063952 /exiting thread 140737166063952
140736531929424 /exiting thread 140736531929424
140736279918928 /exiting thread 140736279918928
140737049131344 /exiting thread 140737049131344
140736891722064 /exiting thread 140736891722064
140736968178000 /exiting thread 140736968178000
140736446470480 /exiting thread 140736446470480
140736635369808 /exiting thread 140736635369808
140736630872400 /exiting thread 140736630872400
140736675846480 /exiting thread 140736675846480
140737058126160 /exiting thread 140737058126160
140737130084688 /exiting thread 140737130084688
140736860240208 /exiting thread 140736860240208
140736608385360 /exiting thread 140736608385360
140736914209104 /exiting thread 140736914209104
140736297924944 /exiting thread 140736297924944
140736689338704 /exiting thread 140736689338704
140736752302416 /exiting thread 140736752302416
140736189888848 /exiting thread 140736189888848
140736819763536 /exiting thread 140736819763536
140736963680592 /exiting thread 140736963680592
140737017649488 /exiting thread 140737017649488
140736396953936 /exiting thread 140736396953936
140736383453520 /exiting thread 140736383453520
140737278499152 /exiting thread 140737278499152
140737274001744 /exiting thread 140737274001744
140737242519888 /exiting thread 140737242519888
140736603887952 /exiting thread 140736603887952
140736765794640 /exiting thread 140736765794640
140737062623568 /exiting thread 140737062623568
140736365447504 /exiting thread 140736365447504
140736509442384 /exiting thread 140736509442384
140736360946000 /exiting thread 140736360946000
140736405956944 /exiting thread 140736405956944
140736923203920 /exiting thread 140736923203920
140736729815376 /exiting thread 140736729815376
140736720820560 /exiting thread 140736720820560
140736513939792 /exiting thread 140736513939792
140736761297232 /exiting thread 140736761297232
140736477960528 /exiting thread 140736477960528
140736990665040 /exiting thread 140736990665040
140737013152080 /exiting thread 140737013152080
140736464468304 /exiting thread 140736464468304
140737004157264 /exiting thread 140737004157264
140737152571728 /exiting thread 140737152571728
140736806271312 /exiting thread 140736806271312
140737175058768 /exiting thread 140737175058768
140737157069136 /exiting thread 140737157069136
140737354061536 /setting gc_blocked_deferrables
140737067120976 /exiting thread 140737067120976
140737354061536 /<trap pending interrupt>
140737354061536 /[arch_skip_inst resuming at 171470f]
140737354061536 /entering interrupt_handle_pending
140737354061536 /maybe_gc: calling SUB_GC
140737354061536 /entering funcall0(0x1003cc4ba9)
140736954685776 /exiting thread 140736954685776
140736725317968 /exiting thread 140736725317968
140737354061536 heap WP violation? fault_addr=125c48, page_index=293
140736419461456 /exiting thread 140736419461456
140737354061536 /gc_stop_the_world:waiting on lock
140737354061536 /gc_stop_the_world:got lock
140737354061536 /gc_stop_the_world: thread=140737354061536, state=8
140737354061536 /gc_stop_the_world:signals sent
140737354061536 /gc_stop_the_world:end
140736999659856 /exiting thread 140736999659856
140737354061536 /entering collect_garbage(0)
140736450971984 /exiting thread 140736450971984
140736815266128 /exiting thread 140736815266128
140736882727248 /exiting thread 140736882727248
140737256012112 /exiting thread 140737256012112
140737211038032 /exiting thread 140737211038032
140736563411280 /exiting thread 140736563411280
140736504944976 /exiting thread 140736504944976
140736329435472 /exiting thread 140736329435472
140736702830928 /exiting thread 140736702830928
140737238022480 /exiting thread 140737238022480
140737170561360 /exiting thread 140737170561360
140736581400912 /exiting thread 140736581400912
140737008654672 /exiting thread 140737008654672
140736356444496 /exiting thread 140736356444496
140736774789456 /exiting thread 140736774789456
140736810768720 /exiting thread 140736810768720
140737148074320 /exiting thread 140737148074320
140736387955024 /exiting thread 140736387955024
140736185387344 /exiting thread 140736185387344
140736711825744 /exiting thread 140736711825744
140736549919056 /exiting thread 140736549919056
140736410458448 /exiting thread 140736410458448
140736288921936 /exiting thread 140736288921936
140736743307600 /exiting thread 140736743307600
140736797276496 /exiting thread 140736797276496
140736950188368 /exiting thread 140736950188368
140737134582096 /exiting thread 140737134582096
140736644364624 /exiting thread 140736644364624
140736801773904 /exiting thread 140736801773904
140736626374992 /exiting thread 140736626374992
140737197545808 /exiting thread 140737197545808
140737139079504 /exiting thread 140737139079504
140736671349072 /exiting thread 140736671349072
140736473463120 /exiting thread 140736473463120
140737354061536 heap WP violation? fault_addr=2c26c8, page_index=706
140736207894864 /exiting thread 140736207894864
140737300986192 /exiting thread 140737300986192
140736252909904 /exiting thread 140736252909904
140737089608016 /exiting thread 140737089608016
140736680343888 /exiting thread 140736680343888
140736428464464 /exiting thread 140736428464464
140736234903888 /exiting thread 140736234903888
140737080613200 /exiting thread 140737080613200
140737206540624 /exiting thread 140737206540624
140736320432464 /exiting thread 140736320432464
140736333936976 /exiting thread 140736333936976
140736338438480 /exiting thread 140736338438480
140736441968976 /exiting thread 140736441968976
140736486955344 /exiting thread 140736486955344
140736540924240 /exiting thread 140736540924240
140736909711696 /exiting thread 140736909711696
140736230402384 /exiting thread 140736230402384
140736594893136 /exiting thread 140736594893136
140736621877584 /exiting thread 140736621877584
140736545421648 /exiting thread 140736545421648
140736257411408 /exiting thread 140736257411408
140736824260944 /exiting thread 140736824260944
140736180885840 /exiting thread 140736180885840
140736306927952 /exiting thread 140736306927952
140737247017296 /exiting thread 140737247017296
140736437467472 /exiting thread 140736437467472
140736554416464 /exiting thread 140736554416464
140736491452752 /exiting thread 140736491452752
140737071618384 /exiting thread 140737071618384
140736873732432 /exiting thread 140736873732432
140736887224656 /exiting thread 140736887224656
140737287493968 /exiting thread 140737287493968
140737202043216 /exiting thread 140737202043216
140736734312784 /exiting thread 140736734312784
140736977172816 /exiting thread 140736977172816
140737044633936 /exiting thread 140737044633936
140737291991376 /exiting thread 140737291991376
140736176384336 /exiting thread 140736176384336
140737224530256 /exiting thread 140737224530256
140736194390352 /exiting thread 140736194390352
140736212396368 /exiting thread 140736212396368
140736828758352 /exiting thread 140736828758352
140736495950160 /exiting thread 140736495950160
140737251514704 /exiting thread 140737251514704
140737354061536 /starting one full scan of newspace generation 7
140736261912912 /exiting thread 140736261912912
140736599390544 /exiting thread 140736599390544
140737354061536 /done with one full scan of newspace generation 7
Next gc when 77836592 bytes have been consed
140737354061536 /returning from collect_garbage
140737354061536 /<trap error/cerror 10>
140737354061536 /in interrupt_internal_error
internal error #31 (Object is of the wrong type.)
    SC: 21, Offset: 4 0xfffffffffffffd20: even fixnum: -184
    SC: 21, Offset: 0 $1= 0x100004a9b7: list pointer
140737354061536 heap WP violation? fault_addr=5c41a0, page_index=1476
140737354061536 heap WP violation? fault_addr=53ce88, page_index=1340
140737354061536 heap WP violation? fault_addr=3e3a08, page_index=995
140737354061536 heap WP violation? fault_addr=9f3b0, page_index=159
140737354061536 heap WP violation? fault_addr=25eda0, page_index=606
140737354061536 heap WP violation? fault_addr=4120d60, page_index=16672
140737354061536 heap WP violation? fault_addr=284630, page_index=644
140737354061536 heap WP violation? fault_addr=1bdfc0, page_index=445
140737354061536 heap WP violation? fault_addr=338f70, page_index=824
140737354061536 heap WP violation? fault_addr=3391f0, page_index=825

140737354061536 heap WP violation? fault_addr=56f028, page_index=1391
140737354061536 heap WP violation? fault_addr=56d000, page_index=1389
140737354061536 heap WP violation? fault_addr=2e8618, page_index=744
140737354061536 heap WP violation? fault_addr=3e97870, page_index=16023
debugger invoked on a SIMPLE-CONDITION in thread #<THREAD
                                                   "initial thread" RUNNING
                                                   {100382A031}>:
  The value -92 is not of type (MOD 1152921504606846973).
BREAK was entered because of *BREAK-ON-SIGNALS* (now rebound to NIL).
140737354061536 heap WP violation? fault_addr=9cfb0, page_index=156

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

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Return from BREAK.
  1: [REASSIGN] Return from BREAK and assign a new value to *BREAK-ON-SIGNALS*.
  2: [ABORT ] Exit debugger, returning to top level.
140737354061536 heap WP violation? fault_addr=1be070, page_index=446
140737354061536 heap WP violation? fault_addr=1ed570, page_index=493
140737354061536 heap WP violation? fault_addr=1af250, page_index=431
140737354061536 heap WP violation? fault_addr=33a8b0, page_index=826
140737354061536 heap WP violation? fault_addr=33b530, page_index=827

140737354061536 heap WP violation? fault_addr=19fcb30, page_index=6652
140737354061536 heap WP violation? fault_addr=f16358, page_index=3862
140737354061536 heap WP violation? fault_addr=8174d0, page_index=2071
140737354061536 heap WP violation? fault_addr=535d40, page_index=1333
140737354061536 heap WP violation? fault_addr=83fe48, page_index=2111
140737354061536 heap WP violation? fault_addr=2c71070, page_index=11377
140737354061536 heap WP violation? fault_addr=24b0368, page_index=9392
140737354061536 heap WP violation? fault_addr=1e8a6c0, page_index=7818
140737354061536 heap WP violation? fault_addr=1322210, page_index=4898
(BREAK
 "~A~%BREAK was entered because of *BREAK-ON-SIGNALS* ~
                    (now rebound to NIL)."
 #<TYPE-ERROR {1003829CC1}>)
0] 140737354061536 heap WP violation? fault_addr=590b88, page_index=1424
140737354061536 heap WP violation? fault_addr=132b88, page_index=306
140737354061536 heap WP violation? fault_addr=3b0ab0, page_index=944

;
; caught WARNING:
; Starting a select without a timeout while interrupts are disabled.
<

(The -------- dashes represent the end of the test case.)

With the following patch, problems seems to begone:

Index: src/code/gc.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/code/gc.lisp,v
retrieving revision 1.91
diff -u -r1.91 gc.lisp
--- src/code/gc.lisp 27 Feb 2010 16:01:23 -0000 1.91
+++ src/code/gc.lisp 22 Mar 2010 18:58:25 -0000
@@ -224,8 +224,9 @@
                    (let ((start-time (get-internal-run-time)))
                      (collect-garbage gen)
                      (setf *gc-epoch* (cons nil nil))
- (incf *gc-run-time*
- (- (get-internal-run-time) start-time)))
+ (let ((run-time (- (get-internal-run-time) start-time)))
+ (when (plusp run-time)
+ (incf *gc-run-time* run-time))))
                    (setf *gc-pending* nil
                          new-usage (dynamic-usage))
                    #!+sb-thread

The diagnosis came mostly from nyef. The patch from nikodemus.

Gábor Melis (melisgl) wrote :

Looks good, but what caused the time difference to be negative?

Nikodemus Siivola (nikodemus) wrote :

I blame the kernel: http://software.itags.org/bsd/41412/ -- it's not Linux, but the explanation fits the observed behaviour.

Nikodemus Siivola (nikodemus) wrote :

In SBCL 1.0.42.10.

Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers