-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[CI] Java 11 access denied ("java.lang.RuntimePermission" "accessDeclaredMembers") #62143
Comments
Pinging @elastic/es-core-infra (:Core/Infra/Core) |
Some more digging based on the stacktrace:
So in theory, this error should happen for both JDK 10 and 11. But somehow, the tests do not fail for JDK 10. Only JDK 11 has this problem. I guess a possible fix is grant lucene code more security permissions. I could use help from Lucene experts to comment on this. |
Thanks @ywangd for the investigation. The piece of code that is hitting the error was newly introduced as a work around of a Java bug. The Lucene issue is here: https://issues.apache.org/jira/browse/LUCENE-9500 And the java bug is here: https://bugs.openjdk.java.net/browse/JDK-8252739 It makes sense that it fails in JDK11 but not in JDK10 because the bug is only present in 11 (and not all versions). So it seems the error happens when trying to initialise the BugfixDeflater_JDK8252739 class. |
One thing I notice is that if I add the following line to the security.policy:
The error goes away. On the other hand my expectations is that the following block should fix it:
As it is granting the permission to the Lucene-core jar, but not sure if I am reading this correctly. |
This seems to be a Lucene bug. We open: |
Thanks! I know close to nothing about Lucene, but now I believe this is the right fix. Without a |
Build scan:
And many more that uses different variants of JDK 11.
Repro line:
Reproduces locally?:
Yes. There are more than 90 failed tests for each build scan. So muting is not an option. The failure is JDK 11 specific, i.e. if removing
-Druntime.java=11
from the reproduction line, the test works.Applicable branches:
master
and7.x
Failure history:
It just started to happen since 2020-09-05
Failure excerpt:
The text was updated successfully, but these errors were encountered: