Re: clang 6 fix devel/jdk/1.8

2018-04-11 Thread Kurt Miller
On Wed, 2018-04-11 at 08:00 -0500, Matthew Martin wrote:
> On Wed, Apr 11, 2018 at 08:27:34AM -0400, Kurt Miller wrote:
> > 
> > On Tue, 2018-04-10 at 21:23 -0500, Matthew Martin wrote:
> > > 
> > > Add lots of whitespace and change a few types from signed to
> > > unsigned.
> > > Probably should get a REVISION bump, but I'm not sure where that
> > > goes
> > > for subpackages.
> > > 
> > > Is anyone already an OpenJDK contributor or know someone upstream
> > > with
> > > whom I could work?
> > Hey Matthew,
> > 
> > I'm both upstream and the port maintainer here. Thanks for working
> > on
> > this. There are some aspects of the OpenJDK project that are
> > particular
> > to it. In order for me to accept patches for upstream I need to
> > respect
> > Oracle's policies. Unless things have changed recently, they
> > require
> > authors of patches to sign their contribution agreement (ugh, yea I
> > know that sucks). For example getting the bsd-port project accepted
> > by
> > Oracle required an review of all the bsd-port changes, who wrote
> > them
> > and confirmation they had signed the SCSL (Sun's old agreement) or
> > Oracle's current one. Some patches needed to be dropped and
> > recreated
> > from scratch in that process.
> > 
> > Several times I have received small fixes for OpenJDK for things
> > where
> > I simply did not look at the patch, recreated the problems and
> > authored
> > an independent fix so I can push it upstream. I believe I'm in one
> > of
> > of those cases now unless all of authors (including the ones taken
> > from
> > FreeBSD) have signed the contribution agreement.
> > 
> > I suggest you finish the work and I'll have to avoid participating
> > now.
> > When I have time I can recreate the compilation issues using the
> > upstream repo and fix independently so I can get them upstream.
> > 
> > Best,
> > -Kurt
> Morning Kurt,
> 
> I was looking at the OCA last night; and although I'm generally not
> fond
> of giving up moral rights, in this case the patches are largely just
> adding whitespace and I don't think are (or at least should not be)
> copyrightable in the first place. If it would make things easier,
> I wouldn't mind signing it. The patches I sent are solely my own work
> and not taken from FreeBSD.
> 
> - Matthew Martin

Hi Matthew,

Either way is fine. I'm comfortable with c++ and can recreate them or
if you prefer go ahead and sign the OCA and I can credit your changes
in the upstream commits. Oracle takes a few weeks to process the OCA
but there's no rush to get this upstream so that's not a problem for
me. Let me know what you decide to do.

I am of the same opinion that changes of this nature are not
copyrightable. I usually think about such changes as how an editor
corrects the grammar of an author's book. The editor does not gain
copyright rights over those changes, so bug fixes in programs should
not as well. I guess the problem is that there is a gray area between
bug fixes and writing enough to claim rights. While I don't agree with
Oracle's policy, I do follow it so that I can keep the jdk running on
OpenBSD.

Best,
-Kurt



Re: clang 6 fix devel/jdk/1.8

2018-04-11 Thread Matthew Martin
On Wed, Apr 11, 2018 at 08:27:34AM -0400, Kurt Miller wrote:
> On Tue, 2018-04-10 at 21:23 -0500, Matthew Martin wrote:
> > Add lots of whitespace and change a few types from signed to
> > unsigned.
> > Probably should get a REVISION bump, but I'm not sure where that goes
> > for subpackages.
> > 
> > Is anyone already an OpenJDK contributor or know someone upstream
> > with
> > whom I could work?
> 
> Hey Matthew,
> 
> I'm both upstream and the port maintainer here. Thanks for working on
> this. There are some aspects of the OpenJDK project that are particular
> to it. In order for me to accept patches for upstream I need to respect
> Oracle's policies. Unless things have changed recently, they require
> authors of patches to sign their contribution agreement (ugh, yea I
> know that sucks). For example getting the bsd-port project accepted by
> Oracle required an review of all the bsd-port changes, who wrote them
> and confirmation they had signed the SCSL (Sun's old agreement) or
> Oracle's current one. Some patches needed to be dropped and recreated
> from scratch in that process.
> 
> Several times I have received small fixes for OpenJDK for things where
> I simply did not look at the patch, recreated the problems and authored
> an independent fix so I can push it upstream. I believe I'm in one of
> of those cases now unless all of authors (including the ones taken from
> FreeBSD) have signed the contribution agreement.
> 
> I suggest you finish the work and I'll have to avoid participating now.
> When I have time I can recreate the compilation issues using the
> upstream repo and fix independently so I can get them upstream.
> 
> Best,
> -Kurt

Morning Kurt,

I was looking at the OCA last night; and although I'm generally not fond
of giving up moral rights, in this case the patches are largely just
adding whitespace and I don't think are (or at least should not be)
copyrightable in the first place. If it would make things easier,
I wouldn't mind signing it. The patches I sent are solely my own work
and not taken from FreeBSD.

- Matthew Martin



Re: clang 6 fix devel/jdk/1.8

2018-04-11 Thread Kurt Miller
On Tue, 2018-04-10 at 21:23 -0500, Matthew Martin wrote:
> Add lots of whitespace and change a few types from signed to
> unsigned.
> Probably should get a REVISION bump, but I'm not sure where that goes
> for subpackages.
> 
> Is anyone already an OpenJDK contributor or know someone upstream
> with
> whom I could work?

Hey Matthew,

I'm both upstream and the port maintainer here. Thanks for working on
this. There are some aspects of the OpenJDK project that are particular
to it. In order for me to accept patches for upstream I need to respect
Oracle's policies. Unless things have changed recently, they require
authors of patches to sign their contribution agreement (ugh, yea I
know that sucks). For example getting the bsd-port project accepted by
Oracle required an review of all the bsd-port changes, who wrote them
and confirmation they had signed the SCSL (Sun's old agreement) or
Oracle's current one. Some patches needed to be dropped and recreated
from scratch in that process.

Several times I have received small fixes for OpenJDK for things where
I simply did not look at the patch, recreated the problems and authored
an independent fix so I can push it upstream. I believe I'm in one of
of those cases now unless all of authors (including the ones taken from
FreeBSD) have signed the contribution agreement.

I suggest you finish the work and I'll have to avoid participating now.
When I have time I can recreate the compilation issues using the
upstream repo and fix independently so I can get them upstream.

Best,
-Kurt



Re: clang 6 fix devel/jdk/1.8

2018-04-11 Thread Stuart Henderson
On 2018/04/11 12:19, Stuart Henderson wrote:
> Yes, this runs, but I get this warning with unifi:
> 
> java:/tmp/snappy-1.1.4-7916cbab-fd53-455f-80bc-de026ba1d38b-libsnappyjava.so: 
> /usr/lib/libc++abi.so.0.0 : WARNING: 
> symbol(_ZTVN10__cxxabiv121__vmi_class_type_infoE) size mismatch, relink your 
> program
> 
> ...so it looks like we may need to rebuild native code modules, and possibly 
> bump c++abi.
> 

Ignore this last bit, this is not new.

Since jdk seems to be running ok with this jumbo patchset I'm going to
commit it to unbreak things, can always undo if we want to change to a
different approach.



Re: clang 6 fix devel/jdk/1.8

2018-04-11 Thread Stuart Henderson
Yes, this runs, but I get this warning with unifi:

java:/tmp/snappy-1.1.4-7916cbab-fd53-455f-80bc-de026ba1d38b-libsnappyjava.so: 
/usr/lib/libc++abi.so.0.0 : WARNING: 
symbol(_ZTVN10__cxxabiv121__vmi_class_type_infoE) size mismatch, relink your 
program

...so it looks like we may need to rebuild native code modules, and possibly 
bump c++abi.



Re: clang 6 fix devel/jdk/1.8

2018-04-11 Thread Stuart Henderson
Ah that one yes.. Trying it now.

On 2018/04/11 12:38, David Coppa wrote:
> On Wed, Apr 11, 2018 at 12:21 PM, Stuart Henderson  
> wrote:
> > On 2018/04/11 10:02, David Coppa wrote:
> >> Hi,
> >>
> >> Does it work at runtime?
> >>
> >
> > It doesn't work for me. Here's a backtrace from a standard build, I'll try
> > again and see if I can get it with symbols.
> >
> > (gdb) bt
> > #0  0x08908ee471c6 in NativeCallStack::NativeCallStack ()
> >from /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
> > #1  0x08908ee0268e in MemTracker::init_tracking_level () from 
> > /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
> > #2  0x08908e912880 in ResourceObj::operator new () from 
> > /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
> > #3  0x08908eee12fb in _GLOBAL__sub_I_reflectionUtils.cpp ()
> >from /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
> > #4  0x08908e8401c3 in pthread_atfork () from 
> > /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
> > #5  0x08908e83f359 in _init () from 
> > /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
> > #6  0x7f7f6120 in ?? ()
> > #7  0x0890a7a0bc94 in _dl_call_init_recurse (object=0x890c178c800, 
> > initfirst=0)
> > at /usr/src/libexec/ld.so/loader.c:722
> > #8  0x0890a7a02b50 in dlopen (libname=0x7f7f6a30 
> > "/usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so",
> > flags=Variable "flags" is not available.
> > ) at /usr/src/libexec/ld.so/dlfcn.c:126
> > #9  0x088dcb805eef in LoadJavaVM () from /usr/local/jdk-1.8.0/bin/java
> > #10 0x088dcb8016b2 in JLI_Launch () from /usr/local/jdk-1.8.0/bin/java
> > #11 0x088dcb8084cd in main () from /usr/local/jdk-1.8.0/bin/java
> >
> 
> Ok, so we also need this patch from FreeBSD:
> 
> https://svnweb.freebsd.org/ports/head/java/openjdk8/files/patch-hotspot_src_share_vm_services_memTracker.cpp?view=markup
> 
> https://svnweb.freebsd.org/ports/head/java/openjdk8/files/patch-hotspot_src_share_vm_services_memTracker.cpp?revision=459368&view=co
> 
> Ciao!
> David



Re: clang 6 fix devel/jdk/1.8

2018-04-11 Thread David Coppa
On Wed, Apr 11, 2018 at 12:21 PM, Stuart Henderson  wrote:
> On 2018/04/11 10:02, David Coppa wrote:
>> Hi,
>>
>> Does it work at runtime?
>>
>
> It doesn't work for me. Here's a backtrace from a standard build, I'll try
> again and see if I can get it with symbols.
>
> (gdb) bt
> #0  0x08908ee471c6 in NativeCallStack::NativeCallStack ()
>from /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
> #1  0x08908ee0268e in MemTracker::init_tracking_level () from 
> /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
> #2  0x08908e912880 in ResourceObj::operator new () from 
> /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
> #3  0x08908eee12fb in _GLOBAL__sub_I_reflectionUtils.cpp ()
>from /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
> #4  0x08908e8401c3 in pthread_atfork () from 
> /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
> #5  0x08908e83f359 in _init () from 
> /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
> #6  0x7f7f6120 in ?? ()
> #7  0x0890a7a0bc94 in _dl_call_init_recurse (object=0x890c178c800, 
> initfirst=0)
> at /usr/src/libexec/ld.so/loader.c:722
> #8  0x0890a7a02b50 in dlopen (libname=0x7f7f6a30 
> "/usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so",
> flags=Variable "flags" is not available.
> ) at /usr/src/libexec/ld.so/dlfcn.c:126
> #9  0x088dcb805eef in LoadJavaVM () from /usr/local/jdk-1.8.0/bin/java
> #10 0x088dcb8016b2 in JLI_Launch () from /usr/local/jdk-1.8.0/bin/java
> #11 0x088dcb8084cd in main () from /usr/local/jdk-1.8.0/bin/java
>

