unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
Cc: guile-devel@gnu.org
Subject: Re: Segmentation fault in CVS
Date: Wed, 14 Dec 2005 23:31:39 +0000	[thread overview]
Message-ID: <871x0fw90k.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <1134555647.13759.176.camel@localhost.localdomain> (Andy Wingo's message of "Wed, 14 Dec 2005 11:20:47 +0100")

Andy Wingo <wingo@pobox.com> 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 #<freed cell 0x2aaaabc6de30; GC missed a reference>
> 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


  reply	other threads:[~2005-12-14 23:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-07 20:01 Segmentation fault in CVS Neil Jerram
     [not found] ` <4397470B.3070505@gnu.org>
2005-12-09 14:09   ` Neil Jerram
2005-12-13 23:58 ` Neil Jerram
2005-12-14 10:20   ` Andy Wingo
2005-12-14 23:31     ` Neil Jerram [this message]
2005-12-14 21:49   ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871x0fw90k.fsf@ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).