fatal exception in 1.4.2-p5
Daniel Eischen
eischen at vigrid.com
Sun Dec 7 11:29:17 PST 2003
On Sun, 7 Dec 2003, Nick Johnson wrote:
> Here's a bit more information; when the fatal exception occurrs, the
> process starts chewing up a huge amount of CPU, but doing a thread dump on
> it reveals that none of the threads is actually doing anything.
>
> Also, it looks like getservent isn't threadsafe; libc_r does not provide
> its own implementation and getservent uses some static buffers... this in
> turn means that getaddrinfo isn't threadsafe. Indeed, the man page says
> as much under "BUGS".
>
> So either some locking needs to be added to
> /j2se/src/solaris/native/java/net/Inet6AddressImpl.c and net_util_md.c or
> getaddrinfo needs to be fixed to be threadsafe. I'd supply a patch to do
> the locking except I can't figure out a good place to init a mutex.
If all else fails, you can use pthread_once(3) or initially
set the mutex to PTHREAD_MUTEX_INITIALIZER.
--
Dan Eischen
More information about the freebsd-java
mailing list