From owner-freebsd-java@FreeBSD.ORG Sat Jun 18 23:38:46 2005 Return-Path: X-Original-To: freebsd-java@freebsd.org 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 F077016A41C for ; Sat, 18 Jun 2005 23:38:46 +0000 (GMT) (envelope-from oof@oof.org) Received: from ns8.oof.org (ns8.oof.org [64.147.161.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id CACB143D4C for ; Sat, 18 Jun 2005 23:38:46 +0000 (GMT) (envelope-from oof@oof.org) Received: from ns8.oof.org (localhost.oof.org [127.0.0.1]) by ns8.oof.org (8.13.4/8.13.4) with ESMTP id j5INcjPf078900 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Sat, 18 Jun 2005 16:38:46 -0700 (PDT) (envelope-from oof@oof.org) Received: (from oof@localhost) by ns8.oof.org (8.13.4/8.13.4/Submit) id j5INcjMi078899 for freebsd-java@freebsd.org; Sat, 18 Jun 2005 16:38:45 -0700 (PDT) (envelope-from oof@oof.org) Date: Sat, 18 Jun 2005 16:38:45 -0700 From: Oliver Fross To: freebsd-java@freebsd.org Message-ID: <20050618233845.GA62998@oof.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: JDK 1.5 from ports w/ threading problem solved X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2005 23:38:47 -0000 Hello- On FreeBSD 5.4 i386, I've had problems with multiple threaded applications under JDK 1.5.0, and have solved them using a patch and the ports version of jdk15. This was discussed in May, 2005 on this mailing list [1] and I am just confirming & documenting. For anyone wishing to repeat this success, the steps are quite simple: * Get the jdk15 port, PORTREVISION=2 from cvsup or just from [2] * I used jdk-1_5_0-src-scsl.zip & jdk-1_5_0-bin-scsl.zip from Sun [3] * Get the eyesbeyond patch: I used Patchset 1 from Greg Lewis [4] * Patch sources according to Arne Juul [1] [5] * make install! Thanks to Greg Lewis as always, and Arne Juul this time! Have others had similar success? Should this get added to the port by a committer? Or maybe Greg has this planned for patchset 2? --Oliver. [1] http://redirx.com/?3twj [2] http://redirx.com/?3twc [3] http://wwws.sun.com/software/java2/download.html [4] http://www.eyesbeyond.com/freebsddom/java/JDK15SCSLConfirm.html [5] diff -ru jdk15.orig/hotspot/src/os/bsd/vm/os_bsd.inline.hpp jdk15/hotspot/src/os/bsd/vm/os_bsd.inline.hpp --- jdk15.orig/hotspot/src/os/bsd/vm/os_bsd.inline.hpp Wed May 11 10:59:36 2005 +++ jdk15/hotspot/src/os/bsd/vm/os_bsd.inline.hpp Wed May 11 08:03:59 2005 @@ -29,10 +29,9 @@ inline bool os::allocate_stack_guard_pages() { assert(uses_stack_guard_pages(), "sanity check"); -// XXXBSD: ?? -// return thr_main(); -// return pthread_main_np(); - return true; + // since FreeBSD 4 uses malloc() for allocating the thread stack + // there is no need to do anything extra to allocate the guard pages + return false; } -- OOF