From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: Segmentation fault in CVS Date: Wed, 14 Dec 2005 23:31:39 +0000 Message-ID: <871x0fw90k.fsf@ossau.uklinux.net> References: <87ek4oekxs.fsf@ossau.uklinux.net> <873bkwy2fs.fsf@ossau.uklinux.net> <1134555647.13759.176.camel@localhost.localdomain> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134606766 16521 80.91.229.2 (15 Dec 2005 00:32:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2005 00:32:46 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Dec 15 01:32:35 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Emh0y-0001N2-Vi for guile-devel@m.gmane.org; Thu, 15 Dec 2005 01:30:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Emh1a-0002lc-Qo for guile-devel@m.gmane.org; Wed, 14 Dec 2005 19:31:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Emg8a-0005tB-8X for guile-devel@gnu.org; Wed, 14 Dec 2005 18:34:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Emg8G-0005qg-Pm for guile-devel@gnu.org; Wed, 14 Dec 2005 18:34:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Emg8G-0005qb-D9 for guile-devel@gnu.org; Wed, 14 Dec 2005 18:34:00 -0500 Original-Received: from [80.84.72.33] (helo=mail3.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EmgAN-0005tS-6M for guile-devel@gnu.org; Wed, 14 Dec 2005 18:36:13 -0500 Original-Received: from laruns (host86-129-132-201.range86-129.btcentralplus.com [86.129.132.201]) by mail3.uklinux.net (Postfix) with ESMTP id 3CDE7409FE3; Wed, 14 Dec 2005 23:33:06 +0000 (UTC) Original-Received: from laruns (laruns [127.0.0.1]) by laruns (Postfix) with ESMTP id BA7636F719; Wed, 14 Dec 2005 23:31:39 +0000 (GMT) Original-To: Andy Wingo In-Reply-To: <1134555647.13759.176.camel@localhost.localdomain> (Andy Wingo's message of "Wed, 14 Dec 2005 11:20:47 +0100") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5522 Archived-At: Andy Wingo writes: > Hi, > > On Tue, 2005-12-13 at 23:58 +0000, Neil Jerram wrote: >> read_without_guile_data *data = (read_without_guile_data *)data; > > Didn't fix the issue for me, same symptoms. Can't run pre-inst-guile; it > gives me: > > (pygst gst) wingo@videoscale:~/src/guile/guile-core$ ./pre-inst-guile > ERROR: In procedure memoization: > ERROR: Bad binding # > in expression [...] Well this obviously looks like a GC problem, and it's always tricky to know where to start when debugging such problems. It might help to know what the freed cell was before the GC set its car to scm_tc_free_cell. Do you get the same freed cell address repeatedly? If so, you can add code to print out the cell just before the places that set its car (i.e. gc-card.c lines 258 and 292), something like: if (SCM_UNPACK (scmptr) == 0x2aaaabc6de30) { scm_write (scmptr, SCM_UNDEFINED); scm_newline (SCM_UNDEFINED); } Otherwise, it just occurred to me to wonder more about why we need the fix from Ludovic that I applied a few days ago. Why is there a window between the creation of a GC card and its being initialized by scm_i_init_card_freelist? Given that there is a window, can a cell be allocated from the card before scm_i_init_card_freelist is called? If it can, that would explain this bug, before scm_i_init_card_freelist unconditionally sets all cells' car to scm_tc_free_cell. That's as far as I can get for tonight. Neil _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel