Date: Sun, 7 Dec 2003 14:29:14 -0500 (EST) From: Daniel Eischen <eischen@vigrid.com> To: Nick Johnson <freebsd@spatula.net> Cc: freebsd-java@freebsd.org Subject: Re: fatal exception in 1.4.2-p5 Message-ID: <Pine.GSO.4.10.10312071426310.1849-100000@pcnet5.pcnet.com> In-Reply-To: <20031207085003.J24955@turing.morons.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10312071426310.1849-100000>