From owner-freebsd-java@FreeBSD.ORG Sun Dec 7 09:12:10 2003 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4A5E16A4D0 for ; Sun, 7 Dec 2003 09:12:10 -0800 (PST) Received: from turing.morons.org (turing.morons.org [209.237.229.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDF2C43F93 for ; Sun, 7 Dec 2003 09:12:09 -0800 (PST) (envelope-from freebsd@spatula.net) Received: by turing.morons.org (Postfix, from userid 1001) id D476BA928; Sun, 7 Dec 2003 09:12:09 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by turing.morons.org (Postfix) with ESMTP id AC10DA927 for ; Sun, 7 Dec 2003 09:12:09 -0800 (PST) Date: Sun, 7 Dec 2003 09:12:09 -0800 (PST) From: Nick Johnson X-X-Sender: spatula@turing.morons.org To: freebsd-java@freebsd.org In-Reply-To: <20031206234011.Q24955@turing.morons.org> Message-ID: <20031207085003.J24955@turing.morons.org> References: <20031206234011.Q24955@turing.morons.org> X-what-happen: someone set up us the bomb X-Message-Flags: Spatula Precedence: special-delivery MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: fatal exception in 1.4.2-p5 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2003 17:12:10 -0000 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. Nick -- "The aptly-named morons.org is an obscenity-laced screed..." -- Robert P. Lockwood, Catholic League director of research Nick Johnson, version 2.1 http://web.morons.org/