From: Rob McCool 
Newsgroups: netscape.devs-nsapi
Subject: Re: Posix Threads in NSAPI on Alpha OSF 3.2 - Core Dump
Date: Tue, 19 Nov 1996 17:42:17 -0800

> When I do posix thread calls within NSAPI functions on Dec OSF 3.2, my
> Server dumps core.  My .so has been linked with -lpthreads.
> 
> Is this incorrect? Are NSAPI functions required to use the mutex,
> semaphore and condition variable functions as described in the
> Programmers Guide?
> 
> Specifically, my code is doing a pthread_key_create when it crashes.
> However after commenting out this code, it just dumped core at the
> next uncommented pthread call.
> 
> Any help would be appreciated.

I'm not familiar enough with the internal workings of DEC's pthread
implementation to be sure what's happening. However one possibility is
that there's an initialization problem. The server does not use POSIX
threads under OSF/1 3.2, it uses our own implementation. This is because
the POSIX v.4 interface was missing primitives we needed to implement
the java VM. 

DEC's pthread library seems to require initialization from one of the
various crt0.o files. There is a function, pthread_init_routine defined
there which presumably is what isn't being called, because the server
isn't compiled with threading support turned on. You might want to
consult with DEC, to see if this is the case and see what they recommend
you do to initialize the threading library.
--
Rob McCool, robm@netscape.com http://home.netscape.com/people/robm/
Stunt Programmer, Netscape Communications Corporation
It was working ten minutes ago, I swear...
Reproduced by permission of the author.