Subject: Pth and (bogus?) STACK OVERFLOW
To: NetBSD Users <netbsd-users@netbsd.org>
From: B. James Phillippe <bryan-spamtrap1@darkforest.org>
List: netbsd-users
Date: 05/09/2002 16:42:09
Hello,

I'm working on a moderately complex pthread' application which runs on
Linux, NetBSD, SunOS and MacOS X(*).  I'm using GNU pth-1.4.1 (from
pkgsrc-current) for the NetBSD machine, which is 1.5.3_RC1/alpha.  To date
I have had really no problems with it.  However, after a recent update of
my application sources, I started bumping into something which I'm really
scratching my head over:

**Pth** STACK OVERFLOW: thread pid_t=0x120554c00, name="main.child@1020986634=0x120554400"

These seem to happen in the exact same location of my application, right on
entry of pthread_cond_wait().  It appears this is pth's way of saying I've
exhausted the stack space in the calling thread, though I can't see how
that could be happening and I don't have any problems with this code on any
other system I've tried it on.

I've found no work-around yet, and I'm curious to know if there is any
other evidence out there that this is actually a problem with pth and not
my application (yeah, every developer says that..)  Anyway, I'm curious to
know if any other NetBSD users have had problems like this with pth, and if
so, how to resolve it.  I do not believe using another pthreads package is
an option, because none of the ones I've tried are as compliant/code-clean
as pth.

(*) MacOS X currently has a broken pthreads implementation which is missing
some core pieces, so those pieces are selectively compiled out.  Other than
that, it works.

thanks,
-bp
--
# bryan_at_darkforest_dot_org
# Software Engineer