-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Grant manage_threads to java.desktop for Tika #134454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
32fe444
to
9b33eb5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just some comments/questions
test/framework/src/main/java/org/elasticsearch/bootstrap/TestScopeResolver.java
Outdated
Show resolved
Hide resolved
...entitlement/src/main/java/org/elasticsearch/entitlement/bootstrap/HardcodedEntitlements.java
Outdated
Show resolved
Hide resolved
.../framework/src/main/java/org/elasticsearch/entitlement/runtime/policy/TestPolicyManager.java
Outdated
Show resolved
Hide resolved
Fortunately, the JDK is still modular even if the tests are run sans modules, so we can use the module API to identify the packages in every system module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job coding the package -> scope
map for the excluded modules! I still sense some friction (like it should be simpler), but I think this is the best we can do currently. LGTM
* Grant manage_threads to java.desktop for Tika * Produce a PolicyScope for excluded system modules. Fortunately, the JDK is still modular even if the tests are run sans modules, so we can use the module API to identify the packages in every system module. * TODO with Jira link
💔 Backport failed
You can use sqren/backport to manually backport by running |
* Grant manage_threads to java.desktop for Tika * Produce a PolicyScope for excluded system modules. Fortunately, the JDK is still modular even if the tests are run sans modules, so we can use the module API to identify the packages in every system module. * TODO with Jira link
* Grant manage_threads to java.desktop for Tika * Produce a PolicyScope for excluded system modules. Fortunately, the JDK is still modular even if the tests are run sans modules, so we can use the module API to identify the packages in every system module. * TODO with Jira link
* Grant manage_threads to java.desktop for Tika * Produce a PolicyScope for excluded system modules. Fortunately, the JDK is still modular even if the tests are run sans modules, so we can use the module API to identify the packages in every system module. * TODO with Jira link
* Grant manage_threads to java.desktop for Tika * Produce a PolicyScope for excluded system modules. Fortunately, the JDK is still modular even if the tests are run sans modules, so we can use the module API to identify the packages in every system module. * TODO with Jira link
Backport stragglers are in #134559 |
* Grant manage_threads to java.desktop for Tika * Produce a PolicyScope for excluded system modules. Fortunately, the JDK is still modular even if the tests are run sans modules, so we can use the module API to identify the packages in every system module. * TODO with Jira link
@prdoyle @ldematte I tried a simple fix to add more permissions, but it does not seem to resolve the issue. Can you please consider reverting this PR temporarily or work on a fix? |
This reverts commit 9b41320.
…ic#134559) * Grant manage_threads to java.desktop for Tika * Produce a PolicyScope for excluded system modules. Fortunately, the JDK is still modular even if the tests are run sans modules, so we can use the module API to identify the packages in every system module. * TODO with Jira link
…ic#134544) * Grant manage_threads to java.desktop for Tika * Produce a PolicyScope for excluded system modules. Fortunately, the JDK is still modular even if the tests are run sans modules, so we can use the module API to identify the packages in every system module. * TODO with Jira link
…34580) * Grant manage_threads to java.desktop for Tika * Produce a PolicyScope for excluded system modules. Fortunately, the JDK is still modular even if the tests are run sans modules, so we can use the module API to identify the packages in every system module. * TODO with Jira link
I'll have a look and will fix asap @julian-elastic |
Oh, I missed #134578 |
…ic#134544) * Grant manage_threads to java.desktop for Tika * Produce a PolicyScope for excluded system modules. Fortunately, the JDK is still modular even if the tests are run sans modules, so we can use the module API to identify the packages in every system module. * TODO with Jira link
BASE=41fea9d8a715b1e2ffb668c3cf54c6c9645f0331 HEAD=135d74b33ba9f1ce2b0e61fa5fb2a39a3763c688 Branch=main
BASE=41fea9d8a715b1e2ffb668c3cf54c6c9645f0331 HEAD=135d74b33ba9f1ce2b0e61fa5fb2a39a3763c688 Branch=main
BASE=41fea9d8a715b1e2ffb668c3cf54c6c9645f0331 HEAD=135d74b33ba9f1ce2b0e61fa5fb2a39a3763c688 Branch=main
Problem
When processing PDFs, Apache Tika calls pdfbox, which creates a
MemoryCacheInputStream
, which (until JDK 26) usessun.java2d.Disposer
, whose static initializer creates a cleanup thread. SinceDisposer
is in thejava.desktop
module, which we exclude from system modules, the entitlement check formanage_threads
fails.Workaround
For the time being, just have the server grant
manage_threads
tojava.desktop
. This is a fairly broad grant, so we'd like to find a more surgical solution, but this problem is observed in production right now, so we need a fix.Stack trace