Skip to content
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

[WIP] [SPARK-19552] [BUILD] Upgrade Netty version to 4.1.8 final #16888

Closed
wants to merge 3 commits into from
Closed

[WIP] [SPARK-19552] [BUILD] Upgrade Netty version to 4.1.8 final #16888

wants to merge 3 commits into from

Conversation

a-roberts
Copy link
Contributor

What changes were proposed in this pull request?

We should use Netty 4.1.8 due to one security concern and other bug fixes - we'll need to change Spark code as well as the usual misc files (like pom.xml and deps files) to enable this

How was this patch tested?

Existing unit tests - this is a WIP as this introduces some new test failures and I have dummy implementations for the required methods I've added.

@mridulm
Copy link
Contributor

mridulm commented Feb 10, 2017

Jenkins, retest this please

@SparkQA
Copy link

SparkQA commented Feb 10, 2017

Test build #72715 has finished for PR 16888 at commit cc4fb37.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor

rxin commented Feb 10, 2017

Shouldn't we use netty-4.0.44.Final rather than 4.1.x?

@rxin
Copy link
Contributor

rxin commented Feb 10, 2017

BTW for Netty we shouldn't just bump to the highest version. We should use the maintenance branches.

@srowen
Copy link
Member

srowen commented Feb 12, 2017

Updating to 4.0.44 should be fine (though, we got bit even by a maintenance update behavior change a while ago) but apparently that doesn't include the security fix in question. That said, it's not clear what the security issue is or whether it affects Spark -- can we start with that?

Updating to 4.1.x is probably a good idea, eventually, even if it's not necessary, but it will require some care and testing. It sounds like this should be marked as [WIP] and doesn't work yet. If it's troublesome we may not proceed with this.

CC @zsxwing

@a-roberts
Copy link
Contributor Author

a-roberts commented Feb 13, 2017

Netty 4.1.1 and above has the fix in (a change to OpenSslEngine)- Netty 4.0.x does not, and the implementations of OpenSslEngine differs substantially between the releases (so a simple case of adding in the fix would be non-trivial and potentially lead to complications, this would be the path of least resistance)

You can find more info on the CVE I'm concerned with at: https://www.versioneye.com/java/io.netty:netty-all/4.0.43.Final

To be impacted it sounds as though we need to do several things - use Spark with Netty 4.1.0 and below (including the 4.0.x releases), have tcnative on our classpath and we specify to use the OpenSslEngine (there's a useful overview on why you'd want to do this here which mentions it being a drop-in replacement for the JDK classes and offers superior performance). Info on using tcnative here

We don't include any of the netty/tcnative native libraries for Spark so I don't think we're impacted - but moving up to take on other fixes as well would be useful (and if it is so much faster we could see shuffle-intensive workloads speedup by upgrading and including natives later on). I'll set this as a WIP and look into why the tests fail.

@a-roberts a-roberts changed the title [SPARK-19552] [BUILD] Upgrade Netty version to 4.1.8 final [WIP] [SPARK-19552] [BUILD] Upgrade Netty version to 4.1.8 final Feb 13, 2017
@srowen
Copy link
Member

srowen commented Feb 13, 2017

OK, so there isn't actually a security case here (might update the JIRA accordingly). Updating to 4.1.x seems like a fine thing to try. If you can get it to work well, great.

@rxin
Copy link
Contributor

rxin commented Feb 13, 2017

Are there specific benefits brought by updating to 4.1 of Netty? Netty is so core to Spark that any bug in it would be extremely difficult to debug (yes we have founds bugs in Netty and helped fix those in the past). So unless there are significant benefits, please do NOT update to 4.1.

@zsxwing
Copy link
Member

zsxwing commented Feb 13, 2017

@a-roberts Spark doesn't use Netty's SSL handler, so it won't be a problem.

@a-roberts
Copy link
Contributor Author

I'll close this one then until there ever is a need to upgrade, cheers


@Override
public FileRegion retain() {
return this;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this breaks the netty reference counting logic, I think instead it should be

return (TestFileRegion)super.retain();


@Override
public FileRegion retain(int increment) {
return this;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, I think this should be

return (TestFileRegion)super.retain(increment);

@drcrallen
Copy link
Contributor

taken over by #19884 ?

@srowen
Copy link
Member

srowen commented Oct 5, 2018

Agree, this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants