From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Fix for Mac OS X Garbage Collection Crashes Date: 15 Oct 2003 13:05:28 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066237717 5410 80.91.224.253 (15 Oct 2003 17:08:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2003 17:08:37 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Oct 15 19:08:34 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A9p8U-0007Pc-00 for ; Wed, 15 Oct 2003 19:08:34 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A9p8U-0001Zv-00 for ; Wed, 15 Oct 2003 19:08:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9p6U-0003oZ-Lo for emacs-devel@quimby.gnus.org; Wed, 15 Oct 2003 13:06:30 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A9p6A-0003oQ-MX for emacs-devel@gnu.org; Wed, 15 Oct 2003 13:06:10 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A9p5e-0003gm-Cn for emacs-devel@gnu.org; Wed, 15 Oct 2003 13:06:09 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9p5c-0003fw-M4 for emacs-devel@gnu.org; Wed, 15 Oct 2003 13:05:36 -0400 Original-Received: from vor.iro.umontreal.ca (vor.iro.umontreal.ca [132.204.24.42]) by mercure.iro.umontreal.ca (8.12.9/8.12.9) with ESMTP id h9FH5TKS001766; Wed, 15 Oct 2003 13:05:29 -0400 Original-Received: by vor.iro.umontreal.ca (Postfix, from userid 20848) id B0E813C63E; Wed, 15 Oct 2003 13:05:29 -0400 (EDT) Original-To: Andrew Choi In-Reply-To: Original-Lines: 50 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-MailScanner-DIRO: Found to be clean X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17120 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17120 > Yes, it was very hard to repeat the error. The following shows the top > of the call stack in one of my crash logs. > Thread 0 Crashed: > #0 0x000c6aec in mark_object (alloc.c:5014) > #1 0x000c5e20 in Fgarbage_collect (alloc.c:4400) > #2 0x000dc710 in Feval (eval.c:1978) > #3 0x000d99a0 in Fprogn (eval.c:409) > #4 0x000de81c in unbind_to (eval.c:3083) > #5 0x0010de14 in Fbyte_code (bytecode.c:893) > #6 0x000de1f4 in funcall_lambda (eval.c:2916) > #7 0x000ddcb8 in Ffuncall (eval.c:2781) > #8 0x0010d70c in Fbyte_code (bytecode.c:691) > #9 0x000de1f4 in funcall_lambda (eval.c:2916) > ... > So the call to mark_object that causes the problem was made from line > 4400, in the code here: > #if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \ > || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS) > mark_stack (); > #else > { > register struct gcpro *tail; > for (tail = gcprolist; tail; tail = tail->next) > for (i = 0; i < tail->nvars; i++) > mark_object (tail->var[i]); > } > #endif > That's what gave me the idea that perhaps I should change the definition > of GC_MARK_STACK for the OS X build. Then I ran Emacs under gdb and > after a long time was able to get the crash again (running Gnus, Tramp, > BlogMax, and possibly other stuffs). I discovered that `obj' contains > an integer value (0x1fff0000, -32768?, I think) but strangely the case > for Lisp_Cons (line 5014) was reached. I've seen very strange things happen as well in other circumstances. > Unfortunately I don't have that > process any more. Perhaps one can try to repeat this on another > platform too. It seems that this may not be a Mac-specific problem. > Hope this is enough information. The change to alloc.c last month > wasn't that big, was it? Thanks. I'll try running with GCPROs for a while. Stefan