Ok, so we also need this patch from FreeBSD:

https://svnweb.freebsd.org/ports/head/java/openjdk8/files/patch-hotspot_src_share_vm_services_memTracker.cpp?view=markup

https://svnweb.freebsd.org/ports/head/java/openjdk8/files/patch-hotspot_src_share_vm_services_memTracker.cpp?revision=459368&view=co

Ciao!
David



Re: clang 6 fix devel/jdk/1.8

2018-04-11 Thread Stuart Henderson
On 2018/04/11 10:02, David Coppa wrote:
> On Wed, Apr 11, 2018 at 4:23 AM, Matthew Martin  wrote:
> > Add lots of whitespace and change a few types from signed to unsigned.
> > Probably should get a REVISION bump, but I'm not sure where that goes
> > for subpackages.

Since every package is subject to change due to the newer compiler,
when we're in better shape with the fallout we're going to bump
_SYSTEM_VERSION for the clang arches to trigger updates for all
packages.

> > Is anyone already an OpenJDK contributor or know someone upstream with
> > whom I could work?

One thing I noticed when I looked at this is that FreeBSD doesn't have
a similar set of patches in their ports tree. It's possible that they've
done it and rolled into the large (downloaded) patch though I also wonder
if upstream has picked this up in newer versions already (we are a bit
behind on these at the moment, there's not much knowledge around about how
to update the jdk port).

