[gclist] LinuxThreads+signals => SIGSEGV in system call?

David Chase chase@world.std.com
Wed, 29 Apr 1998 17:13:52 -0400


At 06:56 AM 4/30/98 +1000, Fergus Henderson wrote:
>I'm trying to port the Boehm (et al) conservative garbage collector
>to work with LinuxThreads.  I've got it to the point where
>it works *some* of the time.  The problem is that it sometimes
>fails, apparently getting a segmentation fault in a signal call.
>It generates a core file and when I examine the core file in gdb,
>the current instruction pointer is always just past the `int $80'
>instruction that invokes the system call.
>
>Any suggestions on how I can go about debugging this?

I'm not sure how Linux threads work, or how well gdb works
with them, but the gdb behavior you describe sounds an awful
lot like what I get debugging MT applications with gdb under
windows NT.  In my case, one thread is committing crimes, but
gdb points the finger at the sleeping thread.  My two workarounds
were to add a flag to disable OS threading (in case the bug
was reproducible w/o it) and to try Visual C++.  VC++ is probably
not much help for you under Linux, and if your problem thread-
related in the first place, disabling threads won't help either.

David