-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Update Netty to 4.1.16.Final #28345
Update Netty to 4.1.16.Final #28345
Conversation
This commit updates netty to 4.1.18.Final. This is the latest version that we can have work with the security manager. This updated version of netty fixes issues seen with Java 9 and some data not being sent, which results in timeouts.
@@ -17,6 +17,11 @@ | |||
* under the License. | |||
*/ | |||
|
|||
grant { | |||
// needed for Netty since they use reflection in ThrowableUtil :( | |||
permission java.lang.RuntimePermission "accessDeclaredMembers"; |
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.
Can we open an issue in netty and link here that netty should work gracefully if it does not have this permission?
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.
Opened netty/netty#7614 and added in the comment of this section
Netty 4.1.20.Final is available but there are a few issues that prevent us from upgrading. The main issue is in the The |
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.
I left a comment.
|
||
// TODO remove this once we get a fix into Netty so we don't have to do this | ||
AccessController.doPrivileged((PrivilegedAction<Void>) () -> { | ||
ThrowableUtil.haveSuppressed(); |
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.
Would you leave a comment that this is triggering class initialization? This is horrific.
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.
I pushed b073780
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.
LGTM.
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.
Sorry after reviewing the implications of this I left another comment.
@@ -17,6 +17,12 @@ | |||
* under the License. | |||
*/ | |||
|
|||
grant { |
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.
Can we grant this only to transport-netty4?
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.
I am pretty sure this is handled by the module framework?
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.
That is correct. A general grant means all the jars in this plugin.
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.
Not quite; it grants it to all JARs in the module and I am asking for this to be limited to transport-netty4 only.
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.
Or whatever Netty JAR this is in.
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.
That can't work since the doPriv block is in our module code.
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.
It could be granted to our jar and the single netty jar explicitly though.
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.
Yeah, that should have been an and
, not an or
.
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.
LGTM - as I am good with whatever decision you, Jason, and Ryan make in regards to permissions.
@jasontedor @rjernst I rolled the version back to 4.1.16.Final to avoid needing extra security permissions and the initialization hack. Can you please take a look? |
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.
LGTM, just one ask.
'io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueProducerFields', | ||
'io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueConsumerIndexField', | ||
'io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueProducerIndexField', | ||
'io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueProducerLimitField', |
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.
Seems like these got moved out of alphabetical order?
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.
+1
This commit updates netty to 4.1.16.Final. This is the latest version that we can have work without extra permissions. This updated version of netty fixes issues seen with Java 9 and some data not being sent, which results in timeouts.
This commit updates netty to 4.1.16.Final. This is the latest version that we can have work without extra permissions. This updated version of netty fixes issues seen with Java 9 and some data not being sent, which results in timeouts.
* master: (23 commits) Update Netty to 4.1.16.Final (elastic#28345) Fix peer recovery flushing loop (elastic#28350) REST high-level client: add support for exists alias (elastic#28332) REST high-level client: move to POST when calling API to retrieve which support request body (elastic#28342) Add Indices Aliases API to the high level REST client (elastic#27876) Java Api clean up: remove deprecated `isShardsAcked` (elastic#28311) [Docs] Fix explanation for `from` and `size` example (elastic#28320) Adapt bwc version after backport elastic#28358 Always return the after_key in composite aggregation response (elastic#28358) Adds test name to MockPageCacheRecycler exception (elastic#28359) Adds a note in the `terms` aggregation docs regarding pagination (elastic#28360) [Test] Fix DiscoveryNodesTests.testDeltas() (elastic#28361) Update packaging tests to work with meta plugins (elastic#28336) Remove Painless Type from MethodWriter in favor of Java Class. (elastic#28346) [Doc] Fixs typo in reverse-nested-aggregation.asciidoc (elastic#28348) Reindex: Shore up rethrottle test Only assert single commit iff index created on 6.2 isHeldByCurrentThread should return primitive bool [Docs] Clarify `html` encoder in highlighting.asciidoc (elastic#27766) Fix GeoDistance query example (elastic#28355) ...
This commit updates netty to 4.1.16.Final. This is the latest version that we can have work without
needing extra security permissions. This updated version of netty fixes issues seen with Java 9 and some data not being sent, which results in timeouts.