guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: broken GC


From: Tom Lord
Subject: Re: broken GC
Date: Mon, 6 Aug 2001 12:24:41 -0700 (PDT)

   From: Maciej Stachowiak <address@hidden>
   On 05Aug2001 11:08PM (-0700), Tom Lord wrote:
   > 
   > Is it really the case that there is no interest in fixing
   > the broken GC used in Guile?  If not, why not?
   > 

   By broken do you mean jsut the fact that it's conservative and
   therefore may, in theory, create immortal garbage? Or is there some
   specific bug you have in mind?


Some specific bugs.

I have seen a simple test suite program, used verify that weak hash
tables work, unreliably fail (i.e. fail in some runs, but not others).
Examination with GDB confirmed it was a conservative GC leak.

I have seen conservative-gc storage leaks while trying to write simple
scripts that should use a fixed amount of memory.

I think I recall seeing a socket based program fail to close a socket,
again due to conservative GC.

I have seen both Guile and Systas fail because GCC eliminated a dead
variable that was needed to protect a live value from conservative GC.
You can find "bug fixes" in the code for this one.  The bug fixes are
no easier than using an exact GC.   I don't have any particular reason
to be confident that more bugs of this sort don't already exist, or
that more won't be added as new code is added.

A single object leak caused by conservative GC can waste an
arbitrarily large amount of storage.

It isn't _that_ hard to write programs that have a high probability
of causing conservative GC leaks.

If someone asks "How reliable is Guile, given that it uses a
conservative GC?" the best you can say is "The problems you'll
encounter are usually at the low end of measurable."

I used to observe small (presumably conservative GC) leaks just
fromt he GC stats printed out by the REPL in very early releases
of Guile.  At the time I presumed the leaks were safe to ignore, but
in retrospect, after trying to tighten up Systas to the point of
being able to write a decent data sheet for it, that presumption
feels pretty stupid.

-t



reply via email to

[Prev in Thread] Current Thread [Next in Thread]