ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanislav Lukyanov <stanlukya...@gmail.com>
Subject RE: JVM warnings during Java 11 startup
Date Thu, 28 Feb 2019 08:47:51 GMT
Guys,

The issue is that we chose the easiest way to start working with Java 9+,
which is the illegal-access=permit.
This is a blanket option that affects the whole VM which is better to avoid – hence the
warnings.

A better solution is to use --add-opens statements.
Same as add-exports, one needs to specify an add-opens for every package
that is going to be accessed via reflection with setAccessible(true).

To find all of the packages we need to open, we could do a bunch of runs with
Illegal-access=deny and add an add-opens option for each error we see. There will be a lot,
I guess.

Stan

From: Павлухин Иван
Sent: 28 февраля 2019 г. 9:36
To: dev@ignite.apache.org
Subject: Re: JVM warnings during Java 11 startup

Also it worth to consider a case when Ignite is used as a library. In
that case it is not correct to disable these warnings because there
could be warnings for other libraries too.

On the other hand we might employ some tricks in CommandLineStartup
when running alone.

чт, 28 февр. 2019 г. в 09:11, Petr Ivanov <mr.weider@gmail.com>:
>
> According to warning message, there are no options at all, as Unsafe may become unavailable
in any time.
>
>
> > On 27 Feb 2019, at 22:53, Denis Magda <dmagda@apache.org> wrote:
> >
> > It's fine as long as the project can be launched. I would better start
> > looking for Unsafe alternatives as the next step. We can't live with it
> > forever, the time to phase it out has come :)
> >
> > -
> > Denis
> >
> >
> > On Wed, Feb 27, 2019 at 9:53 AM Dmitriy Pavlov <dpavlov@apache.org> wrote:
> >
> >> Sure, we could try this option.
> >>
> >> ср, 27 февр. 2019 г. в 19:16, Ilya Kasnacheev <ilya.kasnacheev@gmail.com>:
> >>
> >>> Hello!
> >>>
> >>> I wonder if we could try to redirect output to null, initialize
> >> GridUnsafe
> >>> and then bring output back :)
> >>>
> >>> Regards,
> >>> --
> >>> Ilya Kasnacheev
> >>>
> >>>
> >>> ср, 27 февр. 2019 г. в 18:30, Dmitriy Pavlov <dpavlov@apache.org>:
> >>>
> >>>> Hi Ignite Developers,
> >>>>
> >>>> During the start of Ignite node under Java 11 (actually 9+) or during
> >>> local
> >>>> development you may face with warning related to illegal access.
> >>>>
> >>>> You know that Ignite uses Unsafe operation for durable memory.
> >>>>
> >>>> Accessing to Unsafe requires --illegal-access=permit (Now it is the
> >>> default
> >>>> for JVM. From the doc:
> >>>> permit: ... The first reflective-access operation to any such package
> >>>> causes a warning to be issued. However, no warnings are issued after
> >> the
> >>>> first occurrence. This single warning describes how to enable further
> >>>> warnings.
> >>>>
> >>>> Warning example:
> >>>>
> >>>> WARNING: An illegal reflective access operation has occurred
> >>>> WARNING: Illegal reflective access by
> >>>> org.apache.ignite.internal.util.GridUnsafe$2
> >>>> (file:..libs/ignite-core-2.7.0.jar) to field java.nio.Buffer.address
> >>>> WARNING: Please consider reporting this to the maintainers of
> >>>> org.apache.ignite.internal.util.GridUnsafe$2
> >>>> WARNING: Use --illegal-access=warn to enable warnings of further
> >>>> illegal reflective access operations
> >>>> WARNING: All illegal access operations will be denied in a future
> >> release
> >>>>
> >>>>
> >>>> Unfortunately removing or disabling this warning is absolutely
> >>> impossible,
> >>>> it is generated by JVM and there is no option to disable it:
> >>>>
> >>>>
> >>>
> >> https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID-3B1CE181-CD30-4178-9602-230B800D4FAE
> >>>>
> >>>>
> >>>> Sincerely,
> >>>> Dmitriy Pavlov
> >>>>
> >>>
> >>
>


-- 
Best regards,
Ivan Pavlukhin


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message