From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: Emacs crashes Date: Wed, 15 Mar 2006 09:45:22 +1300 Message-ID: <17431.11106.207260.301400@kahikatea.snap.net.nz> References: <17429.54459.803236.351040@kahikatea.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1142369636 16306 80.91.229.2 (14 Mar 2006 20:53:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 14 Mar 2006 20:53:56 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 14 21:53:53 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FJGQA-000755-6X for ged-emacs-devel@m.gmane.org; Tue, 14 Mar 2006 21:47:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJGQ9-0000hU-PW for ged-emacs-devel@m.gmane.org; Tue, 14 Mar 2006 15:47:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FJGPu-0000g5-Qm for emacs-devel@gnu.org; Tue, 14 Mar 2006 15:46:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FJGPu-0000fT-3R for emacs-devel@gnu.org; Tue, 14 Mar 2006 15:46:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJGPu-0000fQ-0N for emacs-devel@gnu.org; Tue, 14 Mar 2006 15:46:54 -0500 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FJGU6-00073Z-Te; Tue, 14 Mar 2006 15:51:15 -0500 Original-Received: from kahikatea.snap.net.nz (p202-124-115-220.snap.net.nz [202.124.115.220]) by viper.snap.net.nz (Postfix) with ESMTP id 46133748C9B; Wed, 15 Mar 2006 09:46:44 +1300 (NZDT) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 27D0188EA; Wed, 15 Mar 2006 09:45:23 +1300 (NZDT) Original-To: Eli Zaretskii In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.50.78 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51628 Archived-At: > > 1) It hangs with some kind of mutex lock which I don't understand with a > > brief backtrace of three functions in libc, I think. The only thing I > > can do, after attaching with GDB, is kill it. > > Please show at least that short backtrace. It happened twice but I've lost the details, sorry. > > 2) A garbage collection related crash where mark_object is called > > recursively literally thousands of times, > > The fact that there are thousands of recursive calls to mark_object is > not in itself a sign of a problem. It is normal for the mark phase to > be deeply recursive. OK, I didn't know that. Perhaps I should look at the bottom of the backtrace (i.e low frame nos) instead of the top. > etc/DEBUG has some text on how to debug crashes during GC. Could you > try to use those techniques and see what data structure is corrupted? I don't have a live process to debug but I think I can get it to crash again. Anyway this is what I have found using the corefile: (gdb) p last_marked_index $1 = 482 (gdb) p last_marked[482] $2 = 173755437 (gdb) xtype Lisp_Cons (gdb) xcons $3 = (struct Lisp_Cons *) 0xa5b4c28 { car = 0x83bc641, u = { cdr = 0x837b8c9, chain = 0x837b8c9 } } (gdb) p last_marked[481] $4 = 167781611 (gdb) xtype Lisp_String (gdb) xcons $5 = (struct Lisp_Cons *) 0xa0024e8 { car = 0x4, u = { cdr = 0xffffffff, chain = 0xffffffff } } These last addresses looks suspect I don't know what to do next. Am I right to assume that 481 is the index of the very last marked object, 480 the one before etc. And that 482 is the index of the oldest marked object in the array held in a circular fashion? Incidentally with gdb-ui, if you display a watch expression in the speedbar and press 'p' on a component (with a live process), Emacs will print the s-expression in the GUD buffer. I've just extended it to work for arrays so you can quickly look at the s-expression of any element of last_marked, although I don't know if the others are of interest. -- Nick http://www.inet.net.nz/~nickrob