From: William Harold Newman Date: Thu, 29 Jan 2004 04:09:31 +0000 (+0000) Subject: 0.8.7.29: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=bb93c9001110f38e28af43012e2c4bdda871b630;p=sbcl.git 0.8.7.29: merged dan_b patches from sbcl-devel 2004-01-22: "GC fixes: splay.lisp and SIGSTOP" "Another one for the collection [bug 108]" --- diff --git a/src/code/room.lisp b/src/code/room.lisp index 0faffae..43f552e 100644 --- a/src/code/room.lisp +++ b/src/code/room.lisp @@ -36,6 +36,28 @@ (size (primitive-object-size obj))) (cond ((not lowtag)) + (;; KLUDGE described in dan_b message "Another one for the + ;; collection [bug 108]" (sbcl-devel 2004-01-22) + ;; + ;; In a freshly started SBCL 0.8.7.20ish, (TIME (ROOM T)) causes + ;; debugger invoked on a SB-INT:BUG in thread 5911: + ;; failed AVER: "(SAP= CURRENT END)" + ;; [WHN: Similar things happened on one but not the other of my + ;; machines when I just run ROOM a lot in a loop.] + ;; + ;; This appears to be due to my [DB] abuse of the primitive + ;; object macros to define a thread object that shares a lowtag + ;; with fixnums and has no widetag: it looks like the code that + ;; generates *META-ROOM-INFO* infers from this that even fixnums + ;; are thread-sized - probably undesirable. + ;; + ;; This [the fix; the EQL NAME 'THREAD clause here] is more in the + ;; nature of a workaround than a really good fix. I'm not sure + ;; what a really good fix is: I /think/ it's probably to remove + ;; the :LOWTAG option in DEFINE-PRIMITIVE-OBJECT THREAD, then teach + ;; genesis to generate the necessary OBJECT_SLOT_OFFSET macros + ;; for assembly source in the runtime/genesis/*.h files. + (eql name 'thread)) ((not widetag) (let ((info (make-room-info :name name :kind :lowtag)) diff --git a/src/code/toplevel.lisp b/src/code/toplevel.lisp index 03f4c34..745d2cc 100644 --- a/src/code/toplevel.lisp +++ b/src/code/toplevel.lisp @@ -532,9 +532,9 @@ "~@") (catch 'toplevel-catcher (sb!unix::reset-signal-mask) - ;; in the event of a control-stack-exhausted-error, we + ;; In the event of a control-stack-exhausted-error, we ;; should have unwound enough stack by the time we get - ;; here that this is now possible + ;; here that this is now possible. (sb!kernel::protect-control-stack-guard-page 1) (funcall repl-fun noprint) (critically-unreachable "after REPL"))))))))) diff --git a/src/runtime/gencgc.c b/src/runtime/gencgc.c index 5914f6f..b31bc72 100644 --- a/src/runtime/gencgc.c +++ b/src/runtime/gencgc.c @@ -2752,7 +2752,7 @@ scavenge_newspace_generation_one_scan(int generation) "/starting one full scan of newspace generation %d\n", generation)); for (i = 0; i < last_free_page; i++) { - /* note that this skips over open regions when it encounters them */ + /* Note that this skips over open regions when it encounters them. */ if ((page_table[i].allocated & BOXED_PAGE) && (page_table[i].bytes_used != 0) && (page_table[i].gen == generation) diff --git a/src/runtime/interrupt.c b/src/runtime/interrupt.c index aecee17..26b496a 100644 --- a/src/runtime/interrupt.c +++ b/src/runtime/interrupt.c @@ -544,19 +544,26 @@ sig_stop_for_gc_handler(int signal, siginfo_t *info, void *void_context) os_context_t *context = arch_os_get_context(&void_context); struct thread *thread=arch_os_get_current_thread(); struct interrupt_data *data=thread->interrupt_data; - + sigset_t ss; + int i; if(maybe_defer_handler(sig_stop_for_gc_handler,data, - signal,info,context)){ + signal,info,context)) { return; } /* need the context stored so it can have registers scavenged */ fake_foreign_function_call(context); + sigemptyset(&ss); + for(i=1;ipid); thread->state=STATE_STOPPED; release_spinlock(&all_threads_lock); - kill(thread->pid,SIGSTOP); + + sigemptyset(&ss); sigaddset(&ss,SIG_STOP_FOR_GC); + sigwaitinfo(&ss,0); undo_fake_foreign_function_call(context); } diff --git a/src/runtime/thread.c b/src/runtime/thread.c index 1169840..e4e5664 100644 --- a/src/runtime/thread.c +++ b/src/runtime/thread.c @@ -347,7 +347,7 @@ void gc_start_the_world() for(p=all_threads;p;p=p->next) { if(p==th) continue; p->state=STATE_RUNNING; - kill(p->pid,SIGCONT); + kill(p->pid,SIG_STOP_FOR_GC); } release_spinlock(&all_threads_lock); } diff --git a/version.lisp-expr b/version.lisp-expr index 61fd9ca..e57b46e 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.7.28" +"0.8.7.29"