[Gc] Using non-gc phtreads with Boehm GC
Mon, 3 Nov 2003 10:29:48 -0800
Unfortunately, I think you're dealing with a section of the GC that
has been heavily modified by the Mono developers. You may have better luck on that list.
(There are plans to merge this again. But it hasn't happened yet. And the thread stopping
code is likely to use some Mono-specific callbacks anyway.)
Thread 18 initiated the collection. It's in linux_stop_world, which I believe is
a Mono-provided routine. Some other threads (e.g. 44,43) seem to be blocked trying to
execute a write system call from GC_suspend_handler(). The normal default
GC configuration doesn't try to write, except in case of error. It would be interesting
to know what's at line 678 of your version of linux_threads.c.
> -----Original Message-----
> From: firstname.lastname@example.org [mailto:email@example.com]On
> Behalf Of eric lindvall
> Sent: Sunday, November 02, 2003 5:18 PM
> To: Boehm, Hans
> Cc: 'firstname.lastname@example.org'
> Subject: [Gc] Using non-gc phtreads with Boehm GC
> I am using Mono to call into unmanaged code (using P/Invoke to call C
> These libraries end up creating threads with pthread_create(). The
> libraries are not compiled against the boehm libraries or
> include files,
> but the threads that are created by the libraries are not
> used by Mono.
> I've noticed that after "a while", the program becomes unresponsive.
> I used gdb to get a stacktrace of all the threads and have
> included it in
> this email.
> It seems that for whatever reason, all the threads are stuck in the
> suspended state. Is there something I need to do for threads
> that are not
> known to the GC to let them not be affected by the global-suspend for
> doing the collection?