[Top][All Lists]

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

Re: possible gc/weak hash table bug

From: Andy Wingo
Subject: Re: possible gc/weak hash table bug
Date: Thu, 28 Apr 2011 11:52:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi Michael,

On Fri 25 Mar 2011 22:48, michaelawells <address@hidden> writes:

>     On Fri 18 Mar 2011 12:51, address@hidden (Ludovic CourtÃs) writes:
>     > michaelawells <address@hidden> writes:
>     >
>     >>>   size_t len = SCM_HASHTABLE_N_ITEMS (table);
>     >>> 
>     >>>   while (k--)
>     >>>     {
>     >>>       size_t removed;
>     >>>       SCM alist = SCM_SIMPLE_VECTOR_REF (buckets, k);
>     >>>       alist = scm_fixup_weak_alist (alist, &removed);  <<<**** FAILS 
>     >>>       assert (removed <= len);
>     >
>     Michael, how are you using this hash table?  Are you accessing it from
>     different pthreads?  What version of libgc are you using?  (Did you
>     enable parallel collection?)
> I'm not using weak hash tables in my code.  Weak hash tables are used
> in modules such as (ice-9 boot-9) and (ice-9 popen), and from C code,
> such as libguile/symbols.c.
> I'm using gc-7.1.  I didn't use any special options when building
> libgc.  I'll try rebuilding libgc using the "--enable-threads=posix"
> configure option and see if I still see the problem.  (Is that what
> you meant by enabling parallel collection?  If so, perhaps the README
> file should updated to say this is necessary.)

I referred to an option of libgc called "parallel marking", which you
have to enable when you build libgc.  I'm assuming you did not enable
it.  (What platform are you on?  I suspect that we have not tested all
of the possible gentoo configurations, for example.)  You can find this
out by calling GC_get_parallel() once guile is initialized.

The --enable-threads=posix is indeed the default, and makes Guile
threadsafe and adds support for threads within Guile.

> I'm not using guile from multiple threads, but I am running guile from
> a thread in a multi-threaded program.  (I've been using guile since
> before it had support for multiple threads.  So, I constructed the
> test harness so that guile is called from a single thread.)

OK, this is good.  Can you test again with 2.0.1?  



reply via email to

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