From owner-freebsd-java Sat Jan 25 2:50:28 2003 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 BEC6237B401 for ; Sat, 25 Jan 2003 02:50:26 -0800 (PST) Received: from smtpzilla3.xs4all.nl (smtpzilla3.xs4all.nl [194.109.127.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2A9B43ED8 for ; Sat, 25 Jan 2003 02:50:25 -0800 (PST) (envelope-from co9@xs4all.nl) Received: from xs4all.nl (a194-109-252-84.adsl.xs4all.nl [194.109.252.84]) by smtpzilla3.xs4all.nl (8.12.0/8.12.0) with ESMTP id h0PAmFMb083678; Sat, 25 Jan 2003 11:48:17 +0100 (CET) Message-ID: <3E326B6E.1080700@xs4all.nl> Date: Sat, 25 Jan 2003 11:48:14 +0100 From: Robin Schilham User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2.1) Gecko/20030121 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Greg Lewis Cc: freebsd-java@freebsd.org Subject: Re: jboss3 java core dump References: <3E3127D3.7030907@xs4all.nl> <20030125060352.A39692@misty.eyesbeyond.com> In-Reply-To: <20030125060352.A39692@misty.eyesbeyond.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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