[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: disabling linuxthreads workaround
From: |
Chris Cramer |
Subject: |
Re: disabling linuxthreads workaround |
Date: |
Sat, 28 Jul 2001 16:19:02 -0500 |
User-agent: |
Mutt/1.2.5i |
On Sat, Jul 28, 2001 at 02:27:40PM +0200, Marius Vollmer wrote:
> Chris Cramer <address@hidden> writes:
>
> > I have had some problems with threads lately...
>
> Can you elaborate? What problems are you having? Maybe we can check
> for them directly.
Segfaults, mostly. When I ran Guile through gdb I noticed that it was
using pthread_create(), and for what I'm doing now I specifically want
to avoid clone().
At the moment, with the other patch to
scm_{add_to,remove_from}_port_table(), I can get Guile to segfault without
the pthread stuff enabled, but with pthreads it works fine. Go figure...
It would seem the problem is now related to stack allocation, but I looked
at the code and it seems fine. The only thing I saw was that the return
from malloc() isn't checked for NULL, but on most (all?) unix systems
it never does return NULL.
BTW when I do a backtrace from the segfault, it always happens during
garbage collection. Sometimes it hits scm_gc_heap_lock twice (at line
1068 in gc.c) and aborts; I haven't been able to duplicate that reliably
though.
I originally ran into this while testing some C, but I've been able to
get the same problem with that example Scheme program. When I change
it slightly to keep the use of open-file and close-port to one thread,
there are no segfaults.
--
C. Ray C. aka Christopher Cramer
address@hidden
http://www.pyro.net/~crayc/