Date: Sat, 13 Dec 2003 23:32:28 +0200 From: Alexey Zelkin <phantom@freebsd.org> To: Nick Johnson <freebsd@spatula.net> Cc: freebsd-java@freebsd.org Subject: Re: fatal exception in 1.4.2-p5 Message-ID: <20031213213228.GA61256@phantom.cris.net> In-Reply-To: <20031206234011.Q24955@turing.morons.org> References: <20031206234011.Q24955@turing.morons.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031213213228.GA61256>