[Top][All Lists]

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

[bug #29616] Hang waiting for the GC lock while traversing a weak hash t

From: Ludovic Courtès
Subject: [bug #29616] Hang waiting for the GC lock while traversing a weak hash table [1.9.10]
Date: Tue, 20 Apr 2010 09:02:08 +0000
User-agent: Mozilla/5.0 (GNU; rv: Gecko/20100107 IceCat/3.6 (like Firefox/3.6)


                 Summary: Hang waiting for the GC lock while traversing a
weak hash table [1.9.10]
                 Project: Guile
            Submitted by: civodul
            Submitted on: Tue 20 Apr 2010 09:02:07 AM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any



Buckets of weak hash tables are traversed with the GC allocation lock held. 
However, the `assoc' and `hash' function can be used defined and they can be
Scheme procedures.  When these Scheme procedures invoke the GC, they hang
waiting for the allocation lock:

#0  0x00007fada32eb114 in __lll_lock_wait ()
#1  0x00007fada32e6349 in _L_lock_1004 ()
#2  0x00007fada32e615e in pthread_mutex_lock ()
#3  0x00007fada350eea9 in GC_generic_malloc_many (lb=48, k=<value optimized
out>, result=0x7fada3732bc0)
    at mallocx.c:284
#4  0x00007fada3517fd8 in GC_malloc_atomic (bytes=48) at
#5  0x00007fada3c37465 in make_hash_table (flags=0, k=<value optimized out>,
func_name=<value optimized out>)
    at hashtab.c:240
#6  0x00007fada3c9f0f0 in vm_debug_engine (vm=<value optimized out>,
program=0x0, argv=<value optimized out>, 
    nargs=<value optimized out>) at vm-i-system.c:856
#7  0x00007fada3c37e26 in scm_c_run_hookn (hook=<value optimized out>,
argv=0x7fff6703dc90, nargs=1) at hooks.c:285
#8  0x00007fada3c95f0b in vm_dispatch_hook (vm=<value optimized out>,
hook_num=<value optimized out>) at vm.c:210
#9  0x00007fada3ca1ae2 in vm_debug_engine (vm=<value optimized out>,
program=0x356c8280, argv=<value optimized out>, 
    nargs=<value optimized out>) at vm-i-system.c:781
#10 0x00007fada3c24f59 in scm_call_2 (proc=0x356c8180, arg1=<value optimized
out>, arg2=<value optimized out>)
    at eval.c:580
#11 0x00007fada3c35575 in do_weak_bucket_assoc (data=<value optimized out>)
at hashtab.c:170
#12 0x00007fada350b271 in GC_call_with_alloc_lock (fn=0x7fada3c35540
    client_data=0x7fff6703de50) at finalize.c:925
#13 0x00007fada3c3691a in weak_bucket_assoc (table=0x356c8580, buckets=<value
optimized out>, bucket_index=0, 
    hash_fn=0xffffffffffffffff, assoc=0x7fada3732300 <GC_allocate_ml>,
object=0xe8c, closure=0x7fff6703df20)
    at hashtab.c:201
#14 0x00007fada3c36ae5 in scm_hash_fn_get_handle (table=0x356c8580,
    hash_fn=0x7fada3c36670 <scm_ihashx>, assoc_fn=0x7fada3c36630
<scm_sloppy_assx>, closure=0x7fff6703df20)
    at hashtab.c:503
#15 0x00007fada3c36baf in scm_hashx_get_handle (hash=0xfffffffffffffe00,
assoc=<value optimized out>, 
    table=0x7fada3732300, key=0x80) at hashtab.c:974

Reproduce with:

scheme@(guile-user)> (define t (make-doubly-weak-hash-table 12))
scheme@(guile-user)> (hashx-ref (lambda (obj n) (gc) (hash obj n)) (lambda
(obj alist) (gc) (assoc obj alist)) t 'foo)



Reply to this item at:


  Message sent via/by Savannah

reply via email to

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