Date: Sat, 25 Jan 2003 11:48:14 +0100 From: Robin Schilham <co9@xs4all.nl> To: Greg Lewis <glewis@eyesbeyond.com> Cc: freebsd-java@freebsd.org Subject: Re: jboss3 java core dump Message-ID: <3E326B6E.1080700@xs4all.nl> In-Reply-To: <20030125060352.A39692@misty.eyesbeyond.com> References: <list.freebsd.java#811472746.20030113124453@ua.fm> <3E3127D3.7030907@xs4all.nl> <20030125060352.A39692@misty.eyesbeyond.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Greg Lewis wrote: > On Fri, Jan 24, 2003 at 12:47:31PM +0100, Robin Schilham wrote: > >>Andriy Podanenko wrote: >> >>>Has anybody fix the problem ? >>>http://www.geocrawler.com/archives/3/162/2002/12/0/10270779/ >>>and the yet one: >>>jboss3 make java core dump on FreeBSD (5.0-RELENG) >>> jdk13 from ports (patchset 7) >>> jboss3 from ports >>> >>> >>>To Unsubscribe: send mail to majordomo@FreeBSD.org >>>with "unsubscribe freebsd-java" in the body of the message >> >>I had the same problem with jboss3 with jdk-1.3.1p7_2 on FreeBSD >>5.0-RELEASE. It seems that the SIGBUS is cause by line 311 of >>j2sdk1.3.1/src/solaris/native/java/net/InetAddressImpl.c. After >>inserting some debugging output, it turned out that the test >>at line 308 should be >> if (hp == NULL || hp == -1) { >>instead of >> if (hp == NULL) { >>Of course this should be considered as a temporary workaround. > > > I just looked at the code in question and it seems to mix int and > struct hostent * with merry abandon. Yuck. I think a better fix is to > change the prototype of copy_hostent on line 470 to static HOST_RETURN > and change return (-1) to return (HOST_R_BAD) on line 504. I haven't > tested this yet though. Comments? > The changes that you proposed do not seem to solve the problem. The value of hp is still -1 in some cases, which causes the SIGBUS at line 311. The following java class illustrates the problem: import java.net.*; import java.io.*; public class Crash { public static void main(String[] args) { int port = 8083; InetAddress bindAddress = null; int backlog = 50; ServerSocket server = null; try { server = new ServerSocket(port, backlog, bindAddress); // the following statement causes a SIGBUS: System.out.println("Started server: " + server); } catch (IOException e) { System.out.println("caught exception: " + e); } } } Regards, Robin Schilham To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E326B6E.1080700>