Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Feb 2016 07:46:32 -0800
From:      Brian Gardner <openjdk@getsnappy.com>
To:        Magnus Ihse Bursie <magnus.ihse.bursie@oracle.com>
Cc:        java@freebsd.org
Subject:   Re: Helping out with JDK 9 on BSD
Message-ID:  <0B79DC9D-2379-4B42-9923-0ECC7CB28D22@getsnappy.com>
In-Reply-To: <56AF48F1.4070506@oracle.com>
References:  <56ADE7D4.8020107@oracle.com> <56ADE943.6020103@oracle.com> <8B9ACABA-F9B2-4288-9DB5-CA843DE48C34@getsnappy.com> <08F78FBA-70D2-4819-99BB-05476638726C@getsnappy.com> <56AF48F1.4070506@oracle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Magnus,
I=E2=80=99ve been looking into it further and it lead me to a couple of =
change sets:
http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/469835cd5494 =
<http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/469835cd5494>;
and then this change set:
http://hg.openjdk.java.net/jdk9/dev/hotspot/rev/f7dc8eebc3f5 =
<http://hg.openjdk.java.net/jdk9/dev/hotspot/rev/f7dc8eebc3f5>;

The second change set titled,  Replace ThreadLocalStorage with =
compiler/language-based thread-local variables,
seems to add in logic for doing compiler based thread local storage =
THREAD_LOCAL_DECL, but fails to actually replace the ThreadLocalStorage =
usage when persisting the current thread.  I couldn=E2=80=99t understand =
why you would want to persist both ways.  In any case it seemed =
harmless, and I=E2=80=99m trying to get gdb working with my images so I =
can debug the TLS issue further. =20

It sounds like you already have an idea how to fix it though.  Any ideas =
or pointers would be greatly appreciated.

Brian Gardner


> On Feb 1, 2016, at 4:00 AM, Magnus Ihse Bursie =
<magnus.ihse.bursie@oracle.com> wrote:
>=20
> On 2016-02-01 01:00, Brian Gardner wrote:
>> Hi Magnus,
>> I was able to clone the jdk9/dev repo, apply your patches, and =
compile on FreeBSD 10.1 amd64, with some changes to the Serviceability =
Agent ported from bad-port/jdk8 repo, however when I try to run javac I =
get a bunch of messages like:
>> Thread 832744400 has exited with leftover thread-specific data after =
4 destructor iterations
>>=20
>> I=E2=80=99m curious where you left off in getting "javac =
HelloWorld=E2=80=9D working on FreeBSD?
>=20
> Somewhere around there. :-) I got it "working" on FreeBSD, OpenBSD and =
NetBSD, with some caveats. I did not say it worked perfectly. :) I don't =
remember exactly right now what workarounds were needed in what =
circumstances, but on one of the platforms I needed to set =
LD_LIBRARY_PATH, and on some other I needed to set an -X option to =
specify memory sizes (which were not correctly read from the system).
>=20
> The message you describe is a warning due to lack of proper code to =
cleanup some kind of TLS data, if I remember correctly. It's harmless, =
but annoying. The fix is relative straightforward, but I didn't bother =
doing it.
>=20
> /Magnus
>=20
>>=20
>> Brian Gardner
>>=20
>>=20
>>=20
>>> On Jan 31, 2016, at 6:57 AM, Brian Gardner < =
<mailto:openjdk@getsnappy.com>openjdk@getsnappy.com =
<mailto:openjdk@getsnappy.com>> wrote:
>>>=20
>>> I=E2=80=99m interested in helping.  I ported openjdk6 to freebsd and =
also helped out with openjdk8.
>>>=20
>>> Brian Gardner
>>>=20
>>>=20
>>>> On Jan 31, 2016, at 3:00 AM, Magnus Ihse Bursie < =
<mailto:magnus.ihse.bursie@oracle.com>magnus.ihse.bursie@oracle.com =
<mailto:magnus.ihse.bursie@oracle.com>> 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.java.net/browse/JDK-8147795>https://bugs.openjdk.jav=
a.net/browse/JDK-8147795 =
<https://bugs.openjdk.java.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=
>http://mail.openjdk.java.net/pipermail/build-dev/2016-January/016421.html=
 =
<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  =
<mailto:bsd-port-dev@openjdk.java.net>bsd-port-dev@openjdk.java.net =
<mailto: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 <mailto:freebsd-java@freebsd.org> mailing =
list
>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java =
<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 <mailto:freebsd-java@freebsd.org> < =
<mailto:freebsd-java@freebsd.org>mailto:freebsd-java@freebsd.org =
<mailto:freebsd-java@freebsd.org>> mailing list
>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java =
<https://lists.freebsd.org/mailman/listinfo/freebsd-java>; < =
<https://lists.freebsd.org/mailman/listinfo/freebsd-java>https://lists.fre=
ebsd.org/mailman/listinfo/freebsd-java =
<https://lists.freebsd.org/mailman/listinfo/freebsd-java>>;
>>>> To unsubscribe, send any mail to " =
<mailto:freebsd-java-unsubscribe@freebsd.org>freebsd-java-unsubscribe@free=
bsd.org <mailto:freebsd-java-unsubscribe@freebsd.org> < =
<mailto:freebsd-java-unsubscribe@freebsd.org>mailto:freebsd-java-unsubscri=
be@freebsd.org <mailto:freebsd-java-unsubscribe@freebsd.org>>"
>>>=20
>>> _______________________________________________
>>> freebsd-java@freebsd.org <mailto:freebsd-java@freebsd.org> mailing =
list
>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java =
<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
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0B79DC9D-2379-4B42-9923-0ECC7CB28D22>