From owner-freebsd-java@FreeBSD.ORG Sat Dec 13 13:32:37 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 27D9016A4CE for ; Sat, 13 Dec 2003 13:32:37 -0800 (PST) Received: from phantom.cris.net (phantom.cris.net [212.110.130.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8796A43D1F for ; Sat, 13 Dec 2003 13:32:32 -0800 (PST) (envelope-from ml@FreeBSD.org.ua) Received: from phantom.cris.net (ml@localhost [127.0.0.1]) by phantom.cris.net (8.12.10/8.12.10) with ESMTP id hBDLWUl7061292; Sat, 13 Dec 2003 23:32:30 +0200 (EET) (envelope-from ml@FreeBSD.org.ua) Received: (from ml@localhost) by phantom.cris.net (8.12.10/8.12.10/Submit) id hBDLWSj8061291; Sat, 13 Dec 2003 23:32:28 +0200 (EET) (envelope-from ml) Date: Sat, 13 Dec 2003 23:32:28 +0200 From: Alexey Zelkin To: Nick Johnson Message-ID: <20031213213228.GA61256@phantom.cris.net> References: <20031206234011.Q24955@turing.morons.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031206234011.Q24955@turing.morons.org> X-Operating-System: FreeBSD 4.9-STABLE i386 User-Agent: Mutt/1.5.5.1i cc: freebsd-java@freebsd.org Subject: Re: fatal exception in 1.4.2-p5 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2003 21:32:37 -0000 hi, On Sat, Dec 06, 2003 at 11:46:51PM -0800, Nick Johnson wrote: > Getting some of this tonight: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x280C32AF > Function=_flockfile_debug+0x2B > Library=/usr/lib/libc_r.so.4 > > Current Java thread: > at java.net.Inet6AddressImpl.getLocalHostName(Native Method) > at java.net.InetAddress.getLocalHost(InetAddress.java:1178) I'd be interesting if you'll try java with '-Djava.net.preferIPv4Stack=true' command line switch. And then try following patch: Index: Inet6AddressImpl.c =================================================================== RCS file: /home/jdk14-cvs/jdk142-src/j2se/src/solaris/native/java/net/Inet6AddressImpl.c,v retrieving revision 1.2 diff -u -r1.2 Inet6AddressImpl.c --- Inet6AddressImpl.c 16 Oct 2003 13:32:52 -0000 1.2 +++ Inet6AddressImpl.c 13 Dec 2003 21:32:30 -0000 @@ -49,8 +49,8 @@ /* Something went wrong, maybe networking is not setup? */ strcpy(hostname, "localhost"); } else { -#ifdef __linux__ - /* On Linux gethostname() says "host.domain.sun.com". On +#if defined(__linux__) || defined(__FreeBSD__) + /* On Linux/FreeBSD gethostname() says "host.domain.sun.com". On * Solaris gethostname() says "host", so extra work is needed. */ #else @@ -88,7 +88,7 @@ } } #endif /* AF_INET6 */ -#endif /* __linux__ */ +#endif /* __linux__ || __FreeBSD__ */ } return (*env)->NewStringUTF(env, hostname); }