Skip to content

HEAP_ALLOCED() is not thread-safe

Hi, I have a program that seems to run into occasional garbage collection-related core dumps. The problem typically only occurs after the program has been running for a while and is consuming a large amount of memory (5 - 16GB). The large memory consumption is expected because the program analyzes very large traces from verilog simulation and needs to maintain !IntMaps with hundreds of thousands of entries.

Is this a bug that I should report?I am afraid that my employer will not allow me to share my source code. I do have a stack trace, below. This was obtained using ghc 6.10.1, RTS -N2 on an x86-64 RHEL 4 machine.

Is there something I can do trace the problem or avoid it?

Thanks. PS: This is my first Haskell program and one of the most complicated I ever wrote, in any language. Using Haskell has been (mostly :-)) a joy.

(gdb) where  
#0  0x0000000000612f40 in slowIsHeapAlloced ()

#1  0x000000000060f868 in evacuate ()

#2  0x0000000000618d12 in scavenge_block ()

#3  0x0000000000617c8d in scavenge_loop ()

#4  0x0000000000610b25 in scavenge_until_all_done ()

#5  0x0000000000610d02 in gc_thread_entry ()

#6  0x000000000064859d in start_thread (arg=<value optimized out>)
    at pthread_create.c:297

#7  0x000000000069e739 in clone ()

#8  0x0000000000000000 in ?? ()
Edited by Simon Marlow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information