From owner-freebsd-java@freebsd.org Tue Feb 9 22:39:01 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82F1DAA37F7 for ; Tue, 9 Feb 2016 22:39:01 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 5FCB9F32 for ; Tue, 9 Feb 2016 22:39:01 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: by mailman.ysv.freebsd.org (Postfix) id 5AE8BAA37F5; Tue, 9 Feb 2016 22:39:01 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FDE2AA37F4 for ; Tue, 9 Feb 2016 22:39:01 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from mail.timestudybuddy.com (mail.timestudybuddy.com [72.29.186.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80053F31 for ; Tue, 9 Feb 2016 22:38:59 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from [192.168.0.2] (66-169-227-8.dhcp.gvrb.ca.charter.com [66.169.227.8]) (authenticated bits=0) by mail.timestudybuddy.com (8.15.2/8.14.9) with ESMTPSA id u19MSIoa019477 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Feb 2016 14:28:19 -0800 (PST) (envelope-from openjdk@getsnappy.com) X-Authentication-Warning: mailA.getsnappy.com: Host 66-169-227-8.dhcp.gvrb.ca.charter.com [66.169.227.8] claimed to be [192.168.0.2] Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: Helping out with JDK 9 on BSD From: Brian Gardner In-Reply-To: <56B45453.9020006@oracle.com> Date: Tue, 9 Feb 2016 14:36:24 -0800 Cc: Greg Lewis , java@freebsd.org Message-Id: References: <56ADE7D4.8020107@oracle.com> <56ADE943.6020103@oracle.com> <8B9ACABA-F9B2-4288-9DB5-CA843DE48C34@getsnappy.com> <20160203034053.GA36170@misty.eyesbeyond.com> <56B45453.9020006@oracle.com> To: Magnus Ihse Bursie X-Mailer: Apple Mail (2.3112) X-Mailman-Approved-At: Tue, 09 Feb 2016 23:16:00 +0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2016 22:39:01 -0000 Hi Greg and Magnus, I=E2=80=99ve attached the patches needed to build and compile on = Freebsd. I=E2=80=99ve reverted my changes to TLS, and done more = debugging there. There appears to be two separate issues. One issue = was that the implementation of OS::bad::gettid() was somehow clearing = the current thread previously set with pthread_setspecific. I was able = to fix this by porting logic from bad-port/jdk8, see = hotspot__os_bd_cpp__getthreadid.patch. The second issue seems to be = related to certain types of threads never getting their destructor = called and therefor not clearing pthread_setspecific and resulting in = Thread 803c59000 has exited with leftover thread-specific data after 4 = destructor iterations, errors. This one I haven=E2=80=99t tracked down = yet and will continue looking into. While I can compile and execute = HelloWorld, I=E2=80=99m getting a ton of these benign yet annoying = messages from ConcurrentGC and Worker threads. I=E2=80=99ll continue = looking into that next week. > On Feb 4, 2016, at 11:50 PM, Magnus Ihse Bursie = wrote: >=20 > On 2016-02-04 01:29, Brian Gardner wrote: >> Hi Greg, >> Great to hear from you, it=E2=80=99s been a while since I took on one = of these projects, but I do follow the java@freebsd mailing list and see = all the work you put in. I must tell you how greatly your work is = appreciated by me and I=E2=80=99m sure the rest of the community. I = have good news, with fairly minimal changes I have it compiling, = building HelloWorld, and running HelloWorld all without errors. >>=20 >> I think it=E2=80=99ll break down into 4 change sets, >> NM - I ported some code from = bsd-port/jdk8/hotspot/make/bsd/makefiles/build_vm_def.sh that fixes a = compile error=20 >> SUPPORT_RESERVED_STACK_AREA - define SUPPORT_RESERVED_STACK_AREA for = _ALLBSD_SOURCE >> Serviceability Agent - ported from bad-port/jdk8, currently compiles = but hasn=E2=80=99t been tested >> TLS - there is problems with the TLS in jdk9 used for = Thread::current(). This caused several issues for me and while the fix = was relatively straight forward in using THREAD_LOCAL_DECL completely in = place of TLS completely, I=E2=80=99d imagine there was a reason it was = implemented in sort of a Hybrid fashion alongside TLS. >=20 > There is a reason. It is very well described in this comment: > = https://bugs.openjdk.java.net/browse/JDK-8132510?focusedCommentId=3D138665= 05 = >=20 > The TL;DR: in some circumstances the JVM can crash if we do not set up = an initial TLS. On the other hand, this was for glibc, so maybe this = situation does not arise for FreeBSD. >=20 >>=20 >> It would be great if I could post these as web reviews for others to = review. Greg, would getting access to bsd-port/jdk9 allow us to = collaborate through web reviews? =20 >=20 >=20 >> Magnus, do you think using bsd-port/jdk9 for this purpose be a step = towards getting these basic changes into the jdk9 mainline, or would = your colleagues think "if they have bsd-port/jdk9, why bother with = integrating them into the jdk9 mainline?=E2=80=9D >=20 > I think putting these changes in bsd-port/jdk9 is very reasonable, and = I do not believe it will in any way hinder their acceptance into jdk9 = mainline. The only thing to be careful about there, though, is that all = contributors have signed the OCA (Oracle contributor agreement). Mixing = in "legally bad" code can present a real problem for adoption into = mainline. >=20 > /Magnus >=20 >>=20 >> Brian Gardner >>=20 >>> On Feb 2, 2016, at 7:40 PM, Greg Lewis < = glewis@eyesbeyond.com = > wrote: >>>=20 >>> On Sun, Jan 31, 2016 at 06:57:26AM -0800, Brian Gardner wrote: >>>> I???m interested in helping. I ported openjdk6 to freebsd and also = helped out with openjdk8. >>>>=20 >>>> Brian Gardner >>>=20 >>> I'd love to see as much of these changes get into the jdk9 mainline. = My time >>> is really limited for the next couple of weeks though. If it would = help you >>> or Magnus to use the bsd-port repo to stage changes then that would = be >>> great too. Let me do a merge to make sure it is up to date with = mainline. >>> Notionally we'd have to do a vote to get you both access I think? = But I >>> can shepherd changes in if that will help with sharing them. >>>=20 >>> FWIW, in terms of taking responsibility, I've been regularly = updating the >>> repos for jdk8 and jdk7 for a couple of years. I'm happy to keep = jdk9 >>> building if that is what is being looked for there and also port = more of >>> the BSD changes for jdk8 as appropriate. >>>=20 >>> - Greg >>>=20 >>>>> On Jan 31, 2016, at 3:00 AM, Magnus Ihse Bursie = > = wrote: >>>>>=20 >>>>> On 2016-01-31 11:54, Magnus Ihse Bursie wrote: >>>>>> Hi, >>>>>>=20 >>>>>> [TL;DR: I'm offering patches to compile JDK 9 on FreeBSD, but = it's not clear where to put them, or how.] >>>>>>=20 >>>>>> I'm working at Oracle on the OpenJDK build team and is = responsible for large parts of the build system of OpenJDK. Lately, I've = been playing around with FreeBSD (and other BSDs) in my free time, and = I've written a patch that will add build system support for FreeBSD, = OpenBSD and NetBSD in JDK 9 (tracked in = https://bugs.openjdk.jav= a.net/browse/JDK-8147795 = ). >>>>>>=20 >>>>>> I started writing this when I realized that the jdk9 branch in = the OpenJDK bsd-port repository did not contain any BSD-specific changes = at all, and the old JDK 8 changes will not readily be portable, due to = major changes in the build system between JDK 8 and JDK 9. >>>>>>=20 >>>>>> I thought it would be a no-brainer to integrate these changes = into the JDK 9 mainline, so they would be in place for whenever you guys = would start to attack porting the code base. However, some of my = collegues thought otherwise. The end result, I think, is that they = wanted to see someone (not necessarily a company, the FreeBSD = organisation for instance seemed to be okay), to step forward and say = "we take responsibility for the BSD port", and give some kind of = commitment to actually use these build changes in producing a viable = port. You can read the mail conversation here: = http://mail.openjdk.java.net/pipermail/build-dev/2016-January/016421.html= = >>>>>=20 >>>>> I forgot to add that I'm willing to help with build issues for the = BSD port, as far as my (like everybode else's) limited free time allows = me. Unfortunately, I'm still a noob at BSD internals and can't really = help with much apart from that. >>>>>=20 >>>>> /Magnus >>>>>=20 >>>>>=20 >>>>>>=20 >>>>>> An alternative to pushing this code into the JDK 9 mainline is of = course to push it to the bsd-port/jdk9 repo (given that the owners of = that repo approves), but that seems like a less favourable solution. = Having the code in the mainline does not mean that it gets tested = automatically, but it means that it will be part of e.g. refactoring, = that would otherwise break a downstream patchset. >>>>>>=20 >>>>>> I cc:ed this conversation to the = bsd-port-dev@openjdk.java.net = mailing list, but never got any = kind of official response there. Since this list seems more active, I'm = trying here instead. :) >>>>>>=20 >>>>>> So, I'm offering two patches here, one that applies to the build = system, is nice and clean, and possible to integrate into JDK 9 = mainline, if my collegues are convinced that someone is backing up the = BSD port. And there's a second patch, which fixes broken C/C++/Java code = and results in a product that can at least run "javac HelloWorld", but = this is not yet clean enough for integration anywere, at least not the = JDK 9 mainline. (I don't know enough of the BSD internals to fix all = problems, so there's some "#if 0" code here and there.) >>>>>>=20 >>>>>> /Magnus >>>>>>=20 >>>>>> _______________________________________________ >>>>>> freebsd-java@freebsd.org = mailing list >>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = >>>>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org" = >>>>>=20 >>>>> _______________________________________________ >>>>> freebsd-java@freebsd.org = > = mailing list >>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > >>>>> To unsubscribe, send any mail to " = freebsd-java-unsubscribe@free= bsd.org < = mailto:freebsd-java-unsubscri= be@freebsd.org >" >>>>=20 >>>> _______________________________________________ >>>> freebsd-java@freebsd.org mailing = list >>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = >>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org" = >>>=20 >>> --=20 >>> Greg Lewis Email : = glewis@eyesbeyond.com = >>> Eyes Beyond Web : = http://www.eyesbeyond.com = >>> Information Technology FreeBSD : = glewis@FreeBSD.org = >>> _______________________________________________ >>> freebsd-java@freebsd.org mailing = list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = >>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = " >>=20 >=20 >=20 From owner-freebsd-java@freebsd.org Wed Feb 10 12:23:59 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 209B5AA1561 for ; Wed, 10 Feb 2016 12:23:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 0C7581B36 for ; Wed, 10 Feb 2016 12:23:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 0C1A1AA1560; Wed, 10 Feb 2016 12:23:59 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BB28AA155F for ; Wed, 10 Feb 2016 12:23:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F14931B35 for ; Wed, 10 Feb 2016 12:23:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u1ACNwUQ042106 for ; Wed, 10 Feb 2016 12:23:58 GMT (envelope-from bugzilla-noreply@freebsd.org) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: maintainer-feedback requested: [Bug 207076] java/linux-oracle-jre18: update to 8u74 Date: Wed, 10 Feb 2016 12:23:59 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: java@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 12:23:59 -0000 Piotr Kubaj has reassigned Bugzilla Automation 's request for maintainer-feedback to java@FreeBSD.or= g: Bug 207076: java/linux-oracle-jre18: update to 8u74 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207076 --- Description --- Created attachment 166828 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D166828&action= =3Dedit 8u74 The following diff updates the port to the newest version. From owner-freebsd-java@freebsd.org Wed Feb 10 12:23:59 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49B23AA1565 for ; Wed, 10 Feb 2016 12:23:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 350021B38 for ; Wed, 10 Feb 2016 12:23:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 34A21AA1563; Wed, 10 Feb 2016 12:23:59 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34444AA1562 for ; Wed, 10 Feb 2016 12:23:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 250931B37 for ; Wed, 10 Feb 2016 12:23:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u1ACNwUS042106 for ; Wed, 10 Feb 2016 12:23:59 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 207076] java/linux-oracle-jre18: update to 8u74 Date: Wed, 10 Feb 2016 12:23:59 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: pkubaj@anongoth.pl X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: java@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 12:23:59 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207076 Bug ID: 207076 Summary: java/linux-oracle-jre18: update to 8u74 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: java@FreeBSD.org Reporter: pkubaj@anongoth.pl Assignee: java@FreeBSD.org Flags: maintainer-feedback?(java@FreeBSD.org) Created attachment 166828 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D166828&action= =3Dedit 8u74 The following diff updates the port to the newest version. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-java@freebsd.org Wed Feb 10 12:31:57 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16AEDAA19F3 for ; Wed, 10 Feb 2016 12:31:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 02DE71EC4 for ; Wed, 10 Feb 2016 12:31:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 02430AA19F2; Wed, 10 Feb 2016 12:31:57 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01DAEAA19F1 for ; Wed, 10 Feb 2016 12:31:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7B2D1EC3 for ; Wed, 10 Feb 2016 12:31:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u1ACVuco091377 for ; Wed, 10 Feb 2016 12:31:56 GMT (envelope-from bugzilla-noreply@freebsd.org) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: maintainer-feedback requested: [Bug 207077] java/linux-oracle-jdk18: update to 8u74 Date: Wed, 10 Feb 2016 12:31:56 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: java@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 12:31:57 -0000 Piotr Kubaj has reassigned Bugzilla Automation 's request for maintainer-feedback to java@FreeBSD.or= g: Bug 207077: java/linux-oracle-jdk18: update to 8u74 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207077 --- Description --- Created attachment 166829 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D166829&action= =3Dedit 8u74 The following patch updates linux-oracle-jdk18 to the newest version. From owner-freebsd-java@freebsd.org Wed Feb 10 12:31:57 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E8BEAA19F8 for ; Wed, 10 Feb 2016 12:31:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 2A1501EC6 for ; Wed, 10 Feb 2016 12:31:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 29935AA19F6; Wed, 10 Feb 2016 12:31:57 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2936BAA19F5 for ; Wed, 10 Feb 2016 12:31:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A4EE1EC5 for ; Wed, 10 Feb 2016 12:31:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u1ACVucq091377 for ; Wed, 10 Feb 2016 12:31:56 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 207077] java/linux-oracle-jdk18: update to 8u74 Date: Wed, 10 Feb 2016 12:31:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: pkubaj@anongoth.pl X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: java@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 12:31:57 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207077 Bug ID: 207077 Summary: java/linux-oracle-jdk18: update to 8u74 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: java@FreeBSD.org Reporter: pkubaj@anongoth.pl Flags: maintainer-feedback?(java@FreeBSD.org) Assignee: java@FreeBSD.org Created attachment 166829 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D166829&action= =3Dedit 8u74 The following patch updates linux-oracle-jdk18 to the newest version. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-java@freebsd.org Thu Feb 11 01:15:18 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A3A3AA59F7 for ; Thu, 11 Feb 2016 01:15:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 85962C3F for ; Thu, 11 Feb 2016 01:15:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 850F6AA59F6; Thu, 11 Feb 2016 01:15:18 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84A96AA59F5 for ; Thu, 11 Feb 2016 01:15:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75949C3E for ; Thu, 11 Feb 2016 01:15:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u1B1FIHm019696 for ; Thu, 11 Feb 2016 01:15:18 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 207077] java/linux-oracle-jdk18: update to 8u74 Date: Thu, 11 Feb 2016 01:15:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: java@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2016 01:15:18 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207077 --- Comment #1 from commit-hook@freebsd.org --- A commit references this bug: Author: jkim Date: Thu Feb 11 01:14:28 UTC 2016 New revision: 408670 URL: https://svnweb.freebsd.org/changeset/ports/408670 Log: Update to 8u74. PR: 207077 Changes: head/java/linux-oracle-jdk18/Makefile head/java/linux-oracle-jdk18/distinfo --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-java@freebsd.org Thu Feb 11 01:16:20 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1EF9AA5A8F for ; Thu, 11 Feb 2016 01:16:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id CD58AD5B for ; Thu, 11 Feb 2016 01:16:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id CCC22AA5A8E; Thu, 11 Feb 2016 01:16:20 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC5BBAA5A8D for ; Thu, 11 Feb 2016 01:16:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD4A4D5A for ; Thu, 11 Feb 2016 01:16:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u1B1GKcj021335 for ; Thu, 11 Feb 2016 01:16:20 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 207076] java/linux-oracle-jre18: update to 8u74 Date: Thu, 11 Feb 2016 01:16:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: java@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2016 01:16:21 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207076 --- Comment #1 from commit-hook@freebsd.org --- A commit references this bug: Author: jkim Date: Thu Feb 11 01:15:19 UTC 2016 New revision: 408671 URL: https://svnweb.freebsd.org/changeset/ports/408671 Log: Update to 8u74. PR: 207076 Changes: head/java/linux-oracle-jre18/Makefile head/java/linux-oracle-jre18/distinfo --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-java@freebsd.org Thu Feb 11 01:17:37 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B15A1AA5B73 for ; Thu, 11 Feb 2016 01:17:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 9C81BF05 for ; Thu, 11 Feb 2016 01:17:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 9BFE6AA5B72; Thu, 11 Feb 2016 01:17:37 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B99CAA5B71 for ; Thu, 11 Feb 2016 01:17:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C61EF04 for ; Thu, 11 Feb 2016 01:17:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u1B1HbaX023107 for ; Thu, 11 Feb 2016 01:17:37 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 207077] java/linux-oracle-jdk18: update to 8u74 Date: Thu, 11 Feb 2016 01:17:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jkim@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: java@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_status resolution cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2016 01:17:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207077 Jung-uk Kim changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Closed Resolution|--- |FIXED CC| |jkim@FreeBSD.org --- Comment #2 from Jung-uk Kim --- Committed (with a distinfo fix), thanks! --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-java@freebsd.org Thu Feb 11 01:18:00 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9E1AAA5BA1 for ; Thu, 11 Feb 2016 01:18:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id D5121F3B for ; Thu, 11 Feb 2016 01:18:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id D47EBAA5BA0; Thu, 11 Feb 2016 01:18:00 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D415FAA5B9F for ; Thu, 11 Feb 2016 01:18:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4C69F3A for ; Thu, 11 Feb 2016 01:18:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u1B1I0xe023634 for ; Thu, 11 Feb 2016 01:18:00 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 207076] java/linux-oracle-jre18: update to 8u74 Date: Thu, 11 Feb 2016 01:18:01 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jkim@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: java@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_status cc resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2016 01:18:01 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207076 Jung-uk Kim changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Closed CC| |jkim@FreeBSD.org Resolution|--- |FIXED --- Comment #2 from Jung-uk Kim --- Committed, thanks! --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-java@freebsd.org Thu Feb 11 06:46:40 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C331AA5809 for ; Thu, 11 Feb 2016 06:46:40 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 812A71E16 for ; Thu, 11 Feb 2016 06:46:40 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: by mailman.ysv.freebsd.org (Postfix) id 7D5F0AA5808; Thu, 11 Feb 2016 06:46:40 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CD57AA5807 for ; Thu, 11 Feb 2016 06:46:40 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from mail.timestudybuddy.com (mail.timestudybuddy.com [72.29.186.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E59C21E13 for ; Thu, 11 Feb 2016 06:46:39 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from [192.168.0.2] (66-169-227-8.dhcp.gvrb.ca.charter.com [66.169.227.8]) (authenticated bits=0) by mail.timestudybuddy.com (8.15.2/8.14.9) with ESMTPSA id u1B6bV96011768 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Feb 2016 22:37:32 -0800 (PST) (envelope-from openjdk@getsnappy.com) X-Authentication-Warning: mailA.getsnappy.com: Host 66-169-227-8.dhcp.gvrb.ca.charter.com [66.169.227.8] claimed to be [192.168.0.2] Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: Helping out with JDK 9 on BSD From: Brian Gardner In-Reply-To: Date: Wed, 10 Feb 2016 22:45:39 -0800 Cc: java@freebsd.org Message-Id: <1C39812E-E596-47E6-AB45-0A591A017FFB@getsnappy.com> References: <56ADE7D4.8020107@oracle.com> <56ADE943.6020103@oracle.com> <8B9ACABA-F9B2-4288-9DB5-CA843DE48C34@getsnappy.com> <20160203034053.GA36170@misty.eyesbeyond.com> <56B45453.9020006@oracle.com> To: Magnus Ihse Bursie , Greg Lewis X-Mailer: Apple Mail (2.3112) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2016 06:46:40 -0000 Hello again Greg and Magnus, I finished up researching the leftover thread-specific data after 4 = destructor iterations issue. It looks like it=E2=80=99s currently = functioning on Freebsd the same way it does on Linux, the only = difference is that Freebsd output that warning were Linux silently stops = after it=E2=80=99s forth try. I looked into how openjdk8 was working = and it looks like there were calls to TLS::set_thread(NULL) scattered = throughout the code base at the end of some ::run methods. I=E2=80=99ve = mimicked that behavior in the necessary spots with the following patch. = I can=E2=80=99t help but think there must be a better way to get these = Thread=E2=80=99s destructors called, and I tried that in place of making = clear_thread_current public and calling it directly, but it resulted in = deadlock. > On Feb 9, 2016, at 2:36 PM, Brian Gardner = wrote: >=20 > Hi Greg and Magnus, > I=E2=80=99ve attached the patches needed to build and compile on = Freebsd. I=E2=80=99ve reverted my changes to TLS, and done more = debugging there. There appears to be two separate issues. One issue = was that the implementation of OS::bad::gettid() was somehow clearing = the current thread previously set with pthread_setspecific. I was able = to fix this by porting logic from bad-port/jdk8, see = hotspot__os_bd_cpp__getthreadid.patch. The second issue seems to be = related to certain types of threads never getting their destructor = called and therefor not clearing pthread_setspecific and resulting in = Thread 803c59000 has exited with leftover thread-specific data after 4 = destructor iterations, errors. This one I haven=E2=80=99t tracked down = yet and will continue looking into. While I can compile and execute = HelloWorld, I=E2=80=99m getting a ton of these benign yet annoying = messages from ConcurrentGC and Worker threads. I=E2=80=99ll continue = looking into that next week. >=20 >=20 >> On Feb 4, 2016, at 11:50 PM, Magnus Ihse Bursie = > = wrote: >>=20 >> On 2016-02-04 01:29, Brian Gardner wrote: >>> Hi Greg, >>> Great to hear from you, it=E2=80=99s been a while since I took on = one of these projects, but I do follow the java@freebsd mailing list and = see all the work you put in. I must tell you how greatly your work is = appreciated by me and I=E2=80=99m sure the rest of the community. I = have good news, with fairly minimal changes I have it compiling, = building HelloWorld, and running HelloWorld all without errors. >>>=20 >>> I think it=E2=80=99ll break down into 4 change sets, >>> NM - I ported some code from = bsd-port/jdk8/hotspot/make/bsd/makefiles/build_vm_def.sh that fixes a = compile error=20 >>> SUPPORT_RESERVED_STACK_AREA - define SUPPORT_RESERVED_STACK_AREA for = _ALLBSD_SOURCE >>> Serviceability Agent - ported from bad-port/jdk8, currently compiles = but hasn=E2=80=99t been tested >>> TLS - there is problems with the TLS in jdk9 used for = Thread::current(). This caused several issues for me and while the fix = was relatively straight forward in using THREAD_LOCAL_DECL completely in = place of TLS completely, I=E2=80=99d imagine there was a reason it was = implemented in sort of a Hybrid fashion alongside TLS. >>=20 >> There is a reason. It is very well described in this comment: >> = https://bugs.openjdk.java.net/browse/JDK-8132510?focusedCommentId=3D138665= 05 = = > >>=20 >> The TL;DR: in some circumstances the JVM can crash if we do not set = up an initial TLS. On the other hand, this was for glibc, so maybe this = situation does not arise for FreeBSD. >>=20 >>>=20 >>> It would be great if I could post these as web reviews for others to = review. Greg, would getting access to bsd-port/jdk9 allow us to = collaborate through web reviews? =20 >>=20 >>=20 >>> Magnus, do you think using bsd-port/jdk9 for this purpose be a step = towards getting these basic changes into the jdk9 mainline, or would = your colleagues think "if they have bsd-port/jdk9, why bother with = integrating them into the jdk9 mainline?=E2=80=9D >>=20 >> I think putting these changes in bsd-port/jdk9 is very reasonable, = and I do not believe it will in any way hinder their acceptance into = jdk9 mainline. The only thing to be careful about there, though, is that = all contributors have signed the OCA (Oracle contributor agreement). = Mixing in "legally bad" code can present a real problem for adoption = into mainline. >>=20 >> /Magnus >>=20 >>>=20 >>> Brian Gardner >>>=20 >>>> On Feb 2, 2016, at 7:40 PM, Greg Lewis < = >glewis@eyesbeyond.com = >> wrote: >>>>=20 >>>> On Sun, Jan 31, 2016 at 06:57:26AM -0800, Brian Gardner wrote: >>>>> I???m interested in helping. I ported openjdk6 to freebsd and = also helped out with openjdk8. >>>>>=20 >>>>> Brian Gardner >>>>=20 >>>> I'd love to see as much of these changes get into the jdk9 = mainline. My time >>>> is really limited for the next couple of weeks though. If it would = help you >>>> or Magnus to use the bsd-port repo to stage changes then that would = be >>>> great too. Let me do a merge to make sure it is up to date with = mainline. >>>> Notionally we'd have to do a vote to get you both access I think? = But I >>>> can shepherd changes in if that will help with sharing them. >>>>=20 >>>> FWIW, in terms of taking responsibility, I've been regularly = updating the >>>> repos for jdk8 and jdk7 for a couple of years. I'm happy to keep = jdk9 >>>> building if that is what is being looked for there and also port = more of >>>> the BSD changes for jdk8 as appropriate. >>>>=20 >>>> - Greg >>>>=20 >>>>>> On Jan 31, 2016, at 3:00 AM, Magnus Ihse Bursie = = >> wrote: >>>>>>=20 >>>>>> On 2016-01-31 11:54, Magnus Ihse Bursie wrote: >>>>>>> Hi, >>>>>>>=20 >>>>>>> [TL;DR: I'm offering patches to compile JDK 9 on FreeBSD, but = it's not clear where to put them, or how.] >>>>>>>=20 >>>>>>> I'm working at Oracle on the OpenJDK build team and is = responsible for large parts of the build system of OpenJDK. Lately, I've = been playing around with FreeBSD (and other BSDs) in my free time, and = I've written a patch that will add build system support for FreeBSD, = OpenBSD and NetBSD in JDK 9 (tracked in = >https://bugs.openjdk.ja= va.net/browse/JDK-8147795 = >). >>>>>>>=20 >>>>>>> I started writing this when I realized that the jdk9 branch in = the OpenJDK bsd-port repository did not contain any BSD-specific changes = at all, and the old JDK 8 changes will not readily be portable, due to = major changes in the build system between JDK 8 and JDK 9. >>>>>>>=20 >>>>>>> I thought it would be a no-brainer to integrate these changes = into the JDK 9 mainline, so they would be in place for whenever you guys = would start to attack porting the code base. However, some of my = collegues thought otherwise. The end result, I think, is that they = wanted to see someone (not necessarily a company, the FreeBSD = organisation for instance seemed to be okay), to step forward and say = "we take responsibility for the BSD port", and give some kind of = commitment to actually use these build changes in producing a viable = port. You can read the mail conversation here: = >http://mail.openjdk.java.net/pipermail/build-dev/2016-January/016421.htm= l = = > >>>>>>=20 >>>>>> I forgot to add that I'm willing to help with build issues for = the BSD port, as far as my (like everybode else's) limited free time = allows me. Unfortunately, I'm still a noob at BSD internals and can't = really help with much apart from that. >>>>>>=20 >>>>>> /Magnus >>>>>>=20 >>>>>>=20 >>>>>>>=20 >>>>>>> An alternative to pushing this code into the JDK 9 mainline is = of course to push it to the bsd-port/jdk9 repo (given that the owners of = that repo approves), but that seems like a less favourable solution. = Having the code in the mainline does not mean that it gets tested = automatically, but it means that it will be part of e.g. refactoring, = that would otherwise break a downstream patchset. >>>>>>>=20 >>>>>>> I cc:ed this conversation to the = >bsd-port-dev@openjdk.java.net = = > mailing list, but never got any = kind of official response there. Since this list seems more active, I'm = trying here instead. :) >>>>>>>=20 >>>>>>> So, I'm offering two patches here, one that applies to the build = system, is nice and clean, and possible to integrate into JDK 9 = mainline, if my collegues are convinced that someone is backing up the = BSD port. And there's a second patch, which fixes broken C/C++/Java code = and results in a product that can at least run "javac HelloWorld", but = this is not yet clean enough for integration anywere, at least not the = JDK 9 mainline. (I don't know enough of the BSD internals to fix all = problems, so there's some "#if 0" code here and there.) >>>>>>>=20 >>>>>>> /Magnus >>>>>>>=20 >>>>>>> _______________________________________________ >>>>>>> freebsd-java@freebsd.org = > = mailing list >>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > >>>>>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = " = > >>>>>>=20 >>>>>> _______________________________________________ >>>>>> freebsd-java@freebsd.org = > = = >> = mailing list >>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > = = >> >>>>>> To unsubscribe, send any mail to " = >freebsd-java-unsubscribe@fre= ebsd.org = > < = >mailto:freebsd-java-unsubscr= ibe@freebsd.org = >>" >>>>>=20 >>>>> _______________________________________________ >>>>> freebsd-java@freebsd.org = > = mailing list >>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > >>>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = " = > >>>>=20 >>>> --=20 >>>> Greg Lewis Email : = >glewis@eyesbeyond.com = > >>>> Eyes Beyond Web : = >http://www.eyesbeyond.com = > >>>> Information Technology FreeBSD : = >glewis@FreeBSD.org = > >>>> _______________________________________________ >>>> freebsd-java@freebsd.org = > = mailing list >>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > >>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = = >" >>>=20 >>=20 >>=20 >=20 > _______________________________________________ > freebsd-java@freebsd.org mailing = list > https://lists.freebsd.org/mailman/listinfo/freebsd-java = > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org = " From owner-freebsd-java@freebsd.org Fri Feb 12 14:13:35 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF3EBAA62CC for ; Fri, 12 Feb 2016 14:13:35 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 824E0A57 for ; Fri, 12 Feb 2016 14:13:35 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: by mailman.ysv.freebsd.org (Postfix) id 8108AAA62CB; Fri, 12 Feb 2016 14:13:35 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 669F1AA62CA for ; Fri, 12 Feb 2016 14:13:35 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: from vms173009pub.verizon.net (vms173009pub.verizon.net [206.46.173.9]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23F0CA56 for ; Fri, 12 Feb 2016 14:13:34 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: from vz-proxy-m004.mx.aol.com ([64.236.83.9]) by vms173009.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0O2F00BU3RE0J690@vms173009.mailsrvcs.net> for java@freebsd.org; Fri, 12 Feb 2016 07:13:13 -0600 (CST) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=J+9Xl1TS c=1 sm=1 tr=0 a=5pQKvTSR2HhmAqL4+Jv2ig==:117 a=jFJIQSaiL_oA:10 a=DAwyPP_o2Byb1YXLmDAA:9 a=7yDg-MIwZKLh5XNKPxQA:9 a=QEXdDO2ut3YA:10 a=COfzQ7OkAAAA:8 a=a98FYCQttYFqoy3c7MkA:9 a=jycIcMwrilgA:10 a=QT1NkKqw3S6vKgPMDQwA:9 a=j8fZRBd8-_MA:10 a=o1OHuDzbAAAA:8 a=pGLkceISAAAA:8 a=kPJ79kMBhBcLe5XrMzkA:9 a=UYsVu6p7jyVA4AM-:21 a=An8Fkf6QadAOu4SS:21 a=L2oQX68Dlr7uAoH8OqwA:9 a=LvP6NXylxtWPaK0-:21 a=zOTb5kwIv8AJyiHS:21 a=df1QvXH05A4A:10 Received: by 96.255.168.17 with SMTP id 3dd10af1; Fri, 12 Feb 2016 13:13:13 GMT From: "Curtis Hamilton" To: , Subject: FreeBSD PowerPC Port Date: Fri, 12 Feb 2016 08:11:58 -0500 Message-id: <012601d16597$1a53c660$4efb5320$@verizon.net> MIME-version: 1.0 Content-type: multipart/mixed; boundary="----=_NextPart_000_012C_01D1656D.317EA8C0" X-Mailer: Microsoft Outlook 15.0 Thread-index: AdFlkrv+K5rEXvuRRK6Sow7mvrOd4w== Content-language: en-us X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2016 14:13:35 -0000 This is a multipart message in MIME format. ------=_NextPart_000_012C_01D1656D.317EA8C0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I'm working on a native PowerPC port of JDK8. I've been successful in = building a Zero JVM. I originally posted information on this effort to the AIX-PPC list, = however, it was recommended to post to the BSD list(s) as well. See the = attached for background. To date, using the Linux PPC code set, I've been able to build a = partially working native PPC64 JVM. I developed initial patches that = can be used to build using the latest FreeBSD port. I can make this work available to anyone interested in helping in this = effort. Regards, Curtis ------=_NextPart_000_012C_01D1656D.317EA8C0 Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: attachment Received: from acsinet41.oracle.com ([141.146.126.229]) by vms172063.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.34.0 64bit (built Oct 14 2014)) with ESMTPS id <0O2F00898E74ZR50@vms172063.mailsrvcs.net> for hamiltcl@verizon.net; Fri, 12 Feb 2016 02:28:23 -0600 (CST) Received: from aojmv0009 (unknown [137.254.59.6]) by acsinet41.oracle.com with smtp id 08e6_13da_072b6eb7_11a9_4f22_867c_68f7f93b0316; Fri, 12 Feb 2016 08:28:15 +0000 Received: from aojmv0009.oracle.com (localhost [127.0.0.1]) by aojmv0009 (Postfix) with ESMTP id 88A99168D92 for ; Fri, 12 Feb 2016 08:28:15 +0000 (UTC) Return-Path: Reply-To: From: Sender: "ppc-aix-port-dev" To: Subject: ppc-aix-port-dev Digest, Vol 44, Issue 3 Date: Fri, 12 Feb 2016 03:28:14 -0500 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0127_01D1656D.317E81B0" X-Mailer: Microsoft Outlook 15.0 X-Originating-IP: [141.146.126.229] List-Unsubscribe: , X-BeenThere: ppc-aix-port-dev@openjdk.java.net X-Mailman-Version: 2.1.17 List-Subscribe: , List-Help: Thread-Index: AQLFkSbc8ISatwtWnDE4gLBdlwAr2w== This is a multipart message in MIME format. ------=_NextPart_000_0127_01D1656D.317E81B0 Content-Type: text/plain; boundary="===============0540756525=="; charset="us-ascii" Content-Transfer-Encoding: 7bit Send ppc-aix-port-dev mailing list submissions to ppc-aix-port-dev@openjdk.java.net To subscribe or unsubscribe via the World Wide Web, visit http://mail.openjdk.java.net/mailman/listinfo/ppc-aix-port-dev or, via email, send a message with subject or body 'help' to ppc-aix-port-dev-request@openjdk.java.net You can reach the person managing the list at ppc-aix-port-dev-owner@openjdk.java.net When replying, please edit your Subject line so it is more specific than "Re: Contents of ppc-aix-port-dev digest..." ------=_NextPart_000_0127_01D1656D.317E81B0 Content-Type: text/plain; name="Today's Topics (2 messages).txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Today's Topics (2 messages).txt" Today's Topics: 1. RE: PPC-AIX Port to FreeBSD PowerPC Support (Lindenmaier, Goetz) 2. Re: PPC-AIX Port to FreeBSD PowerPC Support (Volker Simonis) ------=_NextPart_000_0127_01D1656D.317E81B0 Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: attachment From: "Lindenmaier, Goetz" To: =?utf-8?Q?Thomas_St=C3=BCfe?= , "Curtis Hamilton" Cc: , References: <011601d14baf$e0305940$a0910bc0$@verizon.net> <001201d14c7b$4f210ef0$ed632cd0$@verizon.net> <00f201d1655e$465323c0$d2f96b40$@verizon.net> In-Reply-To: Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support Date: Fri, 12 Feb 2016 03:27:45 -0500 Message-ID: <87a664accf3f4760b00d2d8411e9aedf@DEWDFE13DE09.global.corp.sap> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQC01HELAKDeFy2IggIP3TYfXYj6EgFkdHC9AsRtEJkB3RkJ6wHRE2z2AcTpogUBRrKCoA== Hi Curtis, If SIGTRAP ist he problem, you could try -XX:-UseSIGTRAP. This slows down null checks a bit, but this should not matter for now. Best regards, Goetz > -----Original Message----- > From: ppc-aix-port-dev [mailto:ppc-aix-port-dev- > bounces@openjdk.java.net] On Behalf Of Thomas St=C3=BCfe > Sent: Freitag, 12. Februar 2016 08:08 > To: Curtis Hamilton > Cc: ppc-aix-port-dev@openjdk.java.net; bsd-port-dev@openjdk.java.net > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > Hi Curtis, > > I think it makes sense to post this on the bsd list too. > > See my comments inline. > > On Fri, Feb 12, 2016 at 7:26 AM, Curtis Hamilton > wrote: > > > Thomas/Volker, > > > > Just wanted to give you an update on my bsd/ppc64 porting = effort. > I=E2=80=99m using the standard bsd openjdk8 port, as the bsd mercurial = needs > freebsd specific patches. > > > > I=E2=80=99ve made progress modding the linux/ppc files to work = under bsd > and can successfully build a native (ppc64) JVM. Here=E2=80=99s the = output I get > executing =E2=80=98java =E2=80=93version=E2=80=99 > > > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./java -version > openjdk version "1.8.0_72-debug" > OpenJDK Runtime Environment (build 1.8.0_72-debug-b15) > OpenJDK 64-Bit Server VM (build 25.72-b15-debug, mixed mode) > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # > > > Great Job! > > > > I can compile and execute the basic =E2=80=9Chello = world=E2=80=9D. However, > compiling more complicated java code results in a core dump. See the > following: > > > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./javac HelloWorld.java > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./java HelloWorld > Hello, World > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./javac zip.java > Trace/BPT trap (core dumped) > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./javac LargeZip.java > Trace/BPT trap (core dumped) > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # > > As you can see this is a debug build and I=E2=80=99ve been able = to tell from the > core dump, using gdb, that it=E2=80=99s getting a signal 5 at abort. > > > > > I think SIGTRAP is used by the ppc JIT for some things (implicit = nullchecks? > Volker would know better). So, SIGTRAP must be handled for this to = work. > > The JVM has a central signal handler, entry point is "signalHandler" = in > os_.cpp, and then it goes on to, in your case, = JVM_handler_bsd_signal() > in os_bsd_ppc.cpp. > > So, make sure that > > 1) SIGTRAP is handled by this signal handler - I think, by default bsd = does not > install a signal handler for SIGTRAP. See = os::Bsd::install_signal_handlers(), > and compare it with the Linux version. > > 2) Then, SIGTRAP must be handled in JVM_handler_bsd_signal(). Compare > with the SIGTRAP handling for Linux (os_linux_ppc.cpp). But if you = copied > that code, maybe SIGTRAP handling is already in place and (1) was all = that > was missing. > > Also note: The jvm normally writes a error log on crashes which is = very useful > ("hs_err_") but in your case it was not written at all, because = no signal > handler was installed for SIGTRAP. So, if you took care of (1) but (2) = is still > missing, you may still crash but with a real error report log this = time. > > Side note: Magnus Ihse Bursie is cleaning up and repairing the BSD = port, see: > http://mail.openjdk.java.net/pipermail/bsd-port-dev/2016- > January/002739.html > > His changes are not yet committed, but he posted a webrev with his = changes > (http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source- > patches/webrev.01/). It may make sense to integrate this in your = build, he > did some worthwhile fixes. > > Kind Regards, Thomas > > > > > Any recommendations on what to look at or how to further debug? > > > > Regards, > > > > Curtis > > > > From: Curtis Hamilton [mailto:hamiltcl@verizon.net > ] > Sent: Monday, January 11, 2016 3:29 PM > To: 'Thomas St=C3=BCfe' > > Cc: 'Volker Simonis' >; = 'ppc-aix-port-dev@openjdk.java.net > ' dev@openjdk.java.net > > Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support > > > > Thomas, > > > > Thanks for the vector check! > > > > I agree that the AIX os is quite different from other unices (I = have an > old PowerStation 220 in my collection). However, the ppc-aix-port was = the > first that contained code specific to the ppc. Since there = isn=E2=80=99t a ppc-bsd port, > I needed somewhere to start. PPC code for both AIX and Linux can be = found > in the same port. The ports available on FreeBSD currently do = contain any of > the ppc headers or code. So I decided to use a port that already had = the ppc > code and go from there. > > > > Now that ppc code is being integrated into a more universal = port, I > just need to check which jdk8 port to work with. > > > > Any recommendation? > > > > Regards, > > Curtis > > > > From: Thomas St=C3=BCfe [mailto:thomas.stuefe@gmail.com > ] > Sent: Monday, January 11, 2016 11:23 AM > To: Curtis Hamilton > > Cc: Volker Simonis >; ppc-aix-port-dev@openjdk.java.net > > > > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > > > > > Hi Curtis, > > > > I am not sure that AIX ppc would be the best source for an BSD = port. > AIX os port contains a large number of AIX specifics and it is quite a = bit > different (sometimes, needlessly) from the other Unices. It is also a = moving > target, at least on jdk9, as we changed a lot in the AIX os port and = will change > more until the next feature close. > > > > So, it may be that linux ppc would be a better porting source = for a bsd > ppc port. > > > > Kind Regards, Thomas > > > > > > > > > > > > On Mon, Jan 11, 2016 at 3:21 PM, Curtis Hamilton > > wrote: > > Volker, > > > > Thanks for the response. > > > > Yes, I=E2=80=99m using the mercurial jdk7u ppc-aix = version. The > reason I used this port version was because I was more familiar with = the build > layout of jdk7 versus jdk8/jdk9. And it seemed like an easier target = to start > with, since it already supported ppc64 on AIX and Linux. > > > > Full disclosure, I=E2=80=99ve been successful in = building zero vm for > both jdk7 and jdk8 on ppc64/FreeBSD. They both work great. The = system > performance is somewhat sluggish, but usable. So I decided to see if = I could > build native ppc64 versions leveraging the existing AIX and Linux = ppc64 > support in the ppc-aix-port, since the bsd-port lacks support for = PowerPC. > > > > I=E2=80=99m aware of the integration effort for jdk9. = So on your > advice, I will start working with ppc-aix jdk8u. I don=E2=80=99t want = anyone to waste > time with jdk7u. Although my efforts with this older version is not = completely > wasted. > > > > I look forward to contributing to the ppc64/bsd port = OpenJDK > integration effort. > > > > Regards, > > Curtis > > > > From: Volker Simonis [mailto:volker.simonis@gmail.com > ] > Sent: Monday, January 11, 2016 5:22 AM > To: Curtis Hamilton > > Cc: ppc-aix-port-dev@openjdk.java.net = dev@openjdk.java.net> > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > > > Hi Curtis, > > no, I'm not aware of any effort to port the ppc64 port = to BSD. > > My first question is why are you building jdk7. It is = quite old > and we don't actually support it any more. It was also never = integrated into > the main jdk7u branch. I'd strongly recommend to use at least the = jdk8u > version. If you plan to contribute the ppc64/bsd port for integration = into the > OpenJDK, this has to be done into the head revision (currently jdk9) = anyway. > Once it's there, it may be possible to downport it to jdk8u (but not = to jdk7u > because that on doesn't even contain the ppc64 port). > > That said, which version of jdk7u are you using? Is it = the one > from http://hg.openjdk.java.net/ppc-aix-port/jdk7u/ ? > > One problem you may encounter with jdk7u is that it was > never compiled with new versions of gcc. I see you are using gcc4.8 = but we > used 4.1.2 back then when we were doing the port. > > Another problem is that we didn't support the = serviceability > agent in jdk7u. Support for the SA agent on Linux/ppc64 (but not for = AIX) was > added in jdk8. The error you see in vmStructs.cpp is most probably = from SA > coding. How does your file vmStructs_bsd_ppc.hpp looks like. As you = can > see, vmStructs_linux_ppc.hpp is empty in jdk7u for the ppc64 port = while it > has some code in jdk8u-dev and jdk9. > > Unfortunately the place in vmStructs.cpp where the error > happens is deeply nested macro coding so it's hard to say what's wrong = from > the error message. You could preprocess the file and post that to the = list, > maybe we can see more. Just issue the following command from a shell = from > within /usr/ports/tmp/jdk7u/build/bsd- > ppc/hotspot/outputdir/bsd_ppc64_compiler2/product: > > g++48 -DBSD -DPPC64 -D_ALLBSD_SOURCE - > D_GNU_SOURCE -DPRODUCT - > I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/prims - > I/usr/ports/tmp/jdk7u/hotspot/src/share/vm - > I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/precompiled - > I/usr/ports/tmp/jdk7u/hotspot/src/cpu/ppc/vm - > I/usr/ports/tmp/jdk7u/hotspot/src/os_cpu/bsd_ppc/vm - > I/usr/ports/tmp/jdk7u/hotspot/src/os/bsd/vm - > I/usr/ports/tmp/jdk7u/hotspot/src/os/posix/vm -I../generated - > DHOTSPOT_RELEASE_VERSION=3D"\"24.80-b11\"" - > DHOTSPOT_BUILD_TARGET=3D"\"product\"" - > DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D\"ppc\" - > DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" - > DDEFAULT_LIBPATH=3D"\"/lib:/usr/lib:/usr/local/lib\"" - > DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_ppc - > DTARGET_ARCH_MODEL_ppc_64 -DTARGET_OS_ARCH_bsd_ppc - > DTARGET_OS_ARCH_MODEL_bsd_ppc_64 -DTARGET_COMPILER_gcc - > DCOMPILER2 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new - > mpowerpc64 -pipe -DDONT_USE_PRECOMPILED_HEADER -O3 -fno-strict- > aliasing -D_LP64=3D1 -m64 -mminimal-toc -mcpu=3Dpowerpc64 = -mtune=3Dpower5 - > minsert-sched-nops=3Dregroup_exact -mno-multiple -mno-string - > DSAFEFETCH_STUBS -DINCLUDE_TRACE=3D1 -Werror -Wpointer-arith - > Wconversion -Wsign-compare -E > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp > > Regards, > > Volker > > > > On Sun, Jan 10, 2016 at 3:04 PM, Curtis Hamilton > > wrote: > > Hello, > > I=E2=80=99d like to know if there=E2=80=99s been = any work done to > support PPC for *BSD? > > I=E2=80=99ve hacked both the AIX and Linux PPC = headers but > have been unsuccessful in building HotSpot. All modules seem to build = with > the exception of VMStructs.cpp with the below error. > > > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cp > p: In static member function 'static void VMStructs::init()': > > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cp > p:3015: error: cannot convert 'pthread**' to 'pid_t*' in = initialization > > Build log is attached. > > Thanks in advance! > > > > Curtis > > > > > > > ------=_NextPart_000_0127_01D1656D.317E81B0 Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: attachment From: "Volker Simonis" To: =?utf-8?Q?Thomas_St=C3=BCfe?= Cc: "Curtis Hamilton" , , References: <011601d14baf$e0305940$a0910bc0$@verizon.net> <001201d14c7b$4f210ef0$ed632cd0$@verizon.net> <00f201d1655e$465323c0$d2f96b40$@verizon.net> In-Reply-To: Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support Date: Fri, 12 Feb 2016 03:28:10 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQC01HELAKDeFy2IggIP3TYfXYj6EgFkdHC9AsRtEJkB3RkJ6wHRE2z2AcTpogUClgA6ww== Hi Curtis, congratulations from my side as well. Running HelloWorld is always an important milestone when porting the OpenJDK to a new platform! I think Thomas already gave you the right hints. It's true that SIGTRAP is used a lot within HotSpot and you really need to handle it correctly. As a quick workaround you could also try to use -XX:-UseSIGTRAP which should switch off the usage of SIGTRAP within the VM. You also have to use this switch when debugging the VM in a native debugger like gdb because the debugger also uses SIGTRAP internally. Regards, Volker On Fri, Feb 12, 2016 at 8:08 AM, Thomas St=C3=BCfe = wrote: > Hi Curtis, > > I think it makes sense to post this on the bsd list too. > > See my comments inline. > > On Fri, Feb 12, 2016 at 7:26 AM, Curtis Hamilton = > wrote: >> >> Thomas/Volker, >> >> >> >> Just wanted to give you an update on my bsd/ppc64 porting effort. = I=E2=80=99m >> using the standard bsd openjdk8 port, as the bsd mercurial needs = freebsd >> specific patches. >> >> >> >> I=E2=80=99ve made progress modding the linux/ppc files to work under = bsd and can >> successfully build a native (ppc64) JVM. Here=E2=80=99s the output I = get executing >> =E2=80=98java =E2=80=93version=E2=80=99 >> >> >> >> >> = root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal= -server-slowdebug/jdk/bin >> # ./java -version >> openjdk version "1.8.0_72-debug" >> OpenJDK Runtime Environment (build 1.8.0_72-debug-b15) >> OpenJDK 64-Bit Server VM (build 25.72-b15-debug, mixed mode) >> >> = root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal= -server-slowdebug/jdk/bin >> # > > > Great Job! >> >> I can compile and execute the basic =E2=80=9Chello world=E2=80=9D. = However, compiling >> more complicated java code results in a core dump. See the = following: >> >> >> >> >> = root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal= -server-slowdebug/jdk/bin >> # ./javac HelloWorld.java >> >> = root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal= -server-slowdebug/jdk/bin >> # ./java HelloWorld >> Hello, World >> >> = root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal= -server-slowdebug/jdk/bin >> # ./javac zip.java >> Trace/BPT trap (core dumped) >> >> = root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal= -server-slowdebug/jdk/bin >> # ./javac LargeZip.java >> Trace/BPT trap (core dumped) >> >> = root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal= -server-slowdebug/jdk/bin >> # >> >> As you can see this is a debug build and I=E2=80=99ve been able to = tell from the >> core dump, using gdb, that it=E2=80=99s getting a signal 5 at abort. >> >> > > > I think SIGTRAP is used by the ppc JIT for some things (implicit = nullchecks? > Volker would know better). So, SIGTRAP must be handled for this to = work. > > The JVM has a central signal handler, entry point is "signalHandler" = in > os_.cpp, and then it goes on to, in your case, = JVM_handler_bsd_signal() > in os_bsd_ppc.cpp. > > So, make sure that > > 1) SIGTRAP is handled by this signal handler - I think, by default bsd = does > not install a signal handler for SIGTRAP. See > os::Bsd::install_signal_handlers(), and compare it with the Linux = version. > > 2) Then, SIGTRAP must be handled in JVM_handler_bsd_signal(). Compare = with > the SIGTRAP handling for Linux (os_linux_ppc.cpp). But if you copied = that > code, maybe SIGTRAP handling is already in place and (1) was all that = was > missing. > > Also note: The jvm normally writes a error log on crashes which is = very > useful ("hs_err_") but in your case it was not written at all, = because > no signal handler was installed for SIGTRAP. So, if you took care of = (1) but > (2) is still missing, you may still crash but with a real error report = log > this time. > > Side note: Magnus Ihse Bursie is cleaning up and repairing the BSD = port, > see: > = http://mail.openjdk.java.net/pipermail/bsd-port-dev/2016-January/002739.h= tml > > His changes are not yet committed, but he posted a webrev with his = changes > = (http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source-patches= /webrev.01/). > It may make sense to integrate this in your build, he did some = worthwhile > fixes. > > Kind Regards, Thomas > >> >> Any recommendations on what to look at or how to further debug? >> >> >> >> Regards, >> >> >> >> Curtis >> >> >> >> From: Curtis Hamilton [mailto:hamiltcl@verizon.net] >> Sent: Monday, January 11, 2016 3:29 PM >> To: 'Thomas St=C3=BCfe' >> Cc: 'Volker Simonis' ; >> 'ppc-aix-port-dev@openjdk.java.net' = >> Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support >> >> >> >> Thomas, >> >> >> >> Thanks for the vector check! >> >> >> >> I agree that the AIX os is quite different from other unices (I have = an >> old PowerStation 220 in my collection). However, the ppc-aix-port = was the >> first that contained code specific to the ppc. Since there = isn=E2=80=99t a ppc-bsd >> port, I needed somewhere to start. PPC code for both AIX and Linux = can be >> found in the same port. The ports available on FreeBSD currently do >> contain any of the ppc headers or code. So I decided to use a port = that >> already had the ppc code and go from there. >> >> >> >> Now that ppc code is being integrated into a more universal port, I = just >> need to check which jdk8 port to work with. >> >> >> >> Any recommendation? >> >> >> >> Regards, >> >> Curtis >> >> >> >> From: Thomas St=C3=BCfe [mailto:thomas.stuefe@gmail.com] >> Sent: Monday, January 11, 2016 11:23 AM >> To: Curtis Hamilton >> Cc: Volker Simonis ; >> ppc-aix-port-dev@openjdk.java.net >> >> >> Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support >> >> >> >> Hi Curtis, >> >> >> >> I am not sure that AIX ppc would be the best source for an BSD port. = AIX >> os port contains a large number of AIX specifics and it is quite a = bit >> different (sometimes, needlessly) from the other Unices. It is also a = moving >> target, at least on jdk9, as we changed a lot in the AIX os port and = will >> change more until the next feature close. >> >> >> >> So, it may be that linux ppc would be a better porting source for a = bsd >> ppc port. >> >> >> >> Kind Regards, Thomas >> >> >> >> >> >> >> >> >> >> >> >> On Mon, Jan 11, 2016 at 3:21 PM, Curtis Hamilton = >> wrote: >> >> Volker, >> >> >> >> Thanks for the response. >> >> >> >> Yes, I=E2=80=99m using the mercurial jdk7u ppc-aix version. The = reason I used >> this port version was because I was more familiar with the build = layout of >> jdk7 versus jdk8/jdk9. And it seemed like an easier target to start = with, >> since it already supported ppc64 on AIX and Linux. >> >> >> >> Full disclosure, I=E2=80=99ve been successful in building zero vm for = both jdk7 >> and jdk8 on ppc64/FreeBSD. They both work great. The system = performance >> is somewhat sluggish, but usable. So I decided to see if I could = build >> native ppc64 versions leveraging the existing AIX and Linux ppc64 = support in >> the ppc-aix-port, since the bsd-port lacks support for PowerPC. >> >> >> >> I=E2=80=99m aware of the integration effort for jdk9. So on your = advice, I will >> start working with ppc-aix jdk8u. I don=E2=80=99t want anyone to = waste time with >> jdk7u. Although my efforts with this older version is not completely = wasted. >> >> >> >> I look forward to contributing to the ppc64/bsd port OpenJDK = integration >> effort. >> >> >> >> Regards, >> >> Curtis >> >> >> >> From: Volker Simonis [mailto:volker.simonis@gmail.com] >> Sent: Monday, January 11, 2016 5:22 AM >> To: Curtis Hamilton >> Cc: ppc-aix-port-dev@openjdk.java.net >> Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support >> >> >> >> Hi Curtis, >> >> no, I'm not aware of any effort to port the ppc64 port to BSD. >> >> My first question is why are you building jdk7. It is quite old and = we >> don't actually support it any more. It was also never integrated into = the >> main jdk7u branch. I'd strongly recommend to use at least the jdk8u = version. >> If you plan to contribute the ppc64/bsd port for integration into the >> OpenJDK, this has to be done into the head revision (currently jdk9) = anyway. >> Once it's there, it may be possible to downport it to jdk8u (but not = to >> jdk7u because that on doesn't even contain the ppc64 port). >> >> That said, which version of jdk7u are you using? Is it the one from >> http://hg.openjdk.java.net/ppc-aix-port/jdk7u/ ? >> >> One problem you may encounter with jdk7u is that it was never = compiled >> with new versions of gcc. I see you are using gcc4.8 but we used = 4.1.2 back >> then when we were doing the port. >> >> Another problem is that we didn't support the serviceability agent in >> jdk7u. Support for the SA agent on Linux/ppc64 (but not for AIX) was = added >> in jdk8. The error you see in vmStructs.cpp is most probably from SA = coding. >> How does your file vmStructs_bsd_ppc.hpp looks like. As you can see, >> vmStructs_linux_ppc.hpp is empty in jdk7u for the ppc64 port while it = has >> some code in jdk8u-dev and jdk9. >> >> Unfortunately the place in vmStructs.cpp where the error happens is = deeply >> nested macro coding so it's hard to say what's wrong from the error = message. >> You could preprocess the file and post that to the list, maybe we can = see >> more. Just issue the following command from a shell from within >> = /usr/ports/tmp/jdk7u/build/bsd-ppc/hotspot/outputdir/bsd_ppc64_compiler2/= product: >> >> g++48 -DBSD -DPPC64 -D_ALLBSD_SOURCE -D_GNU_SOURCE -DPRODUCT >> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/prims >> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm >> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/precompiled >> -I/usr/ports/tmp/jdk7u/hotspot/src/cpu/ppc/vm >> -I/usr/ports/tmp/jdk7u/hotspot/src/os_cpu/bsd_ppc/vm >> -I/usr/ports/tmp/jdk7u/hotspot/src/os/bsd/vm >> -I/usr/ports/tmp/jdk7u/hotspot/src/os/posix/vm -I../generated >> -DHOTSPOT_RELEASE_VERSION=3D"\"24.80-b11\"" >> -DHOTSPOT_BUILD_TARGET=3D"\"product\"" = -DHOTSPOT_BUILD_USER=3D"\"root\"" >> -DHOTSPOT_LIB_ARCH=3D\"ppc\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" >> -DDEFAULT_LIBPATH=3D"\"/lib:/usr/lib:/usr/local/lib\"" = -DTARGET_OS_FAMILY_bsd >> -DTARGET_ARCH_ppc -DTARGET_ARCH_MODEL_ppc_64 -DTARGET_OS_ARCH_bsd_ppc >> -DTARGET_OS_ARCH_MODEL_bsd_ppc_64 -DTARGET_COMPILER_gcc -DCOMPILER2 = -fPIC >> -fno-rtti -fno-exceptions -pthread -fcheck-new -mpowerpc64 -pipe >> -DDONT_USE_PRECOMPILED_HEADER -O3 -fno-strict-aliasing -D_LP64=3D1 = -m64 >> -mminimal-toc -mcpu=3Dpowerpc64 -mtune=3Dpower5 >> -minsert-sched-nops=3Dregroup_exact -mno-multiple -mno-string >> -DSAFEFETCH_STUBS -DINCLUDE_TRACE=3D1 -Werror -Wpointer-arith = -Wconversion >> -Wsign-compare -E >> /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp >> >> Regards, >> >> Volker >> >> >> >> On Sun, Jan 10, 2016 at 3:04 PM, Curtis Hamilton = >> wrote: >> >> Hello, >> >> I=E2=80=99d like to know if there=E2=80=99s been any work done to = support PPC for *BSD? >> >> I=E2=80=99ve hacked both the AIX and Linux PPC headers but have been = unsuccessful >> in building HotSpot. All modules seem to build with the exception of >> VMStructs.cpp with the below error. >> >> /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp: In = static >> member function 'static void VMStructs::init()': >> /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp:3015: >> error: cannot convert 'pthread**' to 'pid_t*' in initialization >> >> Build log is attached. >> >> Thanks in advance! >> >> >> >> Curtis >> >> >> >> >> >> > > ------=_NextPart_000_0127_01D1656D.317E81B0-- ------=_NextPart_000_012C_01D1656D.317EA8C0-- From owner-freebsd-java@freebsd.org Fri Feb 12 18:55:19 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8ECEAAA78B5 for ; Fri, 12 Feb 2016 18:55:19 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 7264E181C for ; Fri, 12 Feb 2016 18:55:19 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: by mailman.ysv.freebsd.org (Postfix) id 6FAE8AA78B4; Fri, 12 Feb 2016 18:55:19 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55264AA78B3 for ; Fri, 12 Feb 2016 18:55:19 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from mail.timestudybuddy.com (mail.timestudybuddy.com [72.29.186.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 089651814 for ; Fri, 12 Feb 2016 18:55:18 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from [192.168.0.2] (66-169-227-8.dhcp.gvrb.ca.charter.com [66.169.227.8]) (authenticated bits=0) by mail.timestudybuddy.com (8.15.2/8.14.9) with ESMTPSA id u1CIkJ2B040039 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Feb 2016 10:46:20 -0800 (PST) (envelope-from openjdk@getsnappy.com) X-Authentication-Warning: mailA.getsnappy.com: Host 66-169-227-8.dhcp.gvrb.ca.charter.com [66.169.227.8] claimed to be [192.168.0.2] Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: Helping out with JDK 9 on BSD From: Brian Gardner In-Reply-To: <1C39812E-E596-47E6-AB45-0A591A017FFB@getsnappy.com> Date: Fri, 12 Feb 2016 10:54:29 -0800 Cc: java@freebsd.org Message-Id: References: <56ADE7D4.8020107@oracle.com> <56ADE943.6020103@oracle.com> <8B9ACABA-F9B2-4288-9DB5-CA843DE48C34@getsnappy.com> <20160203034053.GA36170@misty.eyesbeyond.com> <56B45453.9020006@oracle.com> <1C39812E-E596-47E6-AB45-0A591A017FFB@getsnappy.com> To: Magnus Ihse Bursie , Greg Lewis X-Mailer: Apple Mail (2.3112) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2016 18:55:19 -0000 After giving it some thought, I=E2=80=99ve created an alternate patch = for the clear_current_thread issue. I like this solution better because = it is isolated to java_start function in os_bsd.cpp, and it makes = java_start responsible for cleaning up the current_thread since it also = initializes it. > On Feb 10, 2016, at 10:45 PM, Brian Gardner = wrote: >=20 > Hello again Greg and Magnus, > I finished up researching the leftover thread-specific data after 4 = destructor iterations issue. It looks like it=E2=80=99s currently = functioning on Freebsd the same way it does on Linux, the only = difference is that Freebsd output that warning were Linux silently stops = after it=E2=80=99s forth try. I looked into how openjdk8 was working = and it looks like there were calls to TLS::set_thread(NULL) scattered = throughout the code base at the end of some ::run methods. I=E2=80=99ve = mimicked that behavior in the necessary spots with the following patch. = I can=E2=80=99t help but think there must be a better way to get these = Thread=E2=80=99s destructors called, and I tried that in place of making = clear_thread_current public and calling it directly, but it resulted in = deadlock. >=20 > >=20 >> On Feb 9, 2016, at 2:36 PM, Brian Gardner > wrote: >>=20 >> Hi Greg and Magnus, >> I=E2=80=99ve attached the patches needed to build and compile on = Freebsd. I=E2=80=99ve reverted my changes to TLS, and done more = debugging there. There appears to be two separate issues. One issue = was that the implementation of OS::bad::gettid() was somehow clearing = the current thread previously set with pthread_setspecific. I was able = to fix this by porting logic from bad-port/jdk8, see = hotspot__os_bd_cpp__getthreadid.patch. The second issue seems to be = related to certain types of threads never getting their destructor = called and therefor not clearing pthread_setspecific and resulting in = Thread 803c59000 has exited with leftover thread-specific data after 4 = destructor iterations, errors. This one I haven=E2=80=99t tracked down = yet and will continue looking into. While I can compile and execute = HelloWorld, I=E2=80=99m getting a ton of these benign yet annoying = messages from ConcurrentGC and Worker threads. I=E2=80=99ll continue = looking into that next week. >>=20 >>=20 >>> On Feb 4, 2016, at 11:50 PM, Magnus Ihse Bursie = > = wrote: >>>=20 >>> On 2016-02-04 01:29, Brian Gardner wrote: >>>> Hi Greg, >>>> Great to hear from you, it=E2=80=99s been a while since I took on = one of these projects, but I do follow the java@freebsd mailing list and = see all the work you put in. I must tell you how greatly your work is = appreciated by me and I=E2=80=99m sure the rest of the community. I = have good news, with fairly minimal changes I have it compiling, = building HelloWorld, and running HelloWorld all without errors. >>>>=20 >>>> I think it=E2=80=99ll break down into 4 change sets, >>>> NM - I ported some code from = bsd-port/jdk8/hotspot/make/bsd/makefiles/build_vm_def.sh that fixes a = compile error=20 >>>> SUPPORT_RESERVED_STACK_AREA - define SUPPORT_RESERVED_STACK_AREA = for _ALLBSD_SOURCE >>>> Serviceability Agent - ported from bad-port/jdk8, currently = compiles but hasn=E2=80=99t been tested >>>> TLS - there is problems with the TLS in jdk9 used for = Thread::current(). This caused several issues for me and while the fix = was relatively straight forward in using THREAD_LOCAL_DECL completely in = place of TLS completely, I=E2=80=99d imagine there was a reason it was = implemented in sort of a Hybrid fashion alongside TLS. >>>=20 >>> There is a reason. It is very well described in this comment: >>> = https://bugs.openjdk.java.net/browse/JDK-8132510?focusedCommentId=3D138665= 05 = = > >>>=20 >>> The TL;DR: in some circumstances the JVM can crash if we do not set = up an initial TLS. On the other hand, this was for glibc, so maybe this = situation does not arise for FreeBSD. >>>=20 >>>>=20 >>>> It would be great if I could post these as web reviews for others = to review. Greg, would getting access to bsd-port/jdk9 allow us to = collaborate through web reviews? =20 >>>=20 >>>=20 >>>> Magnus, do you think using bsd-port/jdk9 for this purpose be a step = towards getting these basic changes into the jdk9 mainline, or would = your colleagues think "if they have bsd-port/jdk9, why bother with = integrating them into the jdk9 mainline?=E2=80=9D >>>=20 >>> I think putting these changes in bsd-port/jdk9 is very reasonable, = and I do not believe it will in any way hinder their acceptance into = jdk9 mainline. The only thing to be careful about there, though, is that = all contributors have signed the OCA (Oracle contributor agreement). = Mixing in "legally bad" code can present a real problem for adoption = into mainline. >>>=20 >>> /Magnus >>>=20 >>>>=20 >>>> Brian Gardner >>>>=20 >>>>> On Feb 2, 2016, at 7:40 PM, Greg Lewis < = >glewis@eyesbeyond.com = >> wrote: >>>>>=20 >>>>> On Sun, Jan 31, 2016 at 06:57:26AM -0800, Brian Gardner wrote: >>>>>> I???m interested in helping. I ported openjdk6 to freebsd and = also helped out with openjdk8. >>>>>>=20 >>>>>> Brian Gardner >>>>>=20 >>>>> I'd love to see as much of these changes get into the jdk9 = mainline. My time >>>>> is really limited for the next couple of weeks though. If it = would help you >>>>> or Magnus to use the bsd-port repo to stage changes then that = would be >>>>> great too. Let me do a merge to make sure it is up to date with = mainline. >>>>> Notionally we'd have to do a vote to get you both access I think? = But I >>>>> can shepherd changes in if that will help with sharing them. >>>>>=20 >>>>> FWIW, in terms of taking responsibility, I've been regularly = updating the >>>>> repos for jdk8 and jdk7 for a couple of years. I'm happy to keep = jdk9 >>>>> building if that is what is being looked for there and also port = more of >>>>> the BSD changes for jdk8 as appropriate. >>>>>=20 >>>>> - Greg >>>>>=20 >>>>>>> On Jan 31, 2016, at 3:00 AM, Magnus Ihse Bursie = = >> wrote: >>>>>>>=20 >>>>>>> On 2016-01-31 11:54, Magnus Ihse Bursie wrote: >>>>>>>> Hi, >>>>>>>>=20 >>>>>>>> [TL;DR: I'm offering patches to compile JDK 9 on FreeBSD, but = it's not clear where to put them, or how.] >>>>>>>>=20 >>>>>>>> I'm working at Oracle on the OpenJDK build team and is = responsible for large parts of the build system of OpenJDK. Lately, I've = been playing around with FreeBSD (and other BSDs) in my free time, and = I've written a patch that will add build system support for FreeBSD, = OpenBSD and NetBSD in JDK 9 (tracked in = >https://bugs.openjdk.ja= va.net/browse/JDK-8147795 = >). >>>>>>>>=20 >>>>>>>> I started writing this when I realized that the jdk9 branch in = the OpenJDK bsd-port repository did not contain any BSD-specific changes = at all, and the old JDK 8 changes will not readily be portable, due to = major changes in the build system between JDK 8 and JDK 9. >>>>>>>>=20 >>>>>>>> I thought it would be a no-brainer to integrate these changes = into the JDK 9 mainline, so they would be in place for whenever you guys = would start to attack porting the code base. However, some of my = collegues thought otherwise. The end result, I think, is that they = wanted to see someone (not necessarily a company, the FreeBSD = organisation for instance seemed to be okay), to step forward and say = "we take responsibility for the BSD port", and give some kind of = commitment to actually use these build changes in producing a viable = port. You can read the mail conversation here: = >http://mail.openjdk.java.net/pipermail/build-dev/2016-January/016421.htm= l = = > >>>>>>>=20 >>>>>>> I forgot to add that I'm willing to help with build issues for = the BSD port, as far as my (like everybode else's) limited free time = allows me. Unfortunately, I'm still a noob at BSD internals and can't = really help with much apart from that. >>>>>>>=20 >>>>>>> /Magnus >>>>>>>=20 >>>>>>>=20 >>>>>>>>=20 >>>>>>>> An alternative to pushing this code into the JDK 9 mainline is = of course to push it to the bsd-port/jdk9 repo (given that the owners of = that repo approves), but that seems like a less favourable solution. = Having the code in the mainline does not mean that it gets tested = automatically, but it means that it will be part of e.g. refactoring, = that would otherwise break a downstream patchset. >>>>>>>>=20 >>>>>>>> I cc:ed this conversation to the = >bsd-port-dev@openjdk.java.net = = > mailing list, but never got any = kind of official response there. Since this list seems more active, I'm = trying here instead. :) >>>>>>>>=20 >>>>>>>> So, I'm offering two patches here, one that applies to the = build system, is nice and clean, and possible to integrate into JDK 9 = mainline, if my collegues are convinced that someone is backing up the = BSD port. And there's a second patch, which fixes broken C/C++/Java code = and results in a product that can at least run "javac HelloWorld", but = this is not yet clean enough for integration anywere, at least not the = JDK 9 mainline. (I don't know enough of the BSD internals to fix all = problems, so there's some "#if 0" code here and there.) >>>>>>>>=20 >>>>>>>> /Magnus >>>>>>>>=20 >>>>>>>> _______________________________________________ >>>>>>>> freebsd-java@freebsd.org = > = mailing list >>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > >>>>>>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = " = > >>>>>>>=20 >>>>>>> _______________________________________________ >>>>>>> freebsd-java@freebsd.org = > = = >> = mailing list >>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > = = >> >>>>>>> To unsubscribe, send any mail to " = >freebsd-java-unsubscribe@fre= ebsd.org = > < = >mailto:freebsd-java-unsubscr= ibe@freebsd.org = >>" >>>>>>=20 >>>>>> _______________________________________________ >>>>>> freebsd-java@freebsd.org = > = mailing list >>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > >>>>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = " = > >>>>>=20 >>>>> --=20 >>>>> Greg Lewis Email : = >glewis@eyesbeyond.com = > >>>>> Eyes Beyond Web : = >http://www.eyesbeyond.com = > >>>>> Information Technology FreeBSD : = >glewis@FreeBSD.org = > >>>>> _______________________________________________ >>>>> freebsd-java@freebsd.org = > = mailing list >>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > >>>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = = >" >>>>=20 >>>=20 >>>=20 >>=20 >> _______________________________________________ >> freebsd-java@freebsd.org mailing = list >> https://lists.freebsd.org/mailman/listinfo/freebsd-java = >> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = " >=20 From owner-freebsd-java@freebsd.org Sat Feb 13 08:09:55 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BCA9AA632B for ; Sat, 13 Feb 2016 08:09:55 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 24F921F94 for ; Sat, 13 Feb 2016 08:09:55 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: by mailman.ysv.freebsd.org (Postfix) id 24AE9AA632A; Sat, 13 Feb 2016 08:09:55 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 242F1AA6329 for ; Sat, 13 Feb 2016 08:09:55 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.freebsd.org (Postfix) with ESMTP id AC9FB1F93 for ; Sat, 13 Feb 2016 08:09:53 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.15.2/8.15.2) with ESMTP id u1D89pYV070933; Sat, 13 Feb 2016 00:09:51 -0800 (PST) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.15.2/8.15.2/Submit) id u1D89jjk070932; Sat, 13 Feb 2016 00:09:45 -0800 (PST) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Sat, 13 Feb 2016 00:09:45 -0800 From: Greg Lewis To: Brian Gardner Cc: Magnus Ihse Bursie , java@freebsd.org Subject: Re: Helping out with JDK 9 on BSD Message-ID: <20160213080945.GC56357@misty.eyesbeyond.com> References: <56ADE7D4.8020107@oracle.com> <56ADE943.6020103@oracle.com> <8B9ACABA-F9B2-4288-9DB5-CA843DE48C34@getsnappy.com> <20160203034053.GA36170@misty.eyesbeyond.com> <56B45453.9020006@oracle.com> <1C39812E-E596-47E6-AB45-0A591A017FFB@getsnappy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 08:09:55 -0000 On Fri, Feb 12, 2016 at 10:54:29AM -0800, Brian Gardner wrote: > After giving it some thought, I???ve created an alternate patch for the c= lear_current_thread issue. I like this solution better because it is isola= ted to java_start function in os_bsd.cpp, and it makes java_start responsib= le for cleaning up the current_thread since it also initializes it. Sounds good! What can I do to help get all the changes up for review? -- Greg > > On Feb 10, 2016, at 10:45 PM, Brian Gardner wro= te: > >=20 > > Hello again Greg and Magnus, > > I finished up researching the leftover thread-specific data after 4 des= tructor iterations issue. It looks like it???s currently functioning on Fr= eebsd the same way it does on Linux, the only difference is that Freebsd ou= tput that warning were Linux silently stops after it???s forth try. I look= ed into how openjdk8 was working and it looks like there were calls to TLS:= :set_thread(NULL) scattered throughout the code base at the end of some ::r= un methods. I???ve mimicked that behavior in the necessary spots with the = following patch. I can???t help but think there must be a better way to ge= t these Thread???s destructors called, and I tried that in place of making = clear_thread_current public and calling it directly, but it resulted in dea= dlock. > >=20 > > > >=20 > >> On Feb 9, 2016, at 2:36 PM, Brian Gardner > wrote: > >>=20 > >> Hi Greg and Magnus, > >> I???ve attached the patches needed to build and compile on Freebsd. I= ???ve reverted my changes to TLS, and done more debugging there. There app= ears to be two separate issues. One issue was that the implementation of O= S::bad::gettid() was somehow clearing the current thread previously set wit= h pthread_setspecific. I was able to fix this by porting logic from bad-po= rt/jdk8, see hotspot__os_bd_cpp__getthreadid.patch. The second issue seems= to be related to certain types of threads never getting their destructor c= alled and therefor not clearing pthread_setspecific and resulting in Thread= 803c59000 has exited with leftover thread-specific data after 4 destructor= iterations, errors. This one I haven???t tracked down yet and will contin= ue looking into. While I can compile and execute HelloWorld, I???m getting= a ton of these benign yet annoying messages from ConcurrentGC and Worker t= hreads. I???ll continue looking into that next week. > >>=20 > >>=20 > >>> On Feb 4, 2016, at 11:50 PM, Magnus Ihse Bursie > wrote: > >>>=20 > >>> On 2016-02-04 01:29, Brian Gardner wrote: > >>>> Hi Greg, > >>>> Great to hear from you, it???s been a while since I took on one of t= hese projects, but I do follow the java@freebsd mailing list and see all th= e work you put in. I must tell you how greatly your work is appreciated by = me and I???m sure the rest of the community. I have good news, with fairly= minimal changes I have it compiling, building HelloWorld, and running Hell= oWorld all without errors. > >>>>=20 > >>>> I think it???ll break down into 4 change sets, > >>>> NM - I ported some code from bsd-port/jdk8/hotspot/make/bsd/makefile= s/build_vm_def.sh that fixes a compile error=20 > >>>> SUPPORT_RESERVED_STACK_AREA - define SUPPORT_RESERVED_STACK_AREA for= _ALLBSD_SOURCE > >>>> Serviceability Agent - ported from bad-port/jdk8, currently compiles= but hasn???t been tested > >>>> TLS - there is problems with the TLS in jdk9 used for Thread::curren= t(). This caused several issues for me and while the fix was relatively st= raight forward in using THREAD_LOCAL_DECL completely in place of TLS comple= tely, I???d imagine there was a reason it was implemented in sort of a Hybr= id fashion alongside TLS. > >>>=20 > >>> There is a reason. It is very well described in this comment: > >>> https://bugs.openjdk.java.net/browse/JDK-8132510?focusedCommentId=3D1= 3866505 > > >>>=20 > >>> The TL;DR: in some circumstances the JVM can crash if we do not set u= p an initial TLS. On the other hand, this was for glibc, so maybe this situ= ation does not arise for FreeBSD. > >>>=20 > >>>>=20 > >>>> It would be great if I could post these as web reviews for others to= review. Greg, would getting access to bsd-port/jdk9 allow us to collabora= te through web reviews? =20 > >>>=20 > >>>=20 > >>>> Magnus, do you think using bsd-port/jdk9 for this purpose be a step = towards getting these basic changes into the jdk9 mainline, or would your c= olleagues think "if they have bsd-port/jdk9, why bother with integrating th= em into the jdk9 mainline???? > >>>=20 > >>> I think putting these changes in bsd-port/jdk9 is very reasonable, an= d I do not believe it will in any way hinder their acceptance into jdk9 mai= nline. The only thing to be careful about there, though, is that all contri= butors have signed the OCA (Oracle contributor agreement). Mixing in "legal= ly bad" code can present a real problem for adoption into mainline. > >>>=20 > >>> /Magnus > >>>=20 > >>>>=20 > >>>> Brian Gardner > >>>>=20 > >>>>> On Feb 2, 2016, at 7:40 PM, Greg Lewis < >glewis@eyesbeyond.com >>= wrote: > >>>>>=20 > >>>>> On Sun, Jan 31, 2016 at 06:57:26AM -0800, Brian Gardner wrote: > >>>>>> I???m interested in helping. I ported openjdk6 to freebsd and als= o helped out with openjdk8. > >>>>>>=20 > >>>>>> Brian Gardner > >>>>>=20 > >>>>> I'd love to see as much of these changes get into the jdk9 mainline= =2E My time > >>>>> is really limited for the next couple of weeks though. If it would= help you > >>>>> or Magnus to use the bsd-port repo to stage changes then that would= be > >>>>> great too. Let me do a merge to make sure it is up to date with ma= inline. > >>>>> Notionally we'd have to do a vote to get you both access I think? = But I > >>>>> can shepherd changes in if that will help with sharing them. > >>>>>=20 > >>>>> FWIW, in terms of taking responsibility, I've been regularly updati= ng the > >>>>> repos for jdk8 and jdk7 for a couple of years. I'm happy to keep j= dk9 > >>>>> building if that is what is being looked for there and also port mo= re of > >>>>> the BSD changes for jdk8 as appropriate. > >>>>>=20 > >>>>> - Greg > >>>>>=20 > >>>>>>> On Jan 31, 2016, at 3:00 AM, Magnus Ihse Bursie >> wrote: > >>>>>>>=20 > >>>>>>> On 2016-01-31 11:54, Magnus Ihse Bursie wrote: > >>>>>>>> Hi, > >>>>>>>>=20 > >>>>>>>> [TL;DR: I'm offering patches to compile JDK 9 on FreeBSD, but it= 's not clear where to put them, or how.] > >>>>>>>>=20 > >>>>>>>> I'm working at Oracle on the OpenJDK build team and is responsib= le for large parts of the build system of OpenJDK. Lately, I've been playin= g around with FreeBSD (and other BSDs) in my free time, and I've written a = patch that will add build system support for FreeBSD, OpenBSD and NetBSD in= JDK 9 (tracked in >https://bugs.openjdk.java.net= /browse/JDK-8147795 >). > >>>>>>>>=20 > >>>>>>>> I started writing this when I realized that the jdk9 branch in t= he OpenJDK bsd-port repository did not contain any BSD-specific changes at = all, and the old JDK 8 changes will not readily be portable, due to major c= hanges in the build system between JDK 8 and JDK 9. > >>>>>>>>=20 > >>>>>>>> I thought it would be a no-brainer to integrate these changes in= to the JDK 9 mainline, so they would be in place for whenever you guys woul= d start to attack porting the code base. However, some of my collegues thou= ght otherwise. The end result, I think, is that they wanted to see someone = (not necessarily a company, the FreeBSD organisation for instance seemed to= be okay), to step forward and say "we take responsibility for the BSD port= ", and give some kind of commitment to actually use these build changes in = producing a viable port. You can read the mail conversation here: >http://m= ail.openjdk.java.net/pipermail/build-dev/2016-January/016421.html > > >>>>>>>=20 > >>>>>>> I forgot to add that I'm willing to help with build issues for th= e BSD port, as far as my (like everybode else's) limited free time allows m= e. Unfortunately, I'm still a noob at BSD internals and can't really help w= ith much apart from that. > >>>>>>>=20 > >>>>>>> /Magnus > >>>>>>>=20 > >>>>>>>=20 > >>>>>>>>=20 > >>>>>>>> An alternative to pushing this code into the JDK 9 mainline is o= f course to push it to the bsd-port/jdk9 repo (given that the owners of tha= t repo approves), but that seems like a less favourable solution. Having th= e code in the mainline does not mean that it gets tested automatically, but= it means that it will be part of e.g. refactoring, that would otherwise br= eak a downstream patchset. > >>>>>>>>=20 > >>>>>>>> I cc:ed this conversation to the >bsd-port-dev@openjdk.java.ne= t > mailing list, but never got any= kind of official response there. Since this list seems more active, I'm tr= ying here instead. :) > >>>>>>>>=20 > >>>>>>>> So, I'm offering two patches here, one that applies to the build= system, is nice and clean, and possible to integrate into JDK 9 mainline, = if my collegues are convinced that someone is backing up the BSD port. And = there's a second patch, which fixes broken C/C++/Java code and results in a= product that can at least run "javac HelloWorld", but this is not yet clea= n enough for integration anywere, at least not the JDK 9 mainline. (I don't= know enough of the BSD internals to fix all problems, so there's some "#if= 0" code here and there.) > >>>>>>>>=20 > >>>>>>>> /Magnus > >>>>>>>>=20 > >>>>>>>> _______________________________________________ > >>>>>>>> freebsd-java@freebsd.org > mailing list > >>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > > >>>>>>>> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freeb= sd.org " > > >>>>>>>=20 > >>>>>>> _______________________________________________ > >>>>>>> freebsd-java@freebsd.org > >> mailing list > >>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > >> > >>>>>>> To unsubscribe, send any mail to " >freebsd-java-u= nsubscribe@freebsd.org > < >mailto:freebsd-java-unsubscribe@freebsd.org >>" > >>>>>>=20 > >>>>>> _______________________________________________ > >>>>>> freebsd-java@freebsd.org > mailing list > >>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > > >>>>>> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd= =2Eorg " > > >>>>>=20 > >>>>> --=20 > >>>>> Greg Lewis Email : >glewis@eyesbeyond.com > > >>>>> Eyes Beyond Web : >http://www.eyesbeyond.com > > >>>>> Information Technology FreeBSD : >glewis@FreeBSD.org > > >>>>> _______________________________________________ > >>>>> freebsd-java@freebsd.org > mailing list > >>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > > >>>>> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.= org >" > >>>>=20 > >>>=20 > >>>=20 > >>=20 > >> _______________________________________________ > >> freebsd-java@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-java > >> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org= " > >=20 >=20 --=20 Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org From owner-freebsd-java@freebsd.org Sat Feb 13 08:29:56 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 843B2AA6C4E for ; Sat, 13 Feb 2016 08:29:56 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 6EC1115EC for ; Sat, 13 Feb 2016 08:29:56 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: by mailman.ysv.freebsd.org (Postfix) id 6CC68AA6C4D; Sat, 13 Feb 2016 08:29:56 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C515AA6C4C for ; Sat, 13 Feb 2016 08:29:56 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.freebsd.org (Postfix) with ESMTP id AA2BF15EB for ; Sat, 13 Feb 2016 08:29:55 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.15.2/8.15.2) with ESMTP id u1D84NJH070909; Sat, 13 Feb 2016 00:04:28 -0800 (PST) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.15.2/8.15.2/Submit) id u1D84M4W070908; Sat, 13 Feb 2016 00:04:22 -0800 (PST) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Sat, 13 Feb 2016 00:04:21 -0800 From: Greg Lewis To: Brian Gardner Cc: java@freebsd.org, Magnus Ihse Bursie Subject: Re: Helping out with JDK 9 on BSD Message-ID: <20160213080421.GA56357@misty.eyesbeyond.com> References: <56ADE7D4.8020107@oracle.com> <56ADE943.6020103@oracle.com> <8B9ACABA-F9B2-4288-9DB5-CA843DE48C34@getsnappy.com> <20160203034053.GA36170@misty.eyesbeyond.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 08:29:56 -0000 Hi Brian, Answers inline :). On Wed, Feb 03, 2016 at 04:29:50PM -0800, Brian Gardner wrote: > Hi Greg, > Great to hear from you, it???s been a while since I took on one of these projects, but I do follow the java@freebsd mailing list and see all the work you put in. I must tell you how greatly your work is appreciated by me and I???m sure the rest of the community. I have good news, with fairly minimal changes I have it compiling, building HelloWorld, and running HelloWorld all without errors. > > I think it???ll break down into 4 change sets, > NM - I ported some code from bsd-port/jdk8/hotspot/make/bsd/makefiles/build_vm_def.sh that fixes a compile error > SUPPORT_RESERVED_STACK_AREA - define SUPPORT_RESERVED_STACK_AREA for _ALLBSD_SOURCE > Serviceability Agent - ported from bad-port/jdk8, currently compiles but hasn???t been tested > TLS - there is problems with the TLS in jdk9 used for Thread::current(). This caused several issues for me and while the fix was relatively straight forward in using THREAD_LOCAL_DECL completely in place of TLS completely, I???d imagine there was a reason it was implemented in sort of a Hybrid fashion alongside TLS. Breaking it down into these different changesets would certainly make review easier. The serviceability agent code only gets tested irregularly as it is, so I'm not sure it is currently fully functional in openjdk8. That said, this would be a good opportunity to fix it and back port anything relevant. > It would be great if I could post these as web reviews for others to review. Greg, would getting access to bsd-port/jdk9 allow us to collaborate through web reviews? Magnus, do you think using bsd-port/jdk9 for this purpose be a step towards getting these basic changes into the jdk9 mainline, or would your colleagues think "if they have bsd-port/jdk9, why bother with integrating them into the jdk9 mainline???? Getting access to bsd-port/jdk9 doesn't provide anything special in terms of being able to post them as webrevs. OpenJDK has a page on how to use it at: http://openjdk.java.net/guide/webrevHelp.html You just need somewhere to host the generated changes. If you don't, let me know and we can work something out. > > On Feb 2, 2016, at 7:40 PM, Greg Lewis wrote: > > > > On Sun, Jan 31, 2016 at 06:57:26AM -0800, Brian Gardner wrote: > >> I???m interested in helping. I ported openjdk6 to freebsd and also helped out with openjdk8. > >> > >> Brian Gardner > > > > I'd love to see as much of these changes get into the jdk9 mainline. My time > > is really limited for the next couple of weeks though. If it would help you > > or Magnus to use the bsd-port repo to stage changes then that would be > > great too. Let me do a merge to make sure it is up to date with mainline. > > Notionally we'd have to do a vote to get you both access I think? But I > > can shepherd changes in if that will help with sharing them. > > > > FWIW, in terms of taking responsibility, I've been regularly updating the > > repos for jdk8 and jdk7 for a couple of years. I'm happy to keep jdk9 > > building if that is what is being looked for there and also port more of > > the BSD changes for jdk8 as appropriate. > > > > - Greg > > > >>> On Jan 31, 2016, at 3:00 AM, Magnus Ihse Bursie wrote: > >>> > >>> On 2016-01-31 11:54, Magnus Ihse Bursie wrote: > >>>> Hi, > >>>> > >>>> [TL;DR: I'm offering patches to compile JDK 9 on FreeBSD, but it's not clear where to put them, or how.] > >>>> > >>>> I'm working at Oracle on the OpenJDK build team and is responsible for large parts of the build system of OpenJDK. Lately, I've been playing around with FreeBSD (and other BSDs) in my free time, and I've written a patch that will add build system support for FreeBSD, OpenBSD and NetBSD in JDK 9 (tracked in https://bugs.openjdk.java.net/browse/JDK-8147795). > >>>> > >>>> I started writing this when I realized that the jdk9 branch in the OpenJDK bsd-port repository did not contain any BSD-specific changes at all, and the old JDK 8 changes will not readily be portable, due to major changes in the build system between JDK 8 and JDK 9. > >>>> > >>>> I thought it would be a no-brainer to integrate these changes into the JDK 9 mainline, so they would be in place for whenever you guys would start to attack porting the code base. However, some of my collegues thought otherwise. The end result, I think, is that they wanted to see someone (not necessarily a company, the FreeBSD organisation for instance seemed to be okay), to step forward and say "we take responsibility for the BSD port", and give some kind of commitment to actually use these build changes in producing a viable port. You can read the mail conversation here: http://mail.openjdk.java.net/pipermail/build-dev/2016-January/016421.html > >>> > >>> I forgot to add that I'm willing to help with build issues for the BSD port, as far as my (like everybode else's) limited free time allows me. Unfortunately, I'm still a noob at BSD internals and can't really help with much apart from that. > >>> > >>> /Magnus > >>> > >>> > >>>> > >>>> An alternative to pushing this code into the JDK 9 mainline is of course to push it to the bsd-port/jdk9 repo (given that the owners of that repo approves), but that seems like a less favourable solution. Having the code in the mainline does not mean that it gets tested automatically, but it means that it will be part of e.g. refactoring, that would otherwise break a downstream patchset. > >>>> > >>>> I cc:ed this conversation to the bsd-port-dev@openjdk.java.net mailing list, but never got any kind of official response there. Since this list seems more active, I'm trying here instead. :) > >>>> > >>>> So, I'm offering two patches here, one that applies to the build system, is nice and clean, and possible to integrate into JDK 9 mainline, if my collegues are convinced that someone is backing up the BSD port. And there's a second patch, which fixes broken C/C++/Java code and results in a product that can at least run "javac HelloWorld", but this is not yet clean enough for integration anywere, at least not the JDK 9 mainline. (I don't know enough of the BSD internals to fix all problems, so there's some "#if 0" code here and there.) > >>>> > >>>> /Magnus > >>>> > >>>> _______________________________________________ > >>>> freebsd-java@freebsd.org mailing list > >>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > >>>> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > >>> > >>> _______________________________________________ > >>> freebsd-java@freebsd.org mailing list > >>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > >>> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org " > >> > >> _______________________________________________ > >> freebsd-java@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-java > >> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > > > > -- > > Greg Lewis Email : glewis@eyesbeyond.com > > Eyes Beyond Web : http://www.eyesbeyond.com > > Information Technology FreeBSD : glewis@FreeBSD.org > > _______________________________________________ > > freebsd-java@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-java > > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org " > -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org From owner-freebsd-java@freebsd.org Sat Feb 13 17:50:22 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0BE2AA7E07 for ; Sat, 13 Feb 2016 17:50:22 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: from vms173015pub.verizon.net (vms173015pub.verizon.net [206.46.173.15]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E2231C61 for ; Sat, 13 Feb 2016 17:50:22 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: from vz-proxy-m002.mx.aol.com ([64.236.83.11]) by vms173015.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0O2H00MUZW2VUL10@vms173015.mailsrvcs.net> for freebsd-java@freebsd.org; Sat, 13 Feb 2016 10:49:44 -0600 (CST) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=Nc0brD34 c=1 sm=1 tr=0 a=QygMq2WHlv4bY/JTZumiuw==:117 a=jFJIQSaiL_oA:10 a=DAwyPP_o2Byb1YXLmDAA:9 a=UnnwD1GPAAAA:8 a=pGLkceISAAAA:8 a=o1OHuDzbAAAA:8 a=COfzQ7OkAAAA:8 a=ufACKhgI2r8t0kjMpNUA:9 a=CgCsvKApezscGbWl:21 a=F3vYqhpVCHj9lms6:21 a=QEXdDO2ut3YA:10 a=glTydGkffpxnuh4PvpMA:9 Received: by 96.255.168.17 with SMTP id 0454bccb; Sat, 13 Feb 2016 16:49:44 GMT From: "Curtis Hamilton" To: "'Lindenmaier, Goetz'" , =?utf-8?Q?'Thomas_St=C3=BCfe'?= Cc: , , References: <011601d14baf$e0305940$a0910bc0$@verizon.net> <001201d14c7b$4f210ef0$ed632cd0$@verizon.net> <00f201d1655e$465323c0$d2f96b40$@verizon.net> <87a664accf3f4760b00d2d8411e9aedf@DEWDFE13DE09.global.corp.sap> In-reply-to: <87a664accf3f4760b00d2d8411e9aedf@DEWDFE13DE09.global.corp.sap> Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support Date: Sat, 13 Feb 2016 11:49:27 -0500 Message-id: <017a01d1667e$82d20750$887615f0$@verizon.net> MIME-version: 1.0 Content-type: multipart/mixed; boundary="----=_NextPart_000_017B_01D16654.99FD10C0" X-Mailer: Microsoft Outlook 15.0 Thread-index: AQC01HELAKDeFy2IggIP3TYfXYj6EgFkdHC9AsRtEJkB3RkJ6wHRE2z2AcTpogUBRrKCoKEMDpAQ Content-language: en-us X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 17:50:22 -0000 This is a multipart message in MIME format. ------=_NextPart_000_017B_01D16654.99FD10C0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thomas/Volker, et al Thanks to your assistance, I've been SUCCESSFUL in building a native = ppc64 jdk8 on FreeBSD. To validate the build, I made a couple of regression test runs with = results similar to the Zero VM build in the same environment. Although, = not all tests completed successfully (some of the failed test were due = to missing test files in the distribution). The regression test stats = file is attached.=20 I've created a set of initial patches for the code and several patches = for the build system. However, there's one build system issue that I've = not yet resolved. At the end of the Hotspot build, it errors because it = cannot find jvmti.hmtl, jvmti.h, libjsig.so and libjvm.so. The files = exist, but the "HOTSPOT_DIST" directory structure has not been created, = with these files in the locations the build system expects. I'm sure = that this is because of building a Compiler2 variant on a non-supported = platform, as I don't have this issue with the Zero VM build. Thus, I = manually created the "dist" structure and placed the files in the = expected locations and the remainder of the build works as designed. = Any thoughts? I'm going to continue to stress test the build, to ensure everything is = in working order. Again, thanks for all the assistance. Regards, Curtis -----Original Message----- From: Lindenmaier, Goetz [mailto:goetz.lindenmaier@sap.com]=20 Sent: Friday, February 12, 2016 3:28 AM To: Thomas St=C3=BCfe ; Curtis Hamilton = Cc: ppc-aix-port-dev@openjdk.java.net; bsd-port-dev@openjdk.java.net Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support Hi Curtis, If SIGTRAP ist he problem, you could try -XX:-UseSIGTRAP. This slows down null checks a bit, but this should not matter for now. Best regards, Goetz > -----Original Message----- > From: ppc-aix-port-dev [mailto:ppc-aix-port-dev-=20 > bounces@openjdk.java.net] On Behalf Of Thomas St=C3=BCfe > Sent: Freitag, 12. Februar 2016 08:08 > To: Curtis Hamilton > Cc: ppc-aix-port-dev@openjdk.java.net; bsd-port-dev@openjdk.java.net > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > Hi Curtis, > > I think it makes sense to post this on the bsd list too. > > See my comments inline. > > On Fri, Feb 12, 2016 at 7:26 AM, Curtis Hamilton > wrote: > > > Thomas/Volker, > > > > Just wanted to give you an update on my bsd/ppc64 porting = effort. > I=E2=80=99m using the standard bsd openjdk8 port, as the bsd mercurial = needs=20 > freebsd specific patches. > > > > I=E2=80=99ve made progress modding the linux/ppc files to work = under bsd=20 > and can successfully build a native (ppc64) JVM. Here=E2=80=99s the = output I=20 > get executing =E2=80=98java =E2=80=93version=E2=80=99 > > > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./java -version > openjdk version "1.8.0_72-debug" > OpenJDK Runtime Environment (build 1.8.0_72-debug-b15) > OpenJDK 64-Bit Server VM (build 25.72-b15-debug, mixed mode) > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # > > > Great Job! > > > > I can compile and execute the basic =E2=80=9Chello = world=E2=80=9D. However,=20 > compiling more complicated java code results in a core dump. See the > following: > > > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./javac HelloWorld.java > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./java HelloWorld > Hello, World > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./javac zip.java > Trace/BPT trap (core dumped) > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./javac LargeZip.java > Trace/BPT trap (core dumped) > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # > > As you can see this is a debug build and I=E2=80=99ve been able = to tell=20 > from the core dump, using gdb, that it=E2=80=99s getting a signal 5 at = abort. > > > > > I think SIGTRAP is used by the ppc JIT for some things (implicit = nullchecks? > Volker would know better). So, SIGTRAP must be handled for this to = work. > > The JVM has a central signal handler, entry point is "signalHandler"=20 > in os_.cpp, and then it goes on to, in your case,=20 > JVM_handler_bsd_signal() in os_bsd_ppc.cpp. > > So, make sure that > > 1) SIGTRAP is handled by this signal handler - I think, by default bsd = > does not install a signal handler for SIGTRAP. See=20 > os::Bsd::install_signal_handlers(), > and compare it with the Linux version. > > 2) Then, SIGTRAP must be handled in JVM_handler_bsd_signal(). Compare=20 > with the SIGTRAP handling for Linux (os_linux_ppc.cpp). But if you=20 > copied that code, maybe SIGTRAP handling is already in place and (1)=20 > was all that was missing. > > Also note: The jvm normally writes a error log on crashes which is=20 > very useful > ("hs_err_") but in your case it was not written at all, because=20 > no signal handler was installed for SIGTRAP. So, if you took care of=20 > (1) but (2) is still missing, you may still crash but with a real = error report log this time. > > Side note: Magnus Ihse Bursie is cleaning up and repairing the BSD = port, see: > http://mail.openjdk.java.net/pipermail/bsd-port-dev/2016- > January/002739.html > > His changes are not yet committed, but he posted a webrev with his=20 > changes > (http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source- > patches/webrev.01/). It may make sense to integrate this in your=20 > build, he did some worthwhile fixes. > > Kind Regards, Thomas > > > > > Any recommendations on what to look at or how to further debug? > > > > Regards, > > > > Curtis > > > > From: Curtis Hamilton [mailto:hamiltcl@verizon.net=20 > ] > Sent: Monday, January 11, 2016 3:29 PM > To: 'Thomas St=C3=BCfe' > > Cc: 'Volker Simonis' >;=20 > 'ppc-aix-port-dev@openjdk.java.net > ' dev@openjdk.java.net > > Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support > > > > Thomas, > > > > Thanks for the vector check! > > > > I agree that the AIX os is quite different from other unices (I=20 > have an old PowerStation 220 in my collection). However, the=20 > ppc-aix-port was the first that contained code specific to the ppc. =20 > Since there isn=E2=80=99t a ppc-bsd port, I needed somewhere to start. = PPC code for both AIX and Linux can be found > in the same port. The ports available on FreeBSD currently do = contain any of > the ppc headers or code. So I decided to use a port that already had=20 > the ppc code and go from there. > > > > Now that ppc code is being integrated into a more universal=20 > port, I just need to check which jdk8 port to work with. > > > > Any recommendation? > > > > Regards, > > Curtis > > > > From: Thomas St=C3=BCfe [mailto:thomas.stuefe@gmail.com=20 > ] > Sent: Monday, January 11, 2016 11:23 AM > To: Curtis Hamilton > > Cc: Volker Simonis >; ppc-aix-port-dev@openjdk.java.net = > > > > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > > > > > Hi Curtis, > > > > I am not sure that AIX ppc would be the best source for an BSD = port. > AIX os port contains a large number of AIX specifics and it is quite a = > bit different (sometimes, needlessly) from the other Unices. It is=20 > also a moving target, at least on jdk9, as we changed a lot in the AIX = > os port and will change more until the next feature close. > > > > So, it may be that linux ppc would be a better porting source=20 > for a bsd ppc port. > > > > Kind Regards, Thomas > > > > > > > > > > > > On Mon, Jan 11, 2016 at 3:21 PM, Curtis Hamilton=20 > > wrote: > > Volker, > > > > Thanks for the response. > > > > Yes, I=E2=80=99m using the mercurial jdk7u ppc-aix = version. The=20 > reason I used this port version was because I was more familiar with=20 > the build layout of jdk7 versus jdk8/jdk9. And it seemed like an=20 > easier target to start with, since it already supported ppc64 on AIX = and Linux. > > > > Full disclosure, I=E2=80=99ve been successful in = building zero vm for > both jdk7 and jdk8 on ppc64/FreeBSD. They both work great. The = system > performance is somewhat sluggish, but usable. So I decided to see if=20 > I could build native ppc64 versions leveraging the existing AIX and=20 > Linux ppc64 support in the ppc-aix-port, since the bsd-port lacks = support for PowerPC. > > > > I=E2=80=99m aware of the integration effort for jdk9. = So on=20 > your advice, I will start working with ppc-aix jdk8u. I don=E2=80=99t = want=20 > anyone to waste time with jdk7u. Although my efforts with this older=20 > version is not completely wasted. > > > > I look forward to contributing to the ppc64/bsd port=20 > OpenJDK integration effort. > > > > Regards, > > Curtis > > > > From: Volker Simonis [mailto:volker.simonis@gmail.com=20 > ] > Sent: Monday, January 11, 2016 5:22 AM > To: Curtis Hamilton > > Cc: ppc-aix-port-dev@openjdk.java.net=20 > > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > > > Hi Curtis, > > no, I'm not aware of any effort to port the ppc64 port = to BSD. > > My first question is why are you building jdk7. It is=20 > quite old and we don't actually support it any more. It was also never = > integrated into the main jdk7u branch. I'd strongly recommend to use=20 > at least the jdk8u version. If you plan to contribute the ppc64/bsd=20 > port for integration into the OpenJDK, this has to be done into the = head revision (currently jdk9) anyway. > Once it's there, it may be possible to downport it to jdk8u (but not=20 > to jdk7u because that on doesn't even contain the ppc64 port). > > That said, which version of jdk7u are you using? Is it=20 > the one from http://hg.openjdk.java.net/ppc-aix-port/jdk7u/ ? > > One problem you may encounter with jdk7u is that it was=20 > never compiled with new versions of gcc. I see you are using gcc4.8=20 > but we used 4.1.2 back then when we were doing the port. > > Another problem is that we didn't support the=20 > serviceability agent in jdk7u. Support for the SA agent on Linux/ppc64 = > (but not for AIX) was added in jdk8. The error you see in=20 > vmStructs.cpp is most probably from SA coding. How does your file=20 > vmStructs_bsd_ppc.hpp looks like. As you can see,=20 > vmStructs_linux_ppc.hpp is empty in jdk7u for the ppc64 port while it = has some code in jdk8u-dev and jdk9. > > Unfortunately the place in vmStructs.cpp where the error = > happens is deeply nested macro coding so it's hard to say what's wrong = > from the error message. You could preprocess the file and post that to = > the list, maybe we can see more. Just issue the following command from = > a shell from within /usr/ports/tmp/jdk7u/build/bsd- > ppc/hotspot/outputdir/bsd_ppc64_compiler2/product: > > g++48 -DBSD -DPPC64 -D_ALLBSD_SOURCE - D_GNU_SOURCE=20 > -DPRODUCT - I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/prims -=20 > I/usr/ports/tmp/jdk7u/hotspot/src/share/vm -=20 > I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/precompiled -=20 > I/usr/ports/tmp/jdk7u/hotspot/src/cpu/ppc/vm -=20 > I/usr/ports/tmp/jdk7u/hotspot/src/os_cpu/bsd_ppc/vm -=20 > I/usr/ports/tmp/jdk7u/hotspot/src/os/bsd/vm -=20 > I/usr/ports/tmp/jdk7u/hotspot/src/os/posix/vm -I../generated -=20 > DHOTSPOT_RELEASE_VERSION=3D"\"24.80-b11\"" -=20 > DHOTSPOT_BUILD_TARGET=3D"\"product\"" - = DHOTSPOT_BUILD_USER=3D"\"root\""=20 > -DHOTSPOT_LIB_ARCH=3D\"ppc\" - DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -=20 > DDEFAULT_LIBPATH=3D"\"/lib:/usr/lib:/usr/local/lib\"" -=20 > DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_ppc - > DTARGET_ARCH_MODEL_ppc_64 -DTARGET_OS_ARCH_bsd_ppc - > DTARGET_OS_ARCH_MODEL_bsd_ppc_64 -DTARGET_COMPILER_gcc - > DCOMPILER2 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new - > mpowerpc64 -pipe -DDONT_USE_PRECOMPILED_HEADER -O3 -fno-strict-=20 > aliasing -D_LP64=3D1 -m64 -mminimal-toc -mcpu=3Dpowerpc64 = -mtune=3Dpower5 -=20 > minsert-sched-nops=3Dregroup_exact -mno-multiple -mno-string -=20 > DSAFEFETCH_STUBS -DINCLUDE_TRACE=3D1 -Werror -Wpointer-arith - > Wconversion -Wsign-compare -E > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp > > Regards, > > Volker > > > > On Sun, Jan 10, 2016 at 3:04 PM, Curtis Hamilton=20 > > wrote: > > Hello, > > I=E2=80=99d like to know if there=E2=80=99s been = any work done=20 > to support PPC for *BSD? > > I=E2=80=99ve hacked both the AIX and Linux PPC = headers=20 > but have been unsuccessful in building HotSpot. All modules seem to=20 > build with the exception of VMStructs.cpp with the below error. > > > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cp > p: In static member function 'static void VMStructs::init()': > > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cp > p:3015: error: cannot convert 'pthread**' to 'pid_t*' in=20 > initialization > > Build log is attached. > > Thanks in advance! > > > > Curtis > > > > > > > ------=_NextPart_000_017B_01D16654.99FD10C0 Content-Type: text/plain; name="Stats.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Stats.txt" Summary: jdk_core=0A= FAILED: java/io/BufferedInputStream/LargeCopyWithMark.java=0A= FAILED: = java/io/Serializable/unresolvableObjectStreamClass/UnresolvableObjectStre= amClass.java=0A= FAILED: java/lang/ProcessBuilder/DestroyTest.java=0A= FAILED: java/lang/Thread/ThreadStateTest.java=0A= FAILED: java/lang/invoke/lambda/LogGeneratedClassesTest.java=0A= FAILED: java/net/DatagramSocket/B6411513.java=0A= FAILED: java/net/Inet4Address/PingThis.java=0A= FAILED: java/net/Inet6Address/B6206527.java=0A= FAILED: java/net/InetAddress/CachedUnknownHostName.java=0A= FAILED: java/net/InetAddress/IPv4Formats.java=0A= FAILED: java/net/InetAddress/IsReachableViaLoopbackTest.java=0A= FAILED: java/net/MulticastSocket/B6427403.java=0A= FAILED: java/net/MulticastSocket/JoinGroup.java=0A= FAILED: java/net/MulticastSocket/Leave.java=0A= FAILED: java/net/MulticastSocket/MultiDead.java=0A= FAILED: java/net/MulticastSocket/Promiscuous.java=0A= FAILED: java/net/MulticastSocket/SetLoopbackMode.java=0A= FAILED: java/net/MulticastSocket/Test.java=0A= FAILED: java/net/ServerSocket/AcceptCauseFileDescriptorLeak.sh=0A= FAILED: java/net/Socket/SetSoLinger.java=0A= FAILED: java/net/Socket/TrafficClass.java=0A= FAILED: java/net/SocketPermission/Wildcard.java=0A= FAILED: java/net/Socks/SocksV4Test.java=0A= FAILED: java/net/URL/OpenStream.java=0A= FAILED: java/net/URLClassLoader/closetest/CloseTest.java=0A= FAILED: java/net/URLClassLoader/closetest/GetResourceAsStream.java=0A= FAILED: java/net/URLPermission/nstest/lookup.sh=0A= FAILED: java/net/ipv6tests/B6521014.java=0A= FAILED: java/nio/MappedByteBuffer/Truncate.java=0A= FAILED: java/nio/channels/AsyncCloseAndInterrupt.java=0A= FAILED: java/nio/channels/AsynchronousChannelGroup/Basic.java=0A= FAILED: java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java=0A= FAILED: java/nio/channels/AsynchronousChannelGroup/Identity.java=0A= FAILED: java/nio/channels/AsynchronousChannelGroup/Restart.java=0A= FAILED: java/nio/channels/AsynchronousChannelGroup/Unbounded.java=0A= FAILED: java/nio/channels/AsynchronousChannelGroup/run_any_task.sh=0A= FAILED: java/nio/channels/AsynchronousSocketChannel/Basic.java=0A= FAILED: = java/nio/channels/AsynchronousSocketChannel/DieBeforeComplete.java=0A= FAILED: java/nio/channels/AsynchronousSocketChannel/Leaky.java=0A= FAILED: java/nio/channels/AsynchronousSocketChannel/StressLoopback.java=0A= FAILED: java/nio/channels/Channels/Basic2.java=0A= FAILED: java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java=0A= FAILED: java/nio/channels/DatagramChannel/SendToUnresolved.java=0A= FAILED: java/nio/channels/Selector/LotsOfChannels.java=0A= FAILED: java/nio/channels/SocketChannel/ExceptionTranslation.java=0A= FAILED: java/nio/channels/SocketChannel/Shutdown.java=0A= FAILED: java/nio/file/Files/probeContentType/ParallelProbes.java=0A= FAILED: java/util/zip/ZipFile/MultiThreadedReadTest.java=0A= FAILED: java/util/zip/ZipFile/ZipEntryFreeTest.java=0A= FAILED: javax/rmi/PortableRemoteObject/ConcurrentHashMapTest.java=0A= FAILED: javax/xml/jaxp/parsers/8032909/XSLT.java=0A= FAILED: javax/xml/ws/8043129/MailTest.java=0A= FAILED: jdk/net/Sockets/SupportedOptions.java=0A= FAILED: sample/chatserver/ChatTest.java=0A= FAILED: sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java=0A= FAILED: sun/security/ec/TestEC.java=0A= FAILED: = sun/security/provider/certpath/DisabledAlgorithms/CPBuilderWithMD5.java=0A= FAILED: sun/tools/native2ascii/NativeErrors.java=0A= TEST STATS: name=3Djdk_core run=3D3597 pass=3D3539 fail=3D58=0A= ------=_NextPart_000_017B_01D16654.99FD10C0-- From owner-freebsd-java@freebsd.org Sat Feb 13 18:59:29 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB660AA709A for ; Sat, 13 Feb 2016 18:59:29 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id B03691353 for ; Sat, 13 Feb 2016 18:59:29 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: by mailman.ysv.freebsd.org (Postfix) id ADB0FAA7099; Sat, 13 Feb 2016 18:59:29 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9359BAA7098 for ; Sat, 13 Feb 2016 18:59:29 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from mail.timestudybuddy.com (mail.timestudybuddy.com [72.29.186.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B70F1352 for ; Sat, 13 Feb 2016 18:59:28 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from [192.168.0.2] (66-169-227-8.dhcp.gvrb.ca.charter.com [66.169.227.8]) (authenticated bits=0) by mail.timestudybuddy.com (8.15.2/8.14.9) with ESMTPSA id u1DIoMON000716 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Feb 2016 10:50:23 -0800 (PST) (envelope-from openjdk@getsnappy.com) X-Authentication-Warning: mailA.getsnappy.com: Host 66-169-227-8.dhcp.gvrb.ca.charter.com [66.169.227.8] claimed to be [192.168.0.2] Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: Helping out with JDK 9 on BSD From: Brian Gardner In-Reply-To: <20160213080945.GC56357@misty.eyesbeyond.com> Date: Sat, 13 Feb 2016 10:58:34 -0800 Cc: Magnus Ihse Bursie , java@freebsd.org Message-Id: <224FFFC1-BAFD-4C90-83A0-5D0CD12F603C@getsnappy.com> References: <56ADE7D4.8020107@oracle.com> <56ADE943.6020103@oracle.com> <8B9ACABA-F9B2-4288-9DB5-CA843DE48C34@getsnappy.com> <20160203034053.GA36170@misty.eyesbeyond.com> <56B45453.9020006@oracle.com> <1C39812E-E596-47E6-AB45-0A591A017FFB@getsnappy.com> <20160213080945.GC56357@misty.eyesbeyond.com> To: Greg Lewis X-Mailer: Apple Mail (2.3112) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 18:59:29 -0000 Here are web reviews for all of the patches porting build_vm_def.sh from bsd-port/jdk8 repo, to fix NM errors during = build http://brian.timestudybuddy.com/webrev/hotspot__NM/webrev/ = Add SUPPORT_RESERVED_STACK_AREA flag for all BSD's = http://brian.timestudybuddy.com/webrev/hotspot__SUPPORT_RESERVED_STACK_ARE= A/webrev/ = porting getthreadid logic from bsd-port/jdk8. calling = syscall(SYS_thr_self) caused pthread_setspecific to be cleared. http://brian.timestudybuddy.com/webrev/ = hotspot__os_bsd_cpp__getthreadid/webrev/ = adding in servicability agent ported from bsd-port/jdk8 http://brian.timestudybuddy.com/webrev/ = hotspot__sa/we= brev/ adding classlist.bsd that is identical to classlist.linux, in order to = compile http://brian.timestudybuddy.com/webrev/jdk__classlist-bsd/webrev/ = clean up TLS current thread at end of ::run functions similar to how = it's done in openjdk8. http://brian.timestudybuddy.com/webrev/ = hotspot__clear_thread_current/webrev/ = clear current thread before exiting java_start to avoid warnings from = leftover pthread_setspecific data = http://brian.timestudybuddy.com/webrev/hotspot__clear_thread_current_alt/w= ebrev/ = > On Feb 13, 2016, at 12:09 AM, Greg Lewis = wrote: >=20 > On Fri, Feb 12, 2016 at 10:54:29AM -0800, Brian Gardner wrote: >> After giving it some thought, I???ve created an alternate patch for = the clear_current_thread issue. I like this solution better because it = is isolated to java_start function in os_bsd.cpp, and it makes = java_start responsible for cleaning up the current_thread since it also = initializes it. >=20 > Sounds good! What can I do to help get all the changes up for review? >=20 > -- Greg >=20 >>> On Feb 10, 2016, at 10:45 PM, Brian Gardner = wrote: >>>=20 >>> Hello again Greg and Magnus, >>> I finished up researching the leftover thread-specific data after 4 = destructor iterations issue. It looks like it???s currently functioning = on Freebsd the same way it does on Linux, the only difference is that = Freebsd output that warning were Linux silently stops after it???s forth = try. I looked into how openjdk8 was working and it looks like there = were calls to TLS::set_thread(NULL) scattered throughout the code base = at the end of some ::run methods. I???ve mimicked that behavior in the = necessary spots with the following patch. I can???t help but think = there must be a better way to get these Thread???s destructors called, = and I tried that in place of making clear_thread_current public and = calling it directly, but it resulted in deadlock. >>>=20 >>> >>>=20 >>>> On Feb 9, 2016, at 2:36 PM, Brian Gardner > wrote: >>>>=20 >>>> Hi Greg and Magnus, >>>> I???ve attached the patches needed to build and compile on Freebsd. = I???ve reverted my changes to TLS, and done more debugging there. = There appears to be two separate issues. One issue was that the = implementation of OS::bad::gettid() was somehow clearing the current = thread previously set with pthread_setspecific. I was able to fix this = by porting logic from bad-port/jdk8, see = hotspot__os_bd_cpp__getthreadid.patch. The second issue seems to be = related to certain types of threads never getting their destructor = called and therefor not clearing pthread_setspecific and resulting in = Thread 803c59000 has exited with leftover thread-specific data after 4 = destructor iterations, errors. This one I haven???t tracked down yet = and will continue looking into. While I can compile and execute = HelloWorld, I???m getting a ton of these benign yet annoying messages = from ConcurrentGC and Worker threads. I???ll continue looking into that = next week. >>>>=20 >>>>=20 >>>>> On Feb 4, 2016, at 11:50 PM, Magnus Ihse Bursie = > = wrote: >>>>>=20 >>>>> On 2016-02-04 01:29, Brian Gardner wrote: >>>>>> Hi Greg, >>>>>> Great to hear from you, it???s been a while since I took on one = of these projects, but I do follow the java@freebsd mailing list and see = all the work you put in. I must tell you how greatly your work is = appreciated by me and I???m sure the rest of the community. I have good = news, with fairly minimal changes I have it compiling, building = HelloWorld, and running HelloWorld all without errors. >>>>>>=20 >>>>>> I think it???ll break down into 4 change sets, >>>>>> NM - I ported some code from = bsd-port/jdk8/hotspot/make/bsd/makefiles/build_vm_def.sh that fixes a = compile error=20 >>>>>> SUPPORT_RESERVED_STACK_AREA - define SUPPORT_RESERVED_STACK_AREA = for _ALLBSD_SOURCE >>>>>> Serviceability Agent - ported from bad-port/jdk8, currently = compiles but hasn???t been tested >>>>>> TLS - there is problems with the TLS in jdk9 used for = Thread::current(). This caused several issues for me and while the fix = was relatively straight forward in using THREAD_LOCAL_DECL completely in = place of TLS completely, I???d imagine there was a reason it was = implemented in sort of a Hybrid fashion alongside TLS. >>>>>=20 >>>>> There is a reason. It is very well described in this comment: >>>>> = https://bugs.openjdk.java.net/browse/JDK-8132510?focusedCommentId=3D138665= 05 = = > >>>>>=20 >>>>> The TL;DR: in some circumstances the JVM can crash if we do not = set up an initial TLS. On the other hand, this was for glibc, so maybe = this situation does not arise for FreeBSD. >>>>>=20 >>>>>>=20 >>>>>> It would be great if I could post these as web reviews for others = to review. Greg, would getting access to bsd-port/jdk9 allow us to = collaborate through web reviews? =20 >>>>>=20 >>>>>=20 >>>>>> Magnus, do you think using bsd-port/jdk9 for this purpose be a = step towards getting these basic changes into the jdk9 mainline, or = would your colleagues think "if they have bsd-port/jdk9, why bother with = integrating them into the jdk9 mainline???? >>>>>=20 >>>>> I think putting these changes in bsd-port/jdk9 is very reasonable, = and I do not believe it will in any way hinder their acceptance into = jdk9 mainline. The only thing to be careful about there, though, is that = all contributors have signed the OCA (Oracle contributor agreement). = Mixing in "legally bad" code can present a real problem for adoption = into mainline. >>>>>=20 >>>>> /Magnus >>>>>=20 >>>>>>=20 >>>>>> Brian Gardner >>>>>>=20 >>>>>>> On Feb 2, 2016, at 7:40 PM, Greg Lewis < = >glewis@eyesbeyond.com = >> wrote: >>>>>>>=20 >>>>>>> On Sun, Jan 31, 2016 at 06:57:26AM -0800, Brian Gardner wrote: >>>>>>>> I???m interested in helping. I ported openjdk6 to freebsd and = also helped out with openjdk8. >>>>>>>>=20 >>>>>>>> Brian Gardner >>>>>>>=20 >>>>>>> I'd love to see as much of these changes get into the jdk9 = mainline. My time >>>>>>> is really limited for the next couple of weeks though. If it = would help you >>>>>>> or Magnus to use the bsd-port repo to stage changes then that = would be >>>>>>> great too. Let me do a merge to make sure it is up to date with = mainline. >>>>>>> Notionally we'd have to do a vote to get you both access I = think? But I >>>>>>> can shepherd changes in if that will help with sharing them. >>>>>>>=20 >>>>>>> FWIW, in terms of taking responsibility, I've been regularly = updating the >>>>>>> repos for jdk8 and jdk7 for a couple of years. I'm happy to = keep jdk9 >>>>>>> building if that is what is being looked for there and also port = more of >>>>>>> the BSD changes for jdk8 as appropriate. >>>>>>>=20 >>>>>>> - Greg >>>>>>>=20 >>>>>>>>> On Jan 31, 2016, at 3:00 AM, Magnus Ihse Bursie = = >> wrote: >>>>>>>>>=20 >>>>>>>>> On 2016-01-31 11:54, Magnus Ihse Bursie wrote: >>>>>>>>>> Hi, >>>>>>>>>>=20 >>>>>>>>>> [TL;DR: I'm offering patches to compile JDK 9 on FreeBSD, but = it's not clear where to put them, or how.] >>>>>>>>>>=20 >>>>>>>>>> I'm working at Oracle on the OpenJDK build team and is = responsible for large parts of the build system of OpenJDK. Lately, I've = been playing around with FreeBSD (and other BSDs) in my free time, and = I've written a patch that will add build system support for FreeBSD, = OpenBSD and NetBSD in JDK 9 (tracked in = >https://bugs.openjdk.ja= va.net/browse/JDK-8147795 = >). >>>>>>>>>>=20 >>>>>>>>>> I started writing this when I realized that the jdk9 branch = in the OpenJDK bsd-port repository did not contain any BSD-specific = changes at all, and the old JDK 8 changes will not readily be portable, = due to major changes in the build system between JDK 8 and JDK 9. >>>>>>>>>>=20 >>>>>>>>>> I thought it would be a no-brainer to integrate these changes = into the JDK 9 mainline, so they would be in place for whenever you guys = would start to attack porting the code base. However, some of my = collegues thought otherwise. The end result, I think, is that they = wanted to see someone (not necessarily a company, the FreeBSD = organisation for instance seemed to be okay), to step forward and say = "we take responsibility for the BSD port", and give some kind of = commitment to actually use these build changes in producing a viable = port. You can read the mail conversation here: = >http://mail.openjdk.java.net/pipermail/build-dev/2016-January/016421.htm= l = = > >>>>>>>>>=20 >>>>>>>>> I forgot to add that I'm willing to help with build issues for = the BSD port, as far as my (like everybode else's) limited free time = allows me. Unfortunately, I'm still a noob at BSD internals and can't = really help with much apart from that. >>>>>>>>>=20 >>>>>>>>> /Magnus >>>>>>>>>=20 >>>>>>>>>=20 >>>>>>>>>>=20 >>>>>>>>>> An alternative to pushing this code into the JDK 9 mainline = is of course to push it to the bsd-port/jdk9 repo (given that the owners = of that repo approves), but that seems like a less favourable solution. = Having the code in the mainline does not mean that it gets tested = automatically, but it means that it will be part of e.g. refactoring, = that would otherwise break a downstream patchset. >>>>>>>>>>=20 >>>>>>>>>> I cc:ed this conversation to the = >bsd-port-dev@openjdk.java.net = = > mailing list, but never got any = kind of official response there. Since this list seems more active, I'm = trying here instead. :) >>>>>>>>>>=20 >>>>>>>>>> So, I'm offering two patches here, one that applies to the = build system, is nice and clean, and possible to integrate into JDK 9 = mainline, if my collegues are convinced that someone is backing up the = BSD port. And there's a second patch, which fixes broken C/C++/Java code = and results in a product that can at least run "javac HelloWorld", but = this is not yet clean enough for integration anywere, at least not the = JDK 9 mainline. (I don't know enough of the BSD internals to fix all = problems, so there's some "#if 0" code here and there.) >>>>>>>>>>=20 >>>>>>>>>> /Magnus >>>>>>>>>>=20 >>>>>>>>>> _______________________________________________ >>>>>>>>>> freebsd-java@freebsd.org = > = mailing list >>>>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > >>>>>>>>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = " = > >>>>>>>>>=20 >>>>>>>>> _______________________________________________ >>>>>>>>> freebsd-java@freebsd.org = > = = >> = mailing list >>>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > = = >> >>>>>>>>> To unsubscribe, send any mail to " = >freebsd-java-unsubscribe@fre= ebsd.org = > < = >mailto:freebsd-java-unsubscr= ibe@freebsd.org = >>" >>>>>>>>=20 >>>>>>>> _______________________________________________ >>>>>>>> freebsd-java@freebsd.org = > = mailing list >>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > >>>>>>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = " = > >>>>>>>=20 >>>>>>> --=20 >>>>>>> Greg Lewis Email : = >glewis@eyesbeyond.com = > >>>>>>> Eyes Beyond Web : = >http://www.eyesbeyond.com = > >>>>>>> Information Technology FreeBSD : = >glewis@FreeBSD.org = > >>>>>>> _______________________________________________ >>>>>>> freebsd-java@freebsd.org = > = mailing list >>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > >>>>>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = = >" >>>>>>=20 >>>>>=20 >>>>>=20 >>>>=20 >>>> _______________________________________________ >>>> freebsd-java@freebsd.org mailing = list >>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = >>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = " >>>=20 >>=20 >=20 > --=20 > Greg Lewis Email : glewis@eyesbeyond.com > Eyes Beyond Web : = http://www.eyesbeyond.com > Information Technology FreeBSD : glewis@FreeBSD.org From owner-freebsd-java@freebsd.org Sat Feb 13 19:09:02 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BEB8AA7548 for ; Sat, 13 Feb 2016 19:09:02 +0000 (UTC) (envelope-from superbisquit@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 6AEFE1D08 for ; Sat, 13 Feb 2016 19:09:02 +0000 (UTC) (envelope-from superbisquit@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 6888FAA7547; Sat, 13 Feb 2016 19:09:02 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F914AA7546 for ; Sat, 13 Feb 2016 19:09:02 +0000 (UTC) (envelope-from superbisquit@gmail.com) Received: from mail-vk0-x233.google.com (mail-vk0-x233.google.com [IPv6:2607:f8b0:400c:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8B001D07 for ; Sat, 13 Feb 2016 19:09:01 +0000 (UTC) (envelope-from superbisquit@gmail.com) Received: by mail-vk0-x233.google.com with SMTP id e6so82349657vkh.2 for ; Sat, 13 Feb 2016 11:09:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=URT2/vFIL02lKbvRredvw7GHusHG1K0UdCiM/9wUDBY=; b=W6koMh5cB4uE9Uk7Mwl/wW9BjLuuWnSMlTN2xFT1jZklGADsv+NBwKLZIl4oGRRP60 EJPo66Zky6g0GRKnTQ8LZXaOOYAag5dcsb/iVsuVf1DIxxuOU7pphH/SwPoRe19zm9vG 6sEJh5kbH3uaOrM7rlgj9KDw+4kdF82SaNatRB9lBJ5qUHAwh89QV0RSzZGATnTzFtOG f5cJJRjZhMcmoFb1Kbly2VHMRvaHXUZ0bkmDNpmmdVGEhlcDXggCBsrjXP/KiPUrGrzZ PVNWXxc3Ix3V6SD4VFVK8DF0Dk3YD9cmRCh6ugXhY9l2cN/5SBGWIORCXKrymta56NmP 0Cfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=URT2/vFIL02lKbvRredvw7GHusHG1K0UdCiM/9wUDBY=; b=XOmrbUUzHKCwkTGaIOVIL3QCsuDgq5puVMgaaF6OA08LjvmEPfYczYgikDRFRwnMu+ bXaeJM6uP95TfwCqJ6zIthw0RTVwKdFrOXcalSB5tWZ+CMXoisLXqKD1DTCuUePubtdF 6RFNLAVBo2zUPVhzETMlkqtctg4T/xHNWJEQuds19k+SgWk9Ldnb1e/fiLlT5wgDxBBb dheZJccir1dYiQEH8aqLO/3KGyiAAwq0Q1dYsPZfrBYvdulRJkvOiOIYQhVZsVA9J3rv UknHHBymLXW311xO9HmcyKD8iLS+CqOUj7R2rsr0MEUewyYWgIvPC47gfHK+w16T8Rwy 8+4Q== X-Gm-Message-State: AG10YOQ5mu04QmGwShv6qkzkpDPrqmtuHGwohNCGnbnNRcXJFBG7Hh5ETwKiwXTqB1IGKBpSt8JYG4uTvBlkMA== MIME-Version: 1.0 X-Received: by 10.31.141.10 with SMTP id p10mr6813983vkd.93.1455390540795; Sat, 13 Feb 2016 11:09:00 -0800 (PST) Received: by 10.103.37.196 with HTTP; Sat, 13 Feb 2016 11:09:00 -0800 (PST) In-Reply-To: <012601d16597$1a53c660$4efb5320$@verizon.net> References: <012601d16597$1a53c660$4efb5320$@verizon.net> Date: Sat, 13 Feb 2016 14:09:00 -0500 Message-ID: Subject: Re: FreeBSD PowerPC Port From: Joe Nosay To: Curtis Hamilton , bsd-port-dev@openjdk.java.net, java@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 19:09:02 -0000 The way I had stated this to be done as was based upon Greg Lewis's advice to me is as such: 1. Boot strap using FreeBSD AMD64/i386 with NFS version 4 to either PowerPC^4 or PowerPC 32. 2. Recreate all of the binaries and libraries needed to build the AMD64/i386 port. 3. Rewrite the Makefiles to build directly on the PowerPC machines using the now created files. 4. Once you have done this, then you will have a natively built port on the FreeBSD PowerPC32/64 machine. 5. I had posted this advice on the FreeBSD forums and the mailing lists a while back. 6. Instructions to doing this have also been described on the forums for other architectures. 7. Do more research next time to see if any effort has been made. On Fri, Feb 12, 2016 at 8:11 AM, Curtis Hamilton wrote: > I'm working on a native PowerPC port of JDK8. I've been successful in > building a Zero JVM. > > I originally posted information on this effort to the AIX-PPC list, > however, it was recommended to post to the BSD list(s) as well. See the > attached for background. > > To date, using the Linux PPC code set, I've been able to build a partiall= y > working native PPC64 JVM. I developed initial patches that can be used t= o > build using the latest FreeBSD port. > > I can make this work available to anyone interested in helping in this > effort. > > Regards, > Curtis > > > ---------- Forwarded message ---------- > From: > To: > Cc: > Date: Fri, 12 Feb 2016 03:28:14 -0500 > Subject: ppc-aix-port-dev Digest, Vol 44, Issue 3 > Send ppc-aix-port-dev mailing list submissions to > ppc-aix-port-dev@openjdk.java.net > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.openjdk.java.net/mailman/listinfo/ppc-aix-port-dev > or, via email, send a message with subject or body 'help' to > ppc-aix-port-dev-request@openjdk.java.net > > You can reach the person managing the list at > ppc-aix-port-dev-owner@openjdk.java.net > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of ppc-aix-port-dev digest..." > > > ---------- Forwarded message ---------- > From: "Lindenmaier, Goetz" > To: "Thomas St=C3=BCfe" , Curtis Hamilton < > hamiltcl@verizon.net> > Cc: , > Date: Fri, 12 Feb 2016 03:27:45 -0500 > Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support > Hi Curtis, > > If SIGTRAP ist he problem, you could try -XX:-UseSIGTRAP. > This slows down null checks a bit, but this should not matter for now. > > Best regards, > Goetz > > > -----Original Message----- > > From: ppc-aix-port-dev [mailto:ppc-aix-port-dev- > > bounces@openjdk.java.net] On Behalf Of Thomas St=C3=BCfe > > Sent: Freitag, 12. Februar 2016 08:08 > > To: Curtis Hamilton > > Cc: ppc-aix-port-dev@openjdk.java.net; bsd-port-dev@openjdk.java.net > > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > > > Hi Curtis, > > > > I think it makes sense to post this on the bsd list too. > > > > See my comments inline. > > > > On Fri, Feb 12, 2016 at 7:26 AM, Curtis Hamilton > > wrote: > > > > > > Thomas/Volker, > > > > > > > > Just wanted to give you an update on my bsd/ppc64 porting effort. > > I=E2=80=99m using the standard bsd openjdk8 port, as the bsd mercurial = needs > > freebsd specific patches. > > > > > > > > I=E2=80=99ve made progress modding the linux/ppc files to work un= der bsd > > and can successfully build a native (ppc64) JVM. Here=E2=80=99s the ou= tput I get > > executing =E2=80=98java =E2=80=93version=E2=80=99 > > > > > > > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # ./java -version > > openjdk version "1.8.0_72-debug" > > OpenJDK Runtime Environment (build 1.8.0_72-debug-b15) > > OpenJDK 64-Bit Server VM (build 25.72-b15-debug, mixed mode) > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # > > > > > > Great Job! > > > > > > > > I can compile and execute the basic =E2=80=9Chello world=E2=80=9D= . However, > > compiling more complicated java code results in a core dump. See the > > following: > > > > > > > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # ./javac HelloWorld.java > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # ./java HelloWorld > > Hello, World > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # ./javac zip.java > > Trace/BPT trap (core dumped) > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # ./javac LargeZip.java > > Trace/BPT trap (core dumped) > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # > > > > As you can see this is a debug build and I=E2=80=99ve been able t= o tell > from the > > core dump, using gdb, that it=E2=80=99s getting a signal 5 at abort. > > > > > > > > > > I think SIGTRAP is used by the ppc JIT for some things (implicit > nullchecks? > > Volker would know better). So, SIGTRAP must be handled for this to work= . > > > > The JVM has a central signal handler, entry point is "signalHandler" in > > os_.cpp, and then it goes on to, in your case, > JVM_handler_bsd_signal() > > in os_bsd_ppc.cpp. > > > > So, make sure that > > > > 1) SIGTRAP is handled by this signal handler - I think, by default bsd > does not > > install a signal handler for SIGTRAP. See > os::Bsd::install_signal_handlers(), > > and compare it with the Linux version. > > > > 2) Then, SIGTRAP must be handled in JVM_handler_bsd_signal(). Compare > > with the SIGTRAP handling for Linux (os_linux_ppc.cpp). But if you copi= ed > > that code, maybe SIGTRAP handling is already in place and (1) was all > that > > was missing. > > > > Also note: The jvm normally writes a error log on crashes which is very > useful > > ("hs_err_") but in your case it was not written at all, because no > signal > > handler was installed for SIGTRAP. So, if you took care of (1) but (2) > is still > > missing, you may still crash but with a real error report log this time= . > > > > Side note: Magnus Ihse Bursie is cleaning up and repairing the BSD port= , > see: > > http://mail.openjdk.java.net/pipermail/bsd-port-dev/2016- > > January/002739.html > > > > His changes are not yet committed, but he posted a webrev with his > changes > > (http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source- > > patches/webrev.01/). It may make sense to integrate this in your build, > he > > did some worthwhile fixes. > > > > Kind Regards, Thomas > > > > > > > > > > Any recommendations on what to look at or how to further debug? > > > > > > > > Regards, > > > > > > > > Curtis > > > > > > > > From: Curtis Hamilton [mailto:hamiltcl@verizon.net > > ] > > Sent: Monday, January 11, 2016 3:29 PM > > To: 'Thomas St=C3=BCfe' > > > > Cc: 'Volker Simonis' > >; 'ppc-aix-port-dev@openjdk.java.net > > ' > dev@openjdk.java.net > > > Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support > > > > > > > > Thomas, > > > > > > > > Thanks for the vector check! > > > > > > > > I agree that the AIX os is quite different from other unices (I > have an > > old PowerStation 220 in my collection). However, the ppc-aix-port was > the > > first that contained code specific to the ppc. Since there isn=E2=80= =99t a > ppc-bsd port, > > I needed somewhere to start. PPC code for both AIX and Linux can be > found > > in the same port. The ports available on FreeBSD currently do contain > any of > > the ppc headers or code. So I decided to use a port that already had > the ppc > > code and go from there. > > > > > > > > Now that ppc code is being integrated into a more universal port,= I > > just need to check which jdk8 port to work with. > > > > > > > > Any recommendation? > > > > > > > > Regards, > > > > Curtis > > > > > > > > From: Thomas St=C3=BCfe [mailto:thomas.stuefe@gmail.com > > ] > > Sent: Monday, January 11, 2016 11:23 AM > > To: Curtis Hamilton > > > > Cc: Volker Simonis > >; ppc-aix-port-dev@openjdk.java.net > > > > > > > > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > > > > > > > > > > > Hi Curtis, > > > > > > > > I am not sure that AIX ppc would be the best source for an BSD > port. > > AIX os port contains a large number of AIX specifics and it is quite a > bit > > different (sometimes, needlessly) from the other Unices. It is also a > moving > > target, at least on jdk9, as we changed a lot in the AIX os port and > will change > > more until the next feature close. > > > > > > > > So, it may be that linux ppc would be a better porting source for > a bsd > > ppc port. > > > > > > > > Kind Regards, Thomas > > > > > > > > > > > > > > > > > > > > > > > > On Mon, Jan 11, 2016 at 3:21 PM, Curtis Hamilton > > > wrote: > > > > Volker, > > > > > > > > Thanks for the response. > > > > > > > > Yes, I=E2=80=99m using the mercurial jdk7u ppc-aix versio= n. The > > reason I used this port version was because I was more familiar with th= e > build > > layout of jdk7 versus jdk8/jdk9. And it seemed like an easier target t= o > start > > with, since it already supported ppc64 on AIX and Linux. > > > > > > > > Full disclosure, I=E2=80=99ve been successful in building= zero vm > for > > both jdk7 and jdk8 on ppc64/FreeBSD. They both work great. The syste= m > > performance is somewhat sluggish, but usable. So I decided to see if I > could > > build native ppc64 versions leveraging the existing AIX and Linux ppc64 > > support in the ppc-aix-port, since the bsd-port lacks support for > PowerPC. > > > > > > > > I=E2=80=99m aware of the integration effort for jdk9. So= on your > > advice, I will start working with ppc-aix jdk8u. I don=E2=80=99t want = anyone to > waste > > time with jdk7u. Although my efforts with this older version is not > completely > > wasted. > > > > > > > > I look forward to contributing to the ppc64/bsd port > OpenJDK > > integration effort. > > > > > > > > Regards, > > > > Curtis > > > > > > > > From: Volker Simonis [mailto:volker.simonis@gmail.com > > ] > > Sent: Monday, January 11, 2016 5:22 AM > > To: Curtis Hamilton > > > > Cc: ppc-aix-port-dev@openjdk.java.net ppc-aix-port- > > dev@openjdk.java.net> > > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > > > > > > > Hi Curtis, > > > > no, I'm not aware of any effort to port the ppc64 port to > BSD. > > > > My first question is why are you building jdk7. It is > quite old > > and we don't actually support it any more. It was also never integrated > into > > the main jdk7u branch. I'd strongly recommend to use at least the jdk8u > > version. If you plan to contribute the ppc64/bsd port for integration > into the > > OpenJDK, this has to be done into the head revision (currently jdk9) > anyway. > > Once it's there, it may be possible to downport it to jdk8u (but not to > jdk7u > > because that on doesn't even contain the ppc64 port). > > > > That said, which version of jdk7u are you using? Is it th= e > one > > from http://hg.openjdk.java.net/ppc-aix-port/jdk7u/ ? > > > > One problem you may encounter with jdk7u is that it was > > never compiled with new versions of gcc. I see you are using gcc4.8 but > we > > used 4.1.2 back then when we were doing the port. > > > > Another problem is that we didn't support the > serviceability > > agent in jdk7u. Support for the SA agent on Linux/ppc64 (but not for > AIX) was > > added in jdk8. The error you see in vmStructs.cpp is most probably from > SA > > coding. How does your file vmStructs_bsd_ppc.hpp looks like. As you can > > see, vmStructs_linux_ppc.hpp is empty in jdk7u for the ppc64 port while > it > > has some code in jdk8u-dev and jdk9. > > > > Unfortunately the place in vmStructs.cpp where the error > > happens is deeply nested macro coding so it's hard to say what's wrong > from > > the error message. You could preprocess the file and post that to the > list, > > maybe we can see more. Just issue the following command from a shell fr= om > > within /usr/ports/tmp/jdk7u/build/bsd- > > ppc/hotspot/outputdir/bsd_ppc64_compiler2/product: > > > > g++48 -DBSD -DPPC64 -D_ALLBSD_SOURCE - > > D_GNU_SOURCE -DPRODUCT - > > I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/prims - > > I/usr/ports/tmp/jdk7u/hotspot/src/share/vm - > > I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/precompiled - > > I/usr/ports/tmp/jdk7u/hotspot/src/cpu/ppc/vm - > > I/usr/ports/tmp/jdk7u/hotspot/src/os_cpu/bsd_ppc/vm - > > I/usr/ports/tmp/jdk7u/hotspot/src/os/bsd/vm - > > I/usr/ports/tmp/jdk7u/hotspot/src/os/posix/vm -I../generated - > > DHOTSPOT_RELEASE_VERSION=3D"\"24.80-b11\"" - > > DHOTSPOT_BUILD_TARGET=3D"\"product\"" - > > DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D\"ppc\" - > > DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" - > > DDEFAULT_LIBPATH=3D"\"/lib:/usr/lib:/usr/local/lib\"" - > > DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_ppc - > > DTARGET_ARCH_MODEL_ppc_64 -DTARGET_OS_ARCH_bsd_ppc - > > DTARGET_OS_ARCH_MODEL_bsd_ppc_64 -DTARGET_COMPILER_gcc - > > DCOMPILER2 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new - > > mpowerpc64 -pipe -DDONT_USE_PRECOMPILED_HEADER -O3 -fno-strict- > > aliasing -D_LP64=3D1 -m64 -mminimal-toc -mcpu=3Dpowerpc64 -mtune=3Dpowe= r5 - > > minsert-sched-nops=3Dregroup_exact -mno-multiple -mno-string - > > DSAFEFETCH_STUBS -DINCLUDE_TRACE=3D1 -Werror -Wpointer-arith - > > Wconversion -Wsign-compare -E > > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp > > > > Regards, > > > > Volker > > > > > > > > On Sun, Jan 10, 2016 at 3:04 PM, Curtis Hamilton > > > wrote: > > > > Hello, > > > > I=E2=80=99d like to know if there=E2=80=99s been = any work done to > > support PPC for *BSD? > > > > I=E2=80=99ve hacked both the AIX and Linux PPC he= aders but > > have been unsuccessful in building HotSpot. All modules seem to build > with > > the exception of VMStructs.cpp with the below error. > > > > > > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cp > > p: In static member function 'static void VMStructs::init()': > > > > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cp > > p:3015: error: cannot convert 'pthread**' to 'pid_t*' in initialization > > > > Build log is attached. > > > > Thanks in advance! > > > > > > > > Curtis > > > > > > > > > > > > > > > > > > ---------- Forwarded message ---------- > From: Volker Simonis > To: "Thomas St=C3=BCfe" > Cc: Curtis Hamilton , < > ppc-aix-port-dev@openjdk.java.net>, > Date: Fri, 12 Feb 2016 03:28:10 -0500 > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > Hi Curtis, > > congratulations from my side as well. Running HelloWorld is always an > important milestone when porting the OpenJDK to a new platform! > > I think Thomas already gave you the right hints. It's true that > SIGTRAP is used a lot within HotSpot and you really need to handle it > correctly. > > As a quick workaround you could also try to use -XX:-UseSIGTRAP which > should switch off the usage of SIGTRAP within the VM. You also have to > use this switch when debugging the VM in a native debugger like gdb > because the debugger also uses SIGTRAP internally. > > Regards, > Volker > > > On Fri, Feb 12, 2016 at 8:08 AM, Thomas St=C3=BCfe > wrote: > > Hi Curtis, > > > > I think it makes sense to post this on the bsd list too. > > > > See my comments inline. > > > > On Fri, Feb 12, 2016 at 7:26 AM, Curtis Hamilton > > wrote: > >> > >> Thomas/Volker, > >> > >> > >> > >> Just wanted to give you an update on my bsd/ppc64 porting effort. I= =E2=80=99m > >> using the standard bsd openjdk8 port, as the bsd mercurial needs freeb= sd > >> specific patches. > >> > >> > >> > >> I=E2=80=99ve made progress modding the linux/ppc files to work under b= sd and can > >> successfully build a native (ppc64) JVM. Here=E2=80=99s the output I = get > executing > >> =E2=80=98java =E2=80=93version=E2=80=99 > >> > >> > >> > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-slow= debug/jdk/bin > >> # ./java -version > >> openjdk version "1.8.0_72-debug" > >> OpenJDK Runtime Environment (build 1.8.0_72-debug-b15) > >> OpenJDK 64-Bit Server VM (build 25.72-b15-debug, mixed mode) > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-slow= debug/jdk/bin > >> # > > > > > > Great Job! > >> > >> I can compile and execute the basic =E2=80=9Chello world=E2=80=9D. Ho= wever, compiling > >> more complicated java code results in a core dump. See the following: > >> > >> > >> > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-slow= debug/jdk/bin > >> # ./javac HelloWorld.java > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-slow= debug/jdk/bin > >> # ./java HelloWorld > >> Hello, World > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-slow= debug/jdk/bin > >> # ./javac zip.java > >> Trace/BPT trap (core dumped) > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-slow= debug/jdk/bin > >> # ./javac LargeZip.java > >> Trace/BPT trap (core dumped) > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-slow= debug/jdk/bin > >> # > >> > >> As you can see this is a debug build and I=E2=80=99ve been able to tel= l from the > >> core dump, using gdb, that it=E2=80=99s getting a signal 5 at abort. > >> > >> > > > > > > I think SIGTRAP is used by the ppc JIT for some things (implicit > nullchecks? > > Volker would know better). So, SIGTRAP must be handled for this to work= . > > > > The JVM has a central signal handler, entry point is "signalHandler" in > > os_.cpp, and then it goes on to, in your case, > JVM_handler_bsd_signal() > > in os_bsd_ppc.cpp. > > > > So, make sure that > > > > 1) SIGTRAP is handled by this signal handler - I think, by default bsd > does > > not install a signal handler for SIGTRAP. See > > os::Bsd::install_signal_handlers(), and compare it with the Linux > version. > > > > 2) Then, SIGTRAP must be handled in JVM_handler_bsd_signal(). Compare > with > > the SIGTRAP handling for Linux (os_linux_ppc.cpp). But if you copied th= at > > code, maybe SIGTRAP handling is already in place and (1) was all that w= as > > missing. > > > > Also note: The jvm normally writes a error log on crashes which is very > > useful ("hs_err_") but in your case it was not written at all, > because > > no signal handler was installed for SIGTRAP. So, if you took care of (1= ) > but > > (2) is still missing, you may still crash but with a real error report > log > > this time. > > > > Side note: Magnus Ihse Bursie is cleaning up and repairing the BSD port= , > > see: > > > http://mail.openjdk.java.net/pipermail/bsd-port-dev/2016-January/002739.h= tml > > > > His changes are not yet committed, but he posted a webrev with his > changes > > ( > http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source-patches/= webrev.01/ > ). > > It may make sense to integrate this in your build, he did some worthwhi= le > > fixes. > > > > Kind Regards, Thomas > > > >> > >> Any recommendations on what to look at or how to further debug? > >> > >> > >> > >> Regards, > >> > >> > >> > >> Curtis > >> > >> > >> > >> From: Curtis Hamilton [mailto:hamiltcl@verizon.net] > >> Sent: Monday, January 11, 2016 3:29 PM > >> To: 'Thomas St=C3=BCfe' > >> Cc: 'Volker Simonis' ; > >> 'ppc-aix-port-dev@openjdk.java.net' > >> Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support > >> > >> > >> > >> Thomas, > >> > >> > >> > >> Thanks for the vector check! > >> > >> > >> > >> I agree that the AIX os is quite different from other unices (I have a= n > >> old PowerStation 220 in my collection). However, the ppc-aix-port was > the > >> first that contained code specific to the ppc. Since there isn=E2=80= =99t a > ppc-bsd > >> port, I needed somewhere to start. PPC code for both AIX and Linux ca= n > be > >> found in the same port. The ports available on FreeBSD currently do > >> contain any of the ppc headers or code. So I decided to use a port th= at > >> already had the ppc code and go from there. > >> > >> > >> > >> Now that ppc code is being integrated into a more universal port, I ju= st > >> need to check which jdk8 port to work with. > >> > >> > >> > >> Any recommendation? > >> > >> > >> > >> Regards, > >> > >> Curtis > >> > >> > >> > >> From: Thomas St=C3=BCfe [mailto:thomas.stuefe@gmail.com] > >> Sent: Monday, January 11, 2016 11:23 AM > >> To: Curtis Hamilton > >> Cc: Volker Simonis ; > >> ppc-aix-port-dev@openjdk.java.net > >> > >> > >> Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > >> > >> > >> > >> Hi Curtis, > >> > >> > >> > >> I am not sure that AIX ppc would be the best source for an BSD port. A= IX > >> os port contains a large number of AIX specifics and it is quite a bit > >> different (sometimes, needlessly) from the other Unices. It is also a > moving > >> target, at least on jdk9, as we changed a lot in the AIX os port and > will > >> change more until the next feature close. > >> > >> > >> > >> So, it may be that linux ppc would be a better porting source for a bs= d > >> ppc port. > >> > >> > >> > >> Kind Regards, Thomas > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> On Mon, Jan 11, 2016 at 3:21 PM, Curtis Hamilton > >> wrote: > >> > >> Volker, > >> > >> > >> > >> Thanks for the response. > >> > >> > >> > >> Yes, I=E2=80=99m using the mercurial jdk7u ppc-aix version. The reaso= n I used > >> this port version was because I was more familiar with the build layou= t > of > >> jdk7 versus jdk8/jdk9. And it seemed like an easier target to start > with, > >> since it already supported ppc64 on AIX and Linux. > >> > >> > >> > >> Full disclosure, I=E2=80=99ve been successful in building zero vm for = both jdk7 > >> and jdk8 on ppc64/FreeBSD. They both work great. The system > performance > >> is somewhat sluggish, but usable. So I decided to see if I could buil= d > >> native ppc64 versions leveraging the existing AIX and Linux ppc64 > support in > >> the ppc-aix-port, since the bsd-port lacks support for PowerPC. > >> > >> > >> > >> I=E2=80=99m aware of the integration effort for jdk9. So on your advi= ce, I will > >> start working with ppc-aix jdk8u. I don=E2=80=99t want anyone to wast= e time > with > >> jdk7u. Although my efforts with this older version is not completely > wasted. > >> > >> > >> > >> I look forward to contributing to the ppc64/bsd port OpenJDK integrati= on > >> effort. > >> > >> > >> > >> Regards, > >> > >> Curtis > >> > >> > >> > >> From: Volker Simonis [mailto:volker.simonis@gmail.com] > >> Sent: Monday, January 11, 2016 5:22 AM > >> To: Curtis Hamilton > >> Cc: ppc-aix-port-dev@openjdk.java.net > >> Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > >> > >> > >> > >> Hi Curtis, > >> > >> no, I'm not aware of any effort to port the ppc64 port to BSD. > >> > >> My first question is why are you building jdk7. It is quite old and we > >> don't actually support it any more. It was also never integrated into > the > >> main jdk7u branch. I'd strongly recommend to use at least the jdk8u > version. > >> If you plan to contribute the ppc64/bsd port for integration into the > >> OpenJDK, this has to be done into the head revision (currently jdk9) > anyway. > >> Once it's there, it may be possible to downport it to jdk8u (but not t= o > >> jdk7u because that on doesn't even contain the ppc64 port). > >> > >> That said, which version of jdk7u are you using? Is it the one from > >> http://hg.openjdk.java.net/ppc-aix-port/jdk7u/ ? > >> > >> One problem you may encounter with jdk7u is that it was never compiled > >> with new versions of gcc. I see you are using gcc4.8 but we used 4.1.2 > back > >> then when we were doing the port. > >> > >> Another problem is that we didn't support the serviceability agent in > >> jdk7u. Support for the SA agent on Linux/ppc64 (but not for AIX) was > added > >> in jdk8. The error you see in vmStructs.cpp is most probably from SA > coding. > >> How does your file vmStructs_bsd_ppc.hpp looks like. As you can see, > >> vmStructs_linux_ppc.hpp is empty in jdk7u for the ppc64 port while it > has > >> some code in jdk8u-dev and jdk9. > >> > >> Unfortunately the place in vmStructs.cpp where the error happens is > deeply > >> nested macro coding so it's hard to say what's wrong from the error > message. > >> You could preprocess the file and post that to the list, maybe we can > see > >> more. Just issue the following command from a shell from within > >> > /usr/ports/tmp/jdk7u/build/bsd-ppc/hotspot/outputdir/bsd_ppc64_compiler2/= product: > >> > >> g++48 -DBSD -DPPC64 -D_ALLBSD_SOURCE -D_GNU_SOURCE -DPRODUCT > >> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/prims > >> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm > >> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/precompiled > >> -I/usr/ports/tmp/jdk7u/hotspot/src/cpu/ppc/vm > >> -I/usr/ports/tmp/jdk7u/hotspot/src/os_cpu/bsd_ppc/vm > >> -I/usr/ports/tmp/jdk7u/hotspot/src/os/bsd/vm > >> -I/usr/ports/tmp/jdk7u/hotspot/src/os/posix/vm -I../generated > >> -DHOTSPOT_RELEASE_VERSION=3D"\"24.80-b11\"" > >> -DHOTSPOT_BUILD_TARGET=3D"\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\= "" > >> -DHOTSPOT_LIB_ARCH=3D\"ppc\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" > >> -DDEFAULT_LIBPATH=3D"\"/lib:/usr/lib:/usr/local/lib\"" > -DTARGET_OS_FAMILY_bsd > >> -DTARGET_ARCH_ppc -DTARGET_ARCH_MODEL_ppc_64 -DTARGET_OS_ARCH_bsd_ppc > >> -DTARGET_OS_ARCH_MODEL_bsd_ppc_64 -DTARGET_COMPILER_gcc -DCOMPILER2 > -fPIC > >> -fno-rtti -fno-exceptions -pthread -fcheck-new -mpowerpc64 -pipe > >> -DDONT_USE_PRECOMPILED_HEADER -O3 -fno-strict-aliasing -D_LP64=3D1 -m6= 4 > >> -mminimal-toc -mcpu=3Dpowerpc64 -mtune=3Dpower5 > >> -minsert-sched-nops=3Dregroup_exact -mno-multiple -mno-string > >> -DSAFEFETCH_STUBS -DINCLUDE_TRACE=3D1 -Werror -Wpointer-arith -Wconver= sion > >> -Wsign-compare -E > >> /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp > >> > >> Regards, > >> > >> Volker > >> > >> > >> > >> On Sun, Jan 10, 2016 at 3:04 PM, Curtis Hamilton > >> wrote: > >> > >> Hello, > >> > >> I=E2=80=99d like to know if there=E2=80=99s been any work done to supp= ort PPC for *BSD? > >> > >> I=E2=80=99ve hacked both the AIX and Linux PPC headers but have been > unsuccessful > >> in building HotSpot. All modules seem to build with the exception of > >> VMStructs.cpp with the below error. > >> > >> /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp: In > static > >> member function 'static void VMStructs::init()': > >> /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp:3015: > >> error: cannot convert 'pthread**' to 'pid_t*' in initialization > >> > >> Build log is attached. > >> > >> Thanks in advance! > >> > >> > >> > >> Curtis > >> > >> > >> > >> > >> > >> > > > > > > > _______________________________________________ > freebsd-java@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > From owner-freebsd-java@freebsd.org Sat Feb 13 19:09:19 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1787AA7574 for ; Sat, 13 Feb 2016 19:09:18 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C68A31D31 for ; Sat, 13 Feb 2016 19:09:18 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: by mailman.ysv.freebsd.org (Postfix) id C624DAA7573; Sat, 13 Feb 2016 19:09:18 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5977AA7572 for ; Sat, 13 Feb 2016 19:09:18 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from mail.timestudybuddy.com (mail.timestudybuddy.com [72.29.186.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BD561D30 for ; Sat, 13 Feb 2016 19:09:18 +0000 (UTC) (envelope-from openjdk@getsnappy.com) Received: from [192.168.0.2] (66-169-227-8.dhcp.gvrb.ca.charter.com [66.169.227.8]) (authenticated bits=0) by mail.timestudybuddy.com (8.15.2/8.14.9) with ESMTPSA id u1DJ0OAq003235 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Feb 2016 11:00:25 -0800 (PST) (envelope-from openjdk@getsnappy.com) X-Authentication-Warning: mailA.getsnappy.com: Host 66-169-227-8.dhcp.gvrb.ca.charter.com [66.169.227.8] claimed to be [192.168.0.2] Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: Helping out with JDK 9 on BSD From: Brian Gardner In-Reply-To: <20160213080945.GC56357@misty.eyesbeyond.com> Date: Sat, 13 Feb 2016 11:08:36 -0800 Cc: Magnus Ihse Bursie , java@freebsd.org Message-Id: <99C45649-B498-4BE1-97D4-0CEE0BC8A77D@getsnappy.com> References: <56ADE7D4.8020107@oracle.com> <56ADE943.6020103@oracle.com> <8B9ACABA-F9B2-4288-9DB5-CA843DE48C34@getsnappy.com> <20160203034053.GA36170@misty.eyesbeyond.com> <56B45453.9020006@oracle.com> <1C39812E-E596-47E6-AB45-0A591A017FFB@getsnappy.com> <20160213080945.GC56357@misty.eyesbeyond.com> To: Greg Lewis X-Mailer: Apple Mail (2.3112) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 19:09:19 -0000 I=E2=80=99m sending those links again, it came through weird on the = mailing list porting build_vm_def.sh from bsd-port/jdk8 repo, to fix NM errors during = build http://brian.timestudybuddy.com/webrev/hotspot__NM/webrev/ Add SUPPORT_RESERVED_STACK_AREA flag for all BSD's = http://brian.timestudybuddy.com/webrev/hotspot__SUPPORT_RESERVED_STACK_ARE= A/webrev/ porting getthreadid logic from bsd-port/jdk8. calling = syscall(SYS_thr_self) caused pthread_setspecific to be cleared. = http://brian.timestudybuddy.com/webrev/hotspot__os_bsd_cpp__getthreadid/we= brev/ adding in servicability agent ported from bsd-port/jdk8 http://brian.timestudybuddy.com/webrev/hotspot__sa/webrev/ adding classlist.bsd that is identical to classlist.linux, in order to = compile http://brian.timestudybuddy.com/webrev/jdk__classlist-bsd/webrev/ clean up TLS current thread at end of ::run functions similar to how = it's done in openjdk8. = http://brian.timestudybuddy.com/webrev/hotspot__clear_thread_current/webre= v/ clear current thread before exiting java_start to avoid warnings from = leftover pthread_setspecific data = http://brian.timestudybuddy.com/webrev/hotspot__clear_thread_current_alt/w= ebrev/ > On Feb 13, 2016, at 12:09 AM, Greg Lewis = wrote: >=20 > On Fri, Feb 12, 2016 at 10:54:29AM -0800, Brian Gardner wrote: >> After giving it some thought, I???ve created an alternate patch for = the clear_current_thread issue. I like this solution better because it = is isolated to java_start function in os_bsd.cpp, and it makes = java_start responsible for cleaning up the current_thread since it also = initializes it. >=20 > Sounds good! What can I do to help get all the changes up for review? >=20 > -- Greg >=20 >>> On Feb 10, 2016, at 10:45 PM, Brian Gardner = wrote: >>>=20 >>> Hello again Greg and Magnus, >>> I finished up researching the leftover thread-specific data after 4 = destructor iterations issue. It looks like it???s currently functioning = on Freebsd the same way it does on Linux, the only difference is that = Freebsd output that warning were Linux silently stops after it???s forth = try. I looked into how openjdk8 was working and it looks like there = were calls to TLS::set_thread(NULL) scattered throughout the code base = at the end of some ::run methods. I???ve mimicked that behavior in the = necessary spots with the following patch. I can???t help but think = there must be a better way to get these Thread???s destructors called, = and I tried that in place of making clear_thread_current public and = calling it directly, but it resulted in deadlock. >>>=20 >>> >>>=20 >>>> On Feb 9, 2016, at 2:36 PM, Brian Gardner > wrote: >>>>=20 >>>> Hi Greg and Magnus, >>>> I???ve attached the patches needed to build and compile on Freebsd. = I???ve reverted my changes to TLS, and done more debugging there. = There appears to be two separate issues. One issue was that the = implementation of OS::bad::gettid() was somehow clearing the current = thread previously set with pthread_setspecific. I was able to fix this = by porting logic from bad-port/jdk8, see = hotspot__os_bd_cpp__getthreadid.patch. The second issue seems to be = related to certain types of threads never getting their destructor = called and therefor not clearing pthread_setspecific and resulting in = Thread 803c59000 has exited with leftover thread-specific data after 4 = destructor iterations, errors. This one I haven???t tracked down yet = and will continue looking into. While I can compile and execute = HelloWorld, I???m getting a ton of these benign yet annoying messages = from ConcurrentGC and Worker threads. I???ll continue looking into that = next week. >>>>=20 >>>>=20 >>>>> On Feb 4, 2016, at 11:50 PM, Magnus Ihse Bursie = > = wrote: >>>>>=20 >>>>> On 2016-02-04 01:29, Brian Gardner wrote: >>>>>> Hi Greg, >>>>>> Great to hear from you, it???s been a while since I took on one = of these projects, but I do follow the java@freebsd mailing list and see = all the work you put in. I must tell you how greatly your work is = appreciated by me and I???m sure the rest of the community. I have good = news, with fairly minimal changes I have it compiling, building = HelloWorld, and running HelloWorld all without errors. >>>>>>=20 >>>>>> I think it???ll break down into 4 change sets, >>>>>> NM - I ported some code from = bsd-port/jdk8/hotspot/make/bsd/makefiles/build_vm_def.sh that fixes a = compile error=20 >>>>>> SUPPORT_RESERVED_STACK_AREA - define SUPPORT_RESERVED_STACK_AREA = for _ALLBSD_SOURCE >>>>>> Serviceability Agent - ported from bad-port/jdk8, currently = compiles but hasn???t been tested >>>>>> TLS - there is problems with the TLS in jdk9 used for = Thread::current(). This caused several issues for me and while the fix = was relatively straight forward in using THREAD_LOCAL_DECL completely in = place of TLS completely, I???d imagine there was a reason it was = implemented in sort of a Hybrid fashion alongside TLS. >>>>>=20 >>>>> There is a reason. It is very well described in this comment: >>>>> = https://bugs.openjdk.java.net/browse/JDK-8132510?focusedCommentId=3D138665= 05 = = > >>>>>=20 >>>>> The TL;DR: in some circumstances the JVM can crash if we do not = set up an initial TLS. On the other hand, this was for glibc, so maybe = this situation does not arise for FreeBSD. >>>>>=20 >>>>>>=20 >>>>>> It would be great if I could post these as web reviews for others = to review. Greg, would getting access to bsd-port/jdk9 allow us to = collaborate through web reviews? =20 >>>>>=20 >>>>>=20 >>>>>> Magnus, do you think using bsd-port/jdk9 for this purpose be a = step towards getting these basic changes into the jdk9 mainline, or = would your colleagues think "if they have bsd-port/jdk9, why bother with = integrating them into the jdk9 mainline???? >>>>>=20 >>>>> I think putting these changes in bsd-port/jdk9 is very reasonable, = and I do not believe it will in any way hinder their acceptance into = jdk9 mainline. The only thing to be careful about there, though, is that = all contributors have signed the OCA (Oracle contributor agreement). = Mixing in "legally bad" code can present a real problem for adoption = into mainline. >>>>>=20 >>>>> /Magnus >>>>>=20 >>>>>>=20 >>>>>> Brian Gardner >>>>>>=20 >>>>>>> On Feb 2, 2016, at 7:40 PM, Greg Lewis < = >glewis@eyesbeyond.com = >> wrote: >>>>>>>=20 >>>>>>> On Sun, Jan 31, 2016 at 06:57:26AM -0800, Brian Gardner wrote: >>>>>>>> I???m interested in helping. I ported openjdk6 to freebsd and = also helped out with openjdk8. >>>>>>>>=20 >>>>>>>> Brian Gardner >>>>>>>=20 >>>>>>> I'd love to see as much of these changes get into the jdk9 = mainline. My time >>>>>>> is really limited for the next couple of weeks though. If it = would help you >>>>>>> or Magnus to use the bsd-port repo to stage changes then that = would be >>>>>>> great too. Let me do a merge to make sure it is up to date with = mainline. >>>>>>> Notionally we'd have to do a vote to get you both access I = think? But I >>>>>>> can shepherd changes in if that will help with sharing them. >>>>>>>=20 >>>>>>> FWIW, in terms of taking responsibility, I've been regularly = updating the >>>>>>> repos for jdk8 and jdk7 for a couple of years. I'm happy to = keep jdk9 >>>>>>> building if that is what is being looked for there and also port = more of >>>>>>> the BSD changes for jdk8 as appropriate. >>>>>>>=20 >>>>>>> - Greg >>>>>>>=20 >>>>>>>>> On Jan 31, 2016, at 3:00 AM, Magnus Ihse Bursie = = >> wrote: >>>>>>>>>=20 >>>>>>>>> On 2016-01-31 11:54, Magnus Ihse Bursie wrote: >>>>>>>>>> Hi, >>>>>>>>>>=20 >>>>>>>>>> [TL;DR: I'm offering patches to compile JDK 9 on FreeBSD, but = it's not clear where to put them, or how.] >>>>>>>>>>=20 >>>>>>>>>> I'm working at Oracle on the OpenJDK build team and is = responsible for large parts of the build system of OpenJDK. Lately, I've = been playing around with FreeBSD (and other BSDs) in my free time, and = I've written a patch that will add build system support for FreeBSD, = OpenBSD and NetBSD in JDK 9 (tracked in = >https://bugs.openjdk.ja= va.net/browse/JDK-8147795 = >). >>>>>>>>>>=20 >>>>>>>>>> I started writing this when I realized that the jdk9 branch = in the OpenJDK bsd-port repository did not contain any BSD-specific = changes at all, and the old JDK 8 changes will not readily be portable, = due to major changes in the build system between JDK 8 and JDK 9. >>>>>>>>>>=20 >>>>>>>>>> I thought it would be a no-brainer to integrate these changes = into the JDK 9 mainline, so they would be in place for whenever you guys = would start to attack porting the code base. However, some of my = collegues thought otherwise. The end result, I think, is that they = wanted to see someone (not necessarily a company, the FreeBSD = organisation for instance seemed to be okay), to step forward and say = "we take responsibility for the BSD port", and give some kind of = commitment to actually use these build changes in producing a viable = port. You can read the mail conversation here: = >http://mail.openjdk.java.net/pipermail/build-dev/2016-January/016421.htm= l = = > >>>>>>>>>=20 >>>>>>>>> I forgot to add that I'm willing to help with build issues for = the BSD port, as far as my (like everybode else's) limited free time = allows me. Unfortunately, I'm still a noob at BSD internals and can't = really help with much apart from that. >>>>>>>>>=20 >>>>>>>>> /Magnus >>>>>>>>>=20 >>>>>>>>>=20 >>>>>>>>>>=20 >>>>>>>>>> An alternative to pushing this code into the JDK 9 mainline = is of course to push it to the bsd-port/jdk9 repo (given that the owners = of that repo approves), but that seems like a less favourable solution. = Having the code in the mainline does not mean that it gets tested = automatically, but it means that it will be part of e.g. refactoring, = that would otherwise break a downstream patchset. >>>>>>>>>>=20 >>>>>>>>>> I cc:ed this conversation to the = >bsd-port-dev@openjdk.java.net = = > mailing list, but never got any = kind of official response there. Since this list seems more active, I'm = trying here instead. :) >>>>>>>>>>=20 >>>>>>>>>> So, I'm offering two patches here, one that applies to the = build system, is nice and clean, and possible to integrate into JDK 9 = mainline, if my collegues are convinced that someone is backing up the = BSD port. And there's a second patch, which fixes broken C/C++/Java code = and results in a product that can at least run "javac HelloWorld", but = this is not yet clean enough for integration anywere, at least not the = JDK 9 mainline. (I don't know enough of the BSD internals to fix all = problems, so there's some "#if 0" code here and there.) >>>>>>>>>>=20 >>>>>>>>>> /Magnus >>>>>>>>>>=20 >>>>>>>>>> _______________________________________________ >>>>>>>>>> freebsd-java@freebsd.org = > = mailing list >>>>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > >>>>>>>>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = " = > >>>>>>>>>=20 >>>>>>>>> _______________________________________________ >>>>>>>>> freebsd-java@freebsd.org = > = = >> = mailing list >>>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > = = >> >>>>>>>>> To unsubscribe, send any mail to " = >freebsd-java-unsubscribe@fre= ebsd.org = > < = >mailto:freebsd-java-unsubscr= ibe@freebsd.org = >>" >>>>>>>>=20 >>>>>>>> _______________________________________________ >>>>>>>> freebsd-java@freebsd.org = > = mailing list >>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > >>>>>>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = " = > >>>>>>>=20 >>>>>>> --=20 >>>>>>> Greg Lewis Email : = >glewis@eyesbeyond.com = > >>>>>>> Eyes Beyond Web : = >http://www.eyesbeyond.com = > >>>>>>> Information Technology FreeBSD : = >glewis@FreeBSD.org = > >>>>>>> _______________________________________________ >>>>>>> freebsd-java@freebsd.org = > = mailing list >>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = = > >>>>>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = = >" >>>>>>=20 >>>>>=20 >>>>>=20 >>>>=20 >>>> _______________________________________________ >>>> freebsd-java@freebsd.org mailing = list >>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java = >>>> To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org = " >>>=20 >>=20 >=20 > --=20 > Greg Lewis Email : glewis@eyesbeyond.com > Eyes Beyond Web : = http://www.eyesbeyond.com > Information Technology FreeBSD : glewis@FreeBSD.org From owner-freebsd-java@freebsd.org Sat Feb 13 20:43:12 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1A0BAA896E for ; Sat, 13 Feb 2016 20:43:12 +0000 (UTC) (envelope-from toby@telegraphics.com.au) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id D10B21190 for ; Sat, 13 Feb 2016 20:43:12 +0000 (UTC) (envelope-from toby@telegraphics.com.au) Received: by mailman.ysv.freebsd.org (Postfix) id D00E6AA896D; Sat, 13 Feb 2016 20:43:12 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFA6FAA896C for ; Sat, 13 Feb 2016 20:43:12 +0000 (UTC) (envelope-from toby@telegraphics.com.au) Received: from kvm5.telegraphics.com.au (kvm5.telegraphics.com.au [98.124.60.144]) by mx1.freebsd.org (Postfix) with ESMTP id B1702118F for ; Sat, 13 Feb 2016 20:43:12 +0000 (UTC) (envelope-from toby@telegraphics.com.au) Received: from [10.210.249.17] (unknown [10.210.249.17]) by kvm5.telegraphics.com.au (Postfix) with ESMTP id D93B322878; Sat, 13 Feb 2016 15:35:34 -0500 (EST) Subject: Re: FreeBSD PowerPC Port To: Curtis Hamilton , 'Joe Nosay' References: <012601d16597$1a53c660$4efb5320$@verizon.net> <019901d16699$fff8a610$ffe9f230$@verizon.net> Cc: java@freebsd.org, bsd-port-dev@openjdk.java.net From: Toby Thain Message-ID: <56BF938A.2010408@telegraphics.com.au> Date: Sat, 13 Feb 2016 15:35:22 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <019901d16699$fff8a610$ffe9f230$@verizon.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 20:43:13 -0000 On 2016-02-13 3:06 PM, Curtis Hamilton wrote: > Thanks for the response, but I think you missed the point of my email. > > As I stated in my email, I've already built a Zero VM, interpreter based JDK. That's what you get with the instructions you provided. > > My goal was building a true native PowerPC (JIT) JDK, which until about 12 hours ago was only available for AIX and Linux. > > Using the Zero VM JDK and modifying the Linux PPC code, I've successfully built a true native PowerPC (JIT) JDK. Which is an order of magnitude faster than the interpreted JDK. Nice work! I'd be interested to see a path to getting that working on the OS X/PowerPC target. Would you say it's feasible? There is a working Zero build at least for JDK 7. ( ref https://wiki.openjdk.java.net/display/BSDPort/Darwin9Build ) --Toby > > BTW, I did the research and communicated with Greg, as well as others across the OpenJDK community. > > Regards! > From owner-freebsd-java@freebsd.org Sat Feb 13 21:06:56 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12549AA60A2 for ; Sat, 13 Feb 2016 21:06:56 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id F0B7E1C51 for ; Sat, 13 Feb 2016 21:06:55 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: by mailman.ysv.freebsd.org (Postfix) id ED3E5AA60A1; Sat, 13 Feb 2016 21:06:55 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D44DEAA60A0 for ; Sat, 13 Feb 2016 21:06:55 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: from vms173007pub.verizon.net (vms173007pub.verizon.net [206.46.173.7]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B304F1C50 for ; Sat, 13 Feb 2016 21:06:54 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: from vz-proxy-l002.mx.aol.com ([64.236.82.154]) by vms173007.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0O2I003O356UTN00@vms173007.mailsrvcs.net> for java@freebsd.org; Sat, 13 Feb 2016 14:06:31 -0600 (CST) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=WpDWSorv c=1 sm=1 tr=0 a=Ut/DdBcw22SB5hFy08yqCQ==:117 a=IkcTkHD0fZMA:10 a=jFJIQSaiL_oA:10 a=6I5d2MoRAAAA:8 a=o1OHuDzbAAAA:8 a=COfzQ7OkAAAA:8 a=UnnwD1GPAAAA:8 a=pGLkceISAAAA:8 a=_XVtnMeiVL9w8AWORSMA:9 a=c28UThVA-4dR3DFQ:21 a=QoVe30WrIxaDH1sF:21 a=QEXdDO2ut3YA:10 Received: by 96.255.168.17 with SMTP id 3fc8619b; Sat, 13 Feb 2016 20:06:31 GMT From: "Curtis Hamilton" To: "'Joe Nosay'" Cc: , References: <012601d16597$1a53c660$4efb5320$@verizon.net> In-reply-to: Subject: RE: FreeBSD PowerPC Port Date: Sat, 13 Feb 2016 15:06:15 -0500 Message-id: <019901d16699$fff8a610$ffe9f230$@verizon.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable X-Mailer: Microsoft Outlook 15.0 Thread-index: AQIg/xF0Ng5RvJUB80OM+nuhKzAxVgGG+18ann73dXA= Content-language: en-us X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 21:06:56 -0000 Thanks for the response, but I think you missed the point of my email. = As I stated in my email, I've already built a Zero VM, interpreter based = JDK. That's what you get with the instructions you provided. My goal was building a true native PowerPC (JIT) JDK, which until about = 12 hours ago was only available for AIX and Linux. =20 Using the Zero VM JDK and modifying the Linux PPC code, I've = successfully built a true native PowerPC (JIT) JDK. Which is an order = of magnitude faster than the interpreted JDK. BTW, I did the research and communicated with Greg, as well as others = across the OpenJDK community. Regards! -----Original Message----- From: owner-freebsd-java@freebsd.org = [mailto:owner-freebsd-java@freebsd.org] On Behalf Of Joe Nosay Sent: Saturday, February 13, 2016 2:09 PM To: Curtis Hamilton ; = bsd-port-dev@openjdk.java.net; java@freebsd.org Subject: Re: FreeBSD PowerPC Port The way I had stated this to be done as was based upon Greg Lewis's = advice to me is as such: 1. Boot strap using FreeBSD AMD64/i386 with NFS version 4 to either PowerPC^4 or PowerPC 32. 2. Recreate all of the binaries and libraries needed to build the AMD64/i386 port. 3. Rewrite the Makefiles to build directly on the PowerPC machines using = the now created files. 4. Once you have done this, then you will have a natively built port on = the FreeBSD PowerPC32/64 machine. 5. I had posted this advice on the FreeBSD forums and the mailing lists = a while back. 6. Instructions to doing this have also been described on the forums for = other architectures. 7. Do more research next time to see if any effort has been made. On Fri, Feb 12, 2016 at 8:11 AM, Curtis Hamilton wrote: > I'm working on a native PowerPC port of JDK8. I've been successful = in > building a Zero JVM. > > I originally posted information on this effort to the AIX-PPC list,=20 > however, it was recommended to post to the BSD list(s) as well. See=20 > the attached for background. > > To date, using the Linux PPC code set, I've been able to build a=20 > partially working native PPC64 JVM. I developed initial patches that=20 > can be used to build using the latest FreeBSD port. > > I can make this work available to anyone interested in helping in this = > effort. > > Regards, > Curtis > > > ---------- Forwarded message ---------- > From: > To: > Cc: > Date: Fri, 12 Feb 2016 03:28:14 -0500 > Subject: ppc-aix-port-dev Digest, Vol 44, Issue 3 Send=20 > ppc-aix-port-dev mailing list submissions to > ppc-aix-port-dev@openjdk.java.net > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.openjdk.java.net/mailman/listinfo/ppc-aix-port-dev > or, via email, send a message with subject or body 'help' to > ppc-aix-port-dev-request@openjdk.java.net > > You can reach the person managing the list at > ppc-aix-port-dev-owner@openjdk.java.net > > When replying, please edit your Subject line so it is more specific=20 > than "Re: Contents of ppc-aix-port-dev digest..." > > > ---------- Forwarded message ---------- > From: "Lindenmaier, Goetz" > To: "Thomas St=C3=BCfe" , Curtis Hamilton <=20 > hamiltcl@verizon.net> > Cc: ,=20 > > Date: Fri, 12 Feb 2016 03:27:45 -0500 > Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support Hi Curtis, > > If SIGTRAP ist he problem, you could try -XX:-UseSIGTRAP. > This slows down null checks a bit, but this should not matter for now. > > Best regards, > Goetz > > > -----Original Message----- > > From: ppc-aix-port-dev [mailto:ppc-aix-port-dev-=20 > > bounces@openjdk.java.net] On Behalf Of Thomas St=C3=BCfe > > Sent: Freitag, 12. Februar 2016 08:08 > > To: Curtis Hamilton > > Cc: ppc-aix-port-dev@openjdk.java.net; bsd-port-dev@openjdk.java.net > > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > > > Hi Curtis, > > > > I think it makes sense to post this on the bsd list too. > > > > See my comments inline. > > > > On Fri, Feb 12, 2016 at 7:26 AM, Curtis Hamilton=20 > > > wrote: > > > > > > Thomas/Volker, > > > > > > > > Just wanted to give you an update on my bsd/ppc64 porting = effort. > > I=E2=80=99m using the standard bsd openjdk8 port, as the bsd = mercurial needs=20 > > freebsd specific patches. > > > > > > > > I=E2=80=99ve made progress modding the linux/ppc files to work = under=20 > > bsd and can successfully build a native (ppc64) JVM. Here=E2=80=99s = the=20 > > output I get executing =E2=80=98java =E2=80=93version=E2=80=99 > > > > > > > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # ./java -version > > openjdk version "1.8.0_72-debug" > > OpenJDK Runtime Environment (build 1.8.0_72-debug-b15) > > OpenJDK 64-Bit Server VM (build 25.72-b15-debug, mixed mode) > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # > > > > > > Great Job! > > > > > > > > I can compile and execute the basic =E2=80=9Chello = world=E2=80=9D. However,=20 > > compiling more complicated java code results in a core dump. See=20 > > the > > following: > > > > > > > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # ./javac HelloWorld.java > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # ./java HelloWorld > > Hello, World > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # ./javac zip.java > > Trace/BPT trap (core dumped) > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # ./javac LargeZip.java > > Trace/BPT trap (core dumped) > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > > ppc64-normal-server-slowdebug/jdk/bin # > > > > As you can see this is a debug build and I=E2=80=99ve been = able to=20 > > tell > from the > > core dump, using gdb, that it=E2=80=99s getting a signal 5 at abort. > > > > > > > > > > I think SIGTRAP is used by the ppc JIT for some things (implicit > nullchecks? > > Volker would know better). So, SIGTRAP must be handled for this to = work. > > > > The JVM has a central signal handler, entry point is "signalHandler" = > > in os_.cpp, and then it goes on to, in your case, > JVM_handler_bsd_signal() > > in os_bsd_ppc.cpp. > > > > So, make sure that > > > > 1) SIGTRAP is handled by this signal handler - I think, by default=20 > > bsd > does not > > install a signal handler for SIGTRAP. See > os::Bsd::install_signal_handlers(), > > and compare it with the Linux version. > > > > 2) Then, SIGTRAP must be handled in JVM_handler_bsd_signal().=20 > > Compare with the SIGTRAP handling for Linux (os_linux_ppc.cpp). But=20 > > if you copied that code, maybe SIGTRAP handling is already in place=20 > > and (1) was all > that > > was missing. > > > > Also note: The jvm normally writes a error log on crashes which is=20 > > very > useful > > ("hs_err_") but in your case it was not written at all, because = > > no > signal > > handler was installed for SIGTRAP. So, if you took care of (1) but=20 > > (2) > is still > > missing, you may still crash but with a real error report log this = time. > > > > Side note: Magnus Ihse Bursie is cleaning up and repairing the BSD=20 > > port, > see: > > http://mail.openjdk.java.net/pipermail/bsd-port-dev/2016- > > January/002739.html > > > > His changes are not yet committed, but he posted a webrev with his > changes > > (http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source- > > patches/webrev.01/). It may make sense to integrate this in your=20 > > build, > he > > did some worthwhile fixes. > > > > Kind Regards, Thomas > > > > > > > > > > Any recommendations on what to look at or how to further = debug? > > > > > > > > Regards, > > > > > > > > Curtis > > > > > > > > From: Curtis Hamilton [mailto:hamiltcl@verizon.net=20 > > ] > > Sent: Monday, January 11, 2016 3:29 PM > > To: 'Thomas St=C3=BCfe' > > > > Cc: 'Volker Simonis' > >;=20 > > 'ppc-aix-port-dev@openjdk.java.net > > ' > dev@openjdk.java.net > > > Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support > > > > > > > > Thomas, > > > > > > > > Thanks for the vector check! > > > > > > > > I agree that the AIX os is quite different from other unices=20 > > (I > have an > > old PowerStation 220 in my collection). However, the ppc-aix-port=20 > > was > the > > first that contained code specific to the ppc. Since there = isn=E2=80=99t a > ppc-bsd port, > > I needed somewhere to start. PPC code for both AIX and Linux can be > found > > in the same port. The ports available on FreeBSD currently do = contain > any of > > the ppc headers or code. So I decided to use a port that already=20 > > had > the ppc > > code and go from there. > > > > > > > > Now that ppc code is being integrated into a more universal=20 > > port, I just need to check which jdk8 port to work with. > > > > > > > > Any recommendation? > > > > > > > > Regards, > > > > Curtis > > > > > > > > From: Thomas St=C3=BCfe [mailto:thomas.stuefe@gmail.com=20 > > ] > > Sent: Monday, January 11, 2016 11:23 AM > > To: Curtis Hamilton > > > > Cc: Volker Simonis > >;=20 > > ppc-aix-port-dev@openjdk.java.net=20 > > > > > > > > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > > > > > > > > > > > Hi Curtis, > > > > > > > > I am not sure that AIX ppc would be the best source for an BSD > port. > > AIX os port contains a large number of AIX specifics and it is quite = > > a > bit > > different (sometimes, needlessly) from the other Unices. It is also=20 > > a > moving > > target, at least on jdk9, as we changed a lot in the AIX os port and > will change > > more until the next feature close. > > > > > > > > So, it may be that linux ppc would be a better porting source=20 > > for > a bsd > > ppc port. > > > > > > > > Kind Regards, Thomas > > > > > > > > > > > > > > > > > > > > > > > > On Mon, Jan 11, 2016 at 3:21 PM, Curtis Hamilton=20 > > > wrote: > > > > Volker, > > > > > > > > Thanks for the response. > > > > > > > > Yes, I=E2=80=99m using the mercurial jdk7u ppc-aix = version. =20 > > The reason I used this port version was because I was more familiar=20 > > with the > build > > layout of jdk7 versus jdk8/jdk9. And it seemed like an easier=20 > > target to > start > > with, since it already supported ppc64 on AIX and Linux. > > > > > > > > Full disclosure, I=E2=80=99ve been successful in = building zero=20 > > vm > for > > both jdk7 and jdk8 on ppc64/FreeBSD. They both work great. The = system > > performance is somewhat sluggish, but usable. So I decided to see=20 > > if I > could > > build native ppc64 versions leveraging the existing AIX and Linux=20 > > ppc64 support in the ppc-aix-port, since the bsd-port lacks support=20 > > for > PowerPC. > > > > > > > > I=E2=80=99m aware of the integration effort for jdk9. = So on=20 > > your advice, I will start working with ppc-aix jdk8u. I = don=E2=80=99t want=20 > > anyone to > waste > > time with jdk7u. Although my efforts with this older version is not > completely > > wasted. > > > > > > > > I look forward to contributing to the ppc64/bsd port > OpenJDK > > integration effort. > > > > > > > > Regards, > > > > Curtis > > > > > > > > From: Volker Simonis [mailto:volker.simonis@gmail.com=20 > > ] > > Sent: Monday, January 11, 2016 5:22 AM > > To: Curtis Hamilton > > > > Cc: ppc-aix-port-dev@openjdk.java.net ppc-aix-port- > > dev@openjdk.java.net> > > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > > > > > > > Hi Curtis, > > > > no, I'm not aware of any effort to port the ppc64 port = > > to > BSD. > > > > My first question is why are you building jdk7. It is > quite old > > and we don't actually support it any more. It was also never=20 > > integrated > into > > the main jdk7u branch. I'd strongly recommend to use at least the=20 > > jdk8u version. If you plan to contribute the ppc64/bsd port for=20 > > integration > into the > > OpenJDK, this has to be done into the head revision (currently jdk9) > anyway. > > Once it's there, it may be possible to downport it to jdk8u (but not = > > to > jdk7u > > because that on doesn't even contain the ppc64 port). > > > > That said, which version of jdk7u are you using? Is it = > > the > one > > from http://hg.openjdk.java.net/ppc-aix-port/jdk7u/ ? > > > > One problem you may encounter with jdk7u is that it=20 > > was never compiled with new versions of gcc. I see you are using=20 > > gcc4.8 but > we > > used 4.1.2 back then when we were doing the port. > > > > Another problem is that we didn't support the > serviceability > > agent in jdk7u. Support for the SA agent on Linux/ppc64 (but not for > AIX) was > > added in jdk8. The error you see in vmStructs.cpp is most probably=20 > > from > SA > > coding. How does your file vmStructs_bsd_ppc.hpp looks like. As you=20 > > can see, vmStructs_linux_ppc.hpp is empty in jdk7u for the ppc64=20 > > port while > it > > has some code in jdk8u-dev and jdk9. > > > > Unfortunately the place in vmStructs.cpp where the=20 > > error happens is deeply nested macro coding so it's hard to say=20 > > what's wrong > from > > the error message. You could preprocess the file and post that to=20 > > the > list, > > maybe we can see more. Just issue the following command from a shell = > > from within /usr/ports/tmp/jdk7u/build/bsd- > > ppc/hotspot/outputdir/bsd_ppc64_compiler2/product: > > > > g++48 -DBSD -DPPC64 -D_ALLBSD_SOURCE - D_GNU_SOURCE=20 > > -DPRODUCT - I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/prims -=20 > > I/usr/ports/tmp/jdk7u/hotspot/src/share/vm -=20 > > I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/precompiled -=20 > > I/usr/ports/tmp/jdk7u/hotspot/src/cpu/ppc/vm -=20 > > I/usr/ports/tmp/jdk7u/hotspot/src/os_cpu/bsd_ppc/vm -=20 > > I/usr/ports/tmp/jdk7u/hotspot/src/os/bsd/vm -=20 > > I/usr/ports/tmp/jdk7u/hotspot/src/os/posix/vm -I../generated -=20 > > DHOTSPOT_RELEASE_VERSION=3D"\"24.80-b11\"" -=20 > > DHOTSPOT_BUILD_TARGET=3D"\"product\"" - = DHOTSPOT_BUILD_USER=3D"\"root\""=20 > > -DHOTSPOT_LIB_ARCH=3D\"ppc\" - DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -=20 > > DDEFAULT_LIBPATH=3D"\"/lib:/usr/lib:/usr/local/lib\"" -=20 > > DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_ppc - > > DTARGET_ARCH_MODEL_ppc_64 -DTARGET_OS_ARCH_bsd_ppc - > > DTARGET_OS_ARCH_MODEL_bsd_ppc_64 -DTARGET_COMPILER_gcc - > > DCOMPILER2 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new - > > mpowerpc64 -pipe -DDONT_USE_PRECOMPILED_HEADER -O3 -fno-strict-=20 > > aliasing -D_LP64=3D1 -m64 -mminimal-toc -mcpu=3Dpowerpc64 = -mtune=3Dpower5=20 > > - minsert-sched-nops=3Dregroup_exact -mno-multiple -mno-string -=20 > > DSAFEFETCH_STUBS -DINCLUDE_TRACE=3D1 -Werror -Wpointer-arith - > > Wconversion -Wsign-compare -E > > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp > > > > Regards, > > > > Volker > > > > > > > > On Sun, Jan 10, 2016 at 3:04 PM, Curtis Hamilton=20 > > > wrote: > > > > Hello, > > > > I=E2=80=99d like to know if there=E2=80=99s = been any work done=20 > > to support PPC for *BSD? > > > > I=E2=80=99ve hacked both the AIX and Linux PPC = headers=20 > > but have been unsuccessful in building HotSpot. All modules seem to = > > build > with > > the exception of VMStructs.cpp with the below error. > > > > > > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cp > > p: In static member function 'static void VMStructs::init()': > > > > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cp > > p:3015: error: cannot convert 'pthread**' to 'pid_t*' in=20 > > initialization > > > > Build log is attached. > > > > Thanks in advance! > > > > > > > > Curtis > > > > > > > > > > > > > > > > > > ---------- Forwarded message ---------- > From: Volker Simonis > To: "Thomas St=C3=BCfe" > Cc: Curtis Hamilton , <=20 > ppc-aix-port-dev@openjdk.java.net>, > Date: Fri, 12 Feb 2016 03:28:10 -0500 > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support Hi Curtis, > > congratulations from my side as well. Running HelloWorld is always an=20 > important milestone when porting the OpenJDK to a new platform! > > I think Thomas already gave you the right hints. It's true that=20 > SIGTRAP is used a lot within HotSpot and you really need to handle it=20 > correctly. > > As a quick workaround you could also try to use -XX:-UseSIGTRAP which=20 > should switch off the usage of SIGTRAP within the VM. You also have to = > use this switch when debugging the VM in a native debugger like gdb=20 > because the debugger also uses SIGTRAP internally. > > Regards, > Volker > > > On Fri, Feb 12, 2016 at 8:08 AM, Thomas St=C3=BCfe=20 > > wrote: > > Hi Curtis, > > > > I think it makes sense to post this on the bsd list too. > > > > See my comments inline. > > > > On Fri, Feb 12, 2016 at 7:26 AM, Curtis Hamilton=20 > > > > wrote: > >> > >> Thomas/Volker, > >> > >> > >> > >> Just wanted to give you an update on my bsd/ppc64 porting effort. =20 > >> I=E2=80=99m using the standard bsd openjdk8 port, as the bsd = mercurial=20 > >> needs freebsd specific patches. > >> > >> > >> > >> I=E2=80=99ve made progress modding the linux/ppc files to work = under bsd=20 > >> and can successfully build a native (ppc64) JVM. Here=E2=80=99s = the output=20 > >> I get > executing > >> =E2=80=98java =E2=80=93version=E2=80=99 > >> > >> > >> > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-s > lowdebug/jdk/bin > >> # ./java -version > >> openjdk version "1.8.0_72-debug" > >> OpenJDK Runtime Environment (build 1.8.0_72-debug-b15) OpenJDK=20 > >> 64-Bit Server VM (build 25.72-b15-debug, mixed mode) > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-s > lowdebug/jdk/bin > >> # > > > > > > Great Job! > >> > >> I can compile and execute the basic =E2=80=9Chello world=E2=80=9D. = However,=20 > >> compiling more complicated java code results in a core dump. See = the following: > >> > >> > >> > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-s > lowdebug/jdk/bin > >> # ./javac HelloWorld.java > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-s > lowdebug/jdk/bin > >> # ./java HelloWorld > >> Hello, World > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-s > lowdebug/jdk/bin > >> # ./javac zip.java > >> Trace/BPT trap (core dumped) > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-s > lowdebug/jdk/bin > >> # ./javac LargeZip.java > >> Trace/BPT trap (core dumped) > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-s > lowdebug/jdk/bin > >> # > >> > >> As you can see this is a debug build and I=E2=80=99ve been able to = tell=20 > >> from the core dump, using gdb, that it=E2=80=99s getting a signal 5 = at abort. > >> > >> > > > > > > I think SIGTRAP is used by the ppc JIT for some things (implicit > nullchecks? > > Volker would know better). So, SIGTRAP must be handled for this to = work. > > > > The JVM has a central signal handler, entry point is "signalHandler" = > > in os_.cpp, and then it goes on to, in your case, > JVM_handler_bsd_signal() > > in os_bsd_ppc.cpp. > > > > So, make sure that > > > > 1) SIGTRAP is handled by this signal handler - I think, by default=20 > > bsd > does > > not install a signal handler for SIGTRAP. See=20 > > os::Bsd::install_signal_handlers(), and compare it with the Linux > version. > > > > 2) Then, SIGTRAP must be handled in JVM_handler_bsd_signal().=20 > > Compare > with > > the SIGTRAP handling for Linux (os_linux_ppc.cpp). But if you copied = > > that code, maybe SIGTRAP handling is already in place and (1) was=20 > > all that was missing. > > > > Also note: The jvm normally writes a error log on crashes which is=20 > > very useful ("hs_err_") but in your case it was not written at=20 > > all, > because > > no signal handler was installed for SIGTRAP. So, if you took care of = > > (1) > but > > (2) is still missing, you may still crash but with a real error=20 > > report > log > > this time. > > > > Side note: Magnus Ihse Bursie is cleaning up and repairing the BSD=20 > > port, > > see: > > > http://mail.openjdk.java.net/pipermail/bsd-port-dev/2016-January/00273 > 9.html > > > > His changes are not yet committed, but he posted a webrev with his > changes > > ( > http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source-patch > es/webrev.01/ > ). > > It may make sense to integrate this in your build, he did some=20 > > worthwhile fixes. > > > > Kind Regards, Thomas > > > >> > >> Any recommendations on what to look at or how to further debug? > >> > >> > >> > >> Regards, > >> > >> > >> > >> Curtis > >> > >> > >> > >> From: Curtis Hamilton [mailto:hamiltcl@verizon.net] > >> Sent: Monday, January 11, 2016 3:29 PM > >> To: 'Thomas St=C3=BCfe' > >> Cc: 'Volker Simonis' ;=20 > >> 'ppc-aix-port-dev@openjdk.java.net'=20 > >> > >> Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support > >> > >> > >> > >> Thomas, > >> > >> > >> > >> Thanks for the vector check! > >> > >> > >> > >> I agree that the AIX os is quite different from other unices (I=20 > >> have an old PowerStation 220 in my collection). However, the=20 > >> ppc-aix-port was > the > >> first that contained code specific to the ppc. Since there = isn=E2=80=99t a > ppc-bsd > >> port, I needed somewhere to start. PPC code for both AIX and Linux = > >> can > be > >> found in the same port. The ports available on FreeBSD currently = do > >> contain any of the ppc headers or code. So I decided to use a port = > >> that already had the ppc code and go from there. > >> > >> > >> > >> Now that ppc code is being integrated into a more universal port, I = > >> just need to check which jdk8 port to work with. > >> > >> > >> > >> Any recommendation? > >> > >> > >> > >> Regards, > >> > >> Curtis > >> > >> > >> > >> From: Thomas St=C3=BCfe [mailto:thomas.stuefe@gmail.com] > >> Sent: Monday, January 11, 2016 11:23 AM > >> To: Curtis Hamilton > >> Cc: Volker Simonis ;=20 > >> ppc-aix-port-dev@openjdk.java.net > >> > >> > >> Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > >> > >> > >> > >> Hi Curtis, > >> > >> > >> > >> I am not sure that AIX ppc would be the best source for an BSD=20 > >> port. AIX os port contains a large number of AIX specifics and it=20 > >> is quite a bit different (sometimes, needlessly) from the other=20 > >> Unices. It is also a > moving > >> target, at least on jdk9, as we changed a lot in the AIX os port=20 > >> and > will > >> change more until the next feature close. > >> > >> > >> > >> So, it may be that linux ppc would be a better porting source for a = > >> bsd ppc port. > >> > >> > >> > >> Kind Regards, Thomas > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> On Mon, Jan 11, 2016 at 3:21 PM, Curtis Hamilton=20 > >> > >> wrote: > >> > >> Volker, > >> > >> > >> > >> Thanks for the response. > >> > >> > >> > >> Yes, I=E2=80=99m using the mercurial jdk7u ppc-aix version. The = reason I=20 > >> used this port version was because I was more familiar with the=20 > >> build layout > of > >> jdk7 versus jdk8/jdk9. And it seemed like an easier target to=20 > >> start > with, > >> since it already supported ppc64 on AIX and Linux. > >> > >> > >> > >> Full disclosure, I=E2=80=99ve been successful in building zero vm = for both jdk7 > >> and jdk8 on ppc64/FreeBSD. They both work great. The system > performance > >> is somewhat sluggish, but usable. So I decided to see if I could=20 > >> build native ppc64 versions leveraging the existing AIX and Linux=20 > >> ppc64 > support in > >> the ppc-aix-port, since the bsd-port lacks support for PowerPC. > >> > >> > >> > >> I=E2=80=99m aware of the integration effort for jdk9. So on your = advice, I=20 > >> will start working with ppc-aix jdk8u. I don=E2=80=99t want anyone = to=20 > >> waste time > with > >> jdk7u. Although my efforts with this older version is not=20 > >> completely > wasted. > >> > >> > >> > >> I look forward to contributing to the ppc64/bsd port OpenJDK=20 > >> integration effort. > >> > >> > >> > >> Regards, > >> > >> Curtis > >> > >> > >> > >> From: Volker Simonis [mailto:volker.simonis@gmail.com] > >> Sent: Monday, January 11, 2016 5:22 AM > >> To: Curtis Hamilton > >> Cc: ppc-aix-port-dev@openjdk.java.net > >> Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > >> > >> > >> > >> Hi Curtis, > >> > >> no, I'm not aware of any effort to port the ppc64 port to BSD. > >> > >> My first question is why are you building jdk7. It is quite old and = > >> we don't actually support it any more. It was also never integrated = > >> into > the > >> main jdk7u branch. I'd strongly recommend to use at least the jdk8u > version. > >> If you plan to contribute the ppc64/bsd port for integration into=20 > >> the OpenJDK, this has to be done into the head revision (currently=20 > >> jdk9) > anyway. > >> Once it's there, it may be possible to downport it to jdk8u (but=20 > >> not to jdk7u because that on doesn't even contain the ppc64 port). > >> > >> That said, which version of jdk7u are you using? Is it the one from = > >> http://hg.openjdk.java.net/ppc-aix-port/jdk7u/ ? > >> > >> One problem you may encounter with jdk7u is that it was never=20 > >> compiled with new versions of gcc. I see you are using gcc4.8 but=20 > >> we used 4.1.2 > back > >> then when we were doing the port. > >> > >> Another problem is that we didn't support the serviceability agent=20 > >> in jdk7u. Support for the SA agent on Linux/ppc64 (but not for AIX) = > >> was > added > >> in jdk8. The error you see in vmStructs.cpp is most probably from=20 > >> SA > coding. > >> How does your file vmStructs_bsd_ppc.hpp looks like. As you can=20 > >> see, vmStructs_linux_ppc.hpp is empty in jdk7u for the ppc64 port=20 > >> while it > has > >> some code in jdk8u-dev and jdk9. > >> > >> Unfortunately the place in vmStructs.cpp where the error happens is > deeply > >> nested macro coding so it's hard to say what's wrong from the error > message. > >> You could preprocess the file and post that to the list, maybe we=20 > >> can > see > >> more. Just issue the following command from a shell from within > >> > = /usr/ports/tmp/jdk7u/build/bsd-ppc/hotspot/outputdir/bsd_ppc64_compiler2/= product: > >> > >> g++48 -DBSD -DPPC64 -D_ALLBSD_SOURCE -D_GNU_SOURCE -DPRODUCT=20 > >> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/prims > >> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm > >> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/precompiled > >> -I/usr/ports/tmp/jdk7u/hotspot/src/cpu/ppc/vm > >> -I/usr/ports/tmp/jdk7u/hotspot/src/os_cpu/bsd_ppc/vm > >> -I/usr/ports/tmp/jdk7u/hotspot/src/os/bsd/vm > >> -I/usr/ports/tmp/jdk7u/hotspot/src/os/posix/vm -I../generated=20 > >> -DHOTSPOT_RELEASE_VERSION=3D"\"24.80-b11\"" > >> -DHOTSPOT_BUILD_TARGET=3D"\"product\"" = -DHOTSPOT_BUILD_USER=3D"\"root\"" > >> -DHOTSPOT_LIB_ARCH=3D\"ppc\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" > >> -DDEFAULT_LIBPATH=3D"\"/lib:/usr/lib:/usr/local/lib\"" > -DTARGET_OS_FAMILY_bsd > >> -DTARGET_ARCH_ppc -DTARGET_ARCH_MODEL_ppc_64=20 > >> -DTARGET_OS_ARCH_bsd_ppc > >> -DTARGET_OS_ARCH_MODEL_bsd_ppc_64 -DTARGET_COMPILER_gcc -DCOMPILER2 > -fPIC > >> -fno-rtti -fno-exceptions -pthread -fcheck-new -mpowerpc64 -pipe=20 > >> -DDONT_USE_PRECOMPILED_HEADER -O3 -fno-strict-aliasing -D_LP64=3D1=20 > >> -m64 -mminimal-toc -mcpu=3Dpowerpc64 -mtune=3Dpower5=20 > >> -minsert-sched-nops=3Dregroup_exact -mno-multiple -mno-string=20 > >> -DSAFEFETCH_STUBS -DINCLUDE_TRACE=3D1 -Werror -Wpointer-arith = -Wconversion > >> -Wsign-compare -E > >> /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp > >> > >> Regards, > >> > >> Volker > >> > >> > >> > >> On Sun, Jan 10, 2016 at 3:04 PM, Curtis Hamilton=20 > >> > >> wrote: > >> > >> Hello, > >> > >> I=E2=80=99d like to know if there=E2=80=99s been any work done to = support PPC for *BSD? > >> > >> I=E2=80=99ve hacked both the AIX and Linux PPC headers but have = been > unsuccessful > >> in building HotSpot. All modules seem to build with the exception=20 > >> of VMStructs.cpp with the below error. > >> > >> /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp: In > static > >> member function 'static void VMStructs::init()': > >> = /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp:3015: > >> error: cannot convert 'pthread**' to 'pid_t*' in initialization > >> > >> Build log is attached. > >> > >> Thanks in advance! > >> > >> > >> > >> Curtis > >> > >> > >> > >> > >> > >> > > > > > > > _______________________________________________ > freebsd-java@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org" > _______________________________________________ freebsd-java@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-java To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" From owner-freebsd-java@freebsd.org Sat Feb 13 22:56:39 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02A48AA80DC for ; Sat, 13 Feb 2016 22:56:39 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E17651ED3 for ; Sat, 13 Feb 2016 22:56:38 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: by mailman.ysv.freebsd.org (Postfix) id DCCB0AA80D9; Sat, 13 Feb 2016 22:56:38 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC438AA80D8 for ; Sat, 13 Feb 2016 22:56:38 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.freebsd.org (Postfix) with ESMTP id 8A5191ED2 for ; Sat, 13 Feb 2016 22:56:37 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.15.2/8.15.2) with ESMTP id u1DMuaqB004425; Sat, 13 Feb 2016 14:56:36 -0800 (PST) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.15.2/8.15.2/Submit) id u1DMuZJ6004424; Sat, 13 Feb 2016 14:56:35 -0800 (PST) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Sat, 13 Feb 2016 14:56:35 -0800 From: Greg Lewis To: Brian Gardner Cc: Magnus Ihse Bursie , java@freebsd.org Subject: Re: Helping out with JDK 9 on BSD Message-ID: <20160213225635.GB64267@misty.eyesbeyond.com> References: <56ADE943.6020103@oracle.com> <8B9ACABA-F9B2-4288-9DB5-CA843DE48C34@getsnappy.com> <20160203034053.GA36170@misty.eyesbeyond.com> <56B45453.9020006@oracle.com> <1C39812E-E596-47E6-AB45-0A591A017FFB@getsnappy.com> <20160213080945.GC56357@misty.eyesbeyond.com> <99C45649-B498-4BE1-97D4-0CEE0BC8A77D@getsnappy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <99C45649-B498-4BE1-97D4-0CEE0BC8A77D@getsnappy.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 22:56:39 -0000 I'm probably going to look at these piecemeal... On Sat, Feb 13, 2016 at 11:08:36AM -0800, Brian Gardner wrote: > I???m sending those links again, it came through weird on the mailing list > porting build_vm_def.sh from bsd-port/jdk8 repo, to fix NM errors during = build > http://brian.timestudybuddy.com/webrev/hotspot__NM/webrev/ This one looks straight forward. +1 > Add SUPPORT_RESERVED_STACK_AREA flag for all BSD's > http://brian.timestudybuddy.com/webrev/hotspot__SUPPORT_RESERVED_STACK_AR= EA/webrev/ > porting getthreadid logic from bsd-port/jdk8. calling syscall(SYS_thr_sel= f) caused pthread_setspecific to be cleared. > http://brian.timestudybuddy.com/webrev/hotspot__os_bsd_cpp__getthreadid/w= ebrev/ > adding in servicability agent ported from bsd-port/jdk8 > http://brian.timestudybuddy.com/webrev/hotspot__sa/webrev/ > adding classlist.bsd that is identical to classlist.linux, in order to co= mpile > http://brian.timestudybuddy.com/webrev/jdk__classlist-bsd/webrev/ This also looks straight forward. There are differences in openjdk8, but frankly the differences just make it look like they are out of sync, not that they meaningfully differ. +1 > clean up TLS current thread at end of ::run functions similar to how it's= done in openjdk8. > http://brian.timestudybuddy.com/webrev/hotspot__clear_thread_current/webr= ev/ > clear current thread before exiting java_start to avoid warnings from lef= tover pthread_setspecific data > http://brian.timestudybuddy.com/webrev/hotspot__clear_thread_current_alt/= webrev/ Will look at the others as I have time. >=20 > > On Feb 13, 2016, at 12:09 AM, Greg Lewis wrote: > >=20 > > On Fri, Feb 12, 2016 at 10:54:29AM -0800, Brian Gardner wrote: > >> After giving it some thought, I???ve created an alternate patch for th= e clear_current_thread issue. I like this solution better because it is is= olated to java_start function in os_bsd.cpp, and it makes java_start respon= sible for cleaning up the current_thread since it also initializes it. > >=20 > > Sounds good! What can I do to help get all the changes up for review? > >=20 > > -- Greg > >=20 > >>> On Feb 10, 2016, at 10:45 PM, Brian Gardner w= rote: > >>>=20 > >>> Hello again Greg and Magnus, > >>> I finished up researching the leftover thread-specific data after 4 d= estructor iterations issue. It looks like it???s currently functioning on = Freebsd the same way it does on Linux, the only difference is that Freebsd = output that warning were Linux silently stops after it???s forth try. I lo= oked into how openjdk8 was working and it looks like there were calls to TL= S::set_thread(NULL) scattered throughout the code base at the end of some := :run methods. I???ve mimicked that behavior in the necessary spots with th= e following patch. I can???t help but think there must be a better way to = get these Thread???s destructors called, and I tried that in place of makin= g clear_thread_current public and calling it directly, but it resulted in d= eadlock. > >>>=20 > >>> > >>>=20 > >>>> On Feb 9, 2016, at 2:36 PM, Brian Gardner > wrote: > >>>>=20 > >>>> Hi Greg and Magnus, > >>>> I???ve attached the patches needed to build and compile on Freebsd. = I???ve reverted my changes to TLS, and done more debugging there. There a= ppears to be two separate issues. One issue was that the implementation of= OS::bad::gettid() was somehow clearing the current thread previously set w= ith pthread_setspecific. I was able to fix this by porting logic from bad-= port/jdk8, see hotspot__os_bd_cpp__getthreadid.patch. The second issue see= ms to be related to certain types of threads never getting their destructor= called and therefor not clearing pthread_setspecific and resulting in Thre= ad 803c59000 has exited with leftover thread-specific data after 4 destruct= or iterations, errors. This one I haven???t tracked down yet and will cont= inue looking into. While I can compile and execute HelloWorld, I???m getti= ng a ton of these benign yet annoying messages from ConcurrentGC and Worker= threads. I???ll continue looking into that next week. > >>>>=20 > >>>>=20 > >>>>> On Feb 4, 2016, at 11:50 PM, Magnus Ihse Bursie > wrote: > >>>>>=20 > >>>>> On 2016-02-04 01:29, Brian Gardner wrote: > >>>>>> Hi Greg, > >>>>>> Great to hear from you, it???s been a while since I took on one of= these projects, but I do follow the java@freebsd mailing list and see all = the work you put in. I must tell you how greatly your work is appreciated b= y me and I???m sure the rest of the community. I have good news, with fair= ly minimal changes I have it compiling, building HelloWorld, and running He= lloWorld all without errors. > >>>>>>=20 > >>>>>> I think it???ll break down into 4 change sets, > >>>>>> NM - I ported some code from bsd-port/jdk8/hotspot/make/bsd/makefi= les/build_vm_def.sh that fixes a compile error=20 > >>>>>> SUPPORT_RESERVED_STACK_AREA - define SUPPORT_RESERVED_STACK_AREA f= or _ALLBSD_SOURCE > >>>>>> Serviceability Agent - ported from bad-port/jdk8, currently compil= es but hasn???t been tested > >>>>>> TLS - there is problems with the TLS in jdk9 used for Thread::curr= ent(). This caused several issues for me and while the fix was relatively = straight forward in using THREAD_LOCAL_DECL completely in place of TLS comp= letely, I???d imagine there was a reason it was implemented in sort of a Hy= brid fashion alongside TLS. > >>>>>=20 > >>>>> There is a reason. It is very well described in this comment: > >>>>> https://bugs.openjdk.java.net/browse/JDK-8132510?focusedCommentId= =3D13866505 > > >>>>>=20 > >>>>> The TL;DR: in some circumstances the JVM can crash if we do not set= up an initial TLS. On the other hand, this was for glibc, so maybe this si= tuation does not arise for FreeBSD. > >>>>>=20 > >>>>>>=20 > >>>>>> It would be great if I could post these as web reviews for others = to review. Greg, would getting access to bsd-port/jdk9 allow us to collabo= rate through web reviews? =20 > >>>>>=20 > >>>>>=20 > >>>>>> Magnus, do you think using bsd-port/jdk9 for this purpose be a ste= p towards getting these basic changes into the jdk9 mainline, or would your= colleagues think "if they have bsd-port/jdk9, why bother with integrating = them into the jdk9 mainline???? > >>>>>=20 > >>>>> I think putting these changes in bsd-port/jdk9 is very reasonable, = and I do not believe it will in any way hinder their acceptance into jdk9 m= ainline. The only thing to be careful about there, though, is that all cont= ributors have signed the OCA (Oracle contributor agreement). Mixing in "leg= ally bad" code can present a real problem for adoption into mainline. > >>>>>=20 > >>>>> /Magnus > >>>>>=20 > >>>>>>=20 > >>>>>> Brian Gardner > >>>>>>=20 > >>>>>>> On Feb 2, 2016, at 7:40 PM, Greg Lewis < >glewis@eyesbeyond.com = >> wrote: > >>>>>>>=20 > >>>>>>> On Sun, Jan 31, 2016 at 06:57:26AM -0800, Brian Gardner wrote: > >>>>>>>> I???m interested in helping. I ported openjdk6 to freebsd and a= lso helped out with openjdk8. > >>>>>>>>=20 > >>>>>>>> Brian Gardner > >>>>>>>=20 > >>>>>>> I'd love to see as much of these changes get into the jdk9 mainli= ne. My time > >>>>>>> is really limited for the next couple of weeks though. If it wou= ld help you > >>>>>>> or Magnus to use the bsd-port repo to stage changes then that wou= ld be > >>>>>>> great too. Let me do a merge to make sure it is up to date with = mainline. > >>>>>>> Notionally we'd have to do a vote to get you both access I think?= But I > >>>>>>> can shepherd changes in if that will help with sharing them. > >>>>>>>=20 > >>>>>>> FWIW, in terms of taking responsibility, I've been regularly upda= ting the > >>>>>>> repos for jdk8 and jdk7 for a couple of years. I'm happy to keep= jdk9 > >>>>>>> building if that is what is being looked for there and also port = more of > >>>>>>> the BSD changes for jdk8 as appropriate. > >>>>>>>=20 > >>>>>>> - Greg > >>>>>>>=20 > >>>>>>>>> On Jan 31, 2016, at 3:00 AM, Magnus Ihse Bursie >> wrote: > >>>>>>>>>=20 > >>>>>>>>> On 2016-01-31 11:54, Magnus Ihse Bursie wrote: > >>>>>>>>>> Hi, > >>>>>>>>>>=20 > >>>>>>>>>> [TL;DR: I'm offering patches to compile JDK 9 on FreeBSD, but = it's not clear where to put them, or how.] > >>>>>>>>>>=20 > >>>>>>>>>> I'm working at Oracle on the OpenJDK build team and is respons= ible for large parts of the build system of OpenJDK. Lately, I've been play= ing around with FreeBSD (and other BSDs) in my free time, and I've written = a patch that will add build system support for FreeBSD, OpenBSD and NetBSD = in JDK 9 (tracked in >https://bugs.openjdk.java.n= et/browse/JDK-8147795 >). > >>>>>>>>>>=20 > >>>>>>>>>> I started writing this when I realized that the jdk9 branch in= the OpenJDK bsd-port repository did not contain any BSD-specific changes a= t all, and the old JDK 8 changes will not readily be portable, due to major= changes in the build system between JDK 8 and JDK 9. > >>>>>>>>>>=20 > >>>>>>>>>> I thought it would be a no-brainer to integrate these changes = into the JDK 9 mainline, so they would be in place for whenever you guys wo= uld start to attack porting the code base. However, some of my collegues th= ought otherwise. The end result, I think, is that they wanted to see someon= e (not necessarily a company, the FreeBSD organisation for instance seemed = to be okay), to step forward and say "we take responsibility for the BSD po= rt", and give some kind of commitment to actually use these build changes i= n producing a viable port. You can read the mail conversation here: >http:/= /mail.openjdk.java.net/pipermail/build-dev/2016-January/016421.html > > >>>>>>>>>=20 > >>>>>>>>> I forgot to add that I'm willing to help with build issues for = the BSD port, as far as my (like everybode else's) limited free time allows= me. Unfortunately, I'm still a noob at BSD internals and can't really help= with much apart from that. > >>>>>>>>>=20 > >>>>>>>>> /Magnus > >>>>>>>>>=20 > >>>>>>>>>=20 > >>>>>>>>>>=20 > >>>>>>>>>> An alternative to pushing this code into the JDK 9 mainline is= of course to push it to the bsd-port/jdk9 repo (given that the owners of t= hat repo approves), but that seems like a less favourable solution. Having = the code in the mainline does not mean that it gets tested automatically, b= ut it means that it will be part of e.g. refactoring, that would otherwise = break a downstream patchset. > >>>>>>>>>>=20 > >>>>>>>>>> I cc:ed this conversation to the >bsd-port-dev@openjdk.jav= a.net > mailing list, but never got= any kind of official response there. Since this list seems more active, I'= m trying here instead. :) > >>>>>>>>>>=20 > >>>>>>>>>> So, I'm offering two patches here, one that applies to the bui= ld system, is nice and clean, and possible to integrate into JDK 9 mainline= , if my collegues are convinced that someone is backing up the BSD port. An= d there's a second patch, which fixes broken C/C++/Java code and results in= a product that can at least run "javac HelloWorld", but this is not yet cl= ean enough for integration anywere, at least not the JDK 9 mainline. (I don= 't know enough of the BSD internals to fix all problems, so there's some "#= if 0" code here and there.) > >>>>>>>>>>=20 > >>>>>>>>>> /Magnus > >>>>>>>>>>=20 > >>>>>>>>>> _______________________________________________ > >>>>>>>>>> freebsd-java@freebsd.org > mailing li= st > >>>>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > > >>>>>>>>>> To unsubscribe, send any mail to "freebsd-java-unsubscribe@fre= ebsd.org " > > >>>>>>>>>=20 > >>>>>>>>> _______________________________________________ > >>>>>>>>> freebsd-java@freebsd.org > >> mailing list > >>>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > >> > >>>>>>>>> To unsubscribe, send any mail to " >freebsd-java= -unsubscribe@freebsd.org > < >mailto:freebsd-java-unsubscribe@freebsd.org = >>" > >>>>>>>>=20 > >>>>>>>> _______________________________________________ > >>>>>>>> freebsd-java@freebsd.org > mailing list > >>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > > >>>>>>>> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freeb= sd.org " > > >>>>>>>=20 > >>>>>>> --=20 > >>>>>>> Greg Lewis Email : >glewis@eyesbeyond.com > > >>>>>>> Eyes Beyond Web : >http://www.eyesbeyond.com > > >>>>>>> Information Technology FreeBSD : >glewis@FreeBSD.org > > >>>>>>> _______________________________________________ > >>>>>>> freebsd-java@freebsd.org > mailing list > >>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > > >>>>>>> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebs= d.org >" > >>>>>>=20 > >>>>>=20 > >>>>>=20 > >>>>=20 > >>>> _______________________________________________ > >>>> freebsd-java@freebsd.org mailing l= ist > >>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > >>>> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.o= rg " > >>>=20 > >>=20 > >=20 > > --=20 > > Greg Lewis Email : glewis@eyesbeyond.com > > Eyes Beyond Web : http://www.eyesbeyond.com > > Information Technology FreeBSD : glewis@FreeBSD.org >=20 --=20 Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org