> Hi,
> 
> Does it work at runtime?
> 

It doesn't work for me. Here's a backtrace from a standard build, I'll try
again and see if I can get it with symbols.

(gdb) bt
#0  0x08908ee471c6 in NativeCallStack::NativeCallStack ()
   from /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
#1  0x08908ee0268e in MemTracker::init_tracking_level () from 
/usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
#2  0x08908e912880 in ResourceObj::operator new () from 
/usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
#3  0x08908eee12fb in _GLOBAL__sub_I_reflectionUtils.cpp ()
   from /usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
#4  0x08908e8401c3 in pthread_atfork () from 
/usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
#5  0x08908e83f359 in _init () from 
/usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so
#6  0x7f7f6120 in ?? ()
#7  0x0890a7a0bc94 in _dl_call_init_recurse (object=0x890c178c800, 
initfirst=0)
at /usr/src/libexec/ld.so/loader.c:722
#8  0x0890a7a02b50 in dlopen (libname=0x7f7f6a30 
"/usr/local/jdk-1.8.0/jre/lib/amd64/server/libjvm.so",
flags=Variable "flags" is not available.
) at /usr/src/libexec/ld.so/dlfcn.c:126
#9  0x088dcb805eef in LoadJavaVM () from /usr/local/jdk-1.8.0/bin/java
#10 0x088dcb8016b2 in JLI_Launch () from /usr/local/jdk-1.8.0/bin/java
#11 0x088dcb8084cd in main () from /usr/local/jdk-1.8.0/bin/java



Re: clang 6 fix devel/jdk/1.8

2018-04-11 Thread David Coppa
On Wed, Apr 11, 2018 at 4:23 AM, Matthew Martin  wrote:
> Add lots of whitespace and change a few types from signed to unsigned.
> Probably should get a REVISION bump, but I'm not sure where that goes
> for subpackages.
>
> Is anyone already an OpenJDK contributor or know someone upstream with
> whom I could work?

Hi,

Does it work at runtime?