[Gc] Problem with GC on FreeBSD
vmagerya at gmail.com
Wed Apr 18 15:25:53 PDT 2012
Petter Urkedal <urkedal at nbi.dk> wrote:
>> > I'll focus on this part first, since it's most directly related to the
>> > code I wrote. It seems the thread local freelists are the problem,
>> > maybe they are not initialized. The thread local key should be working
>> > now with -D USE_PTHREAD_SPECIFIC, right?
>> > But I'm wondering whether
>> > GC_init_thread_local gets called.
It is (via GC_init => GC_init_parallel => GC_init_thread_local).
>> > It may be worth trying to change
>> > pthread_create to GC_pthread_create in disclaim_test.c
Just tried that, got the same crash (with slightly different numbers,
but basically the same).
Note that I don't always get the crash in the debugger; sometimes it
just hangs (especially if I don't disable SIGUSR1 & SIGUSR2 interception).
>> > (or insert a call
>> > to GC_unregister_my_thread inside the thread call-back). If it makes a
>> > difference, this might be relevant for the above segfault, as well.
> Corr: "GC_unregister_my_thread" should read "GC_register_my_thread".
Doesn't seem to change anything (i.e. the same crash).
Is this the correct way to call it?
/* main thread */
/* subthreads */
More information about the Gc