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

ISPN-8657 Netty upgrade to 4.1.21 #5676

Merged
merged 1 commit into from
Feb 15, 2018

Conversation

slaskawi
Copy link
Contributor

@@ -528,6 +528,11 @@
<artifactId>netty-transport-native-epoll</artifactId>
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-unix-common</artifactId>
Copy link
Member

Choose a reason for hiding this comment

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

why do we need this?

Copy link
Contributor

@johnou johnou Jan 15, 2018

Choose a reason for hiding this comment

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

might make more sense to pull in the bom in dependencyManagement?

<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-bom</artifactId>
    <version>${version.netty}</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Enforcer plugin discovered another transitive dependency of netty-transport-native-epoll IIRC. Yes Netty is fragmented, not modular.

Copy link
Member

Choose a reason for hiding this comment

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

@johnou Is this a kitchensink import? We want to include only what's needed.

@slaskawi I see, it's a new module in 4.1.11+

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rvansa You probably mean 9.1.11. Yes.

Copy link
Contributor

Choose a reason for hiding this comment

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

@rvansa no, as bom's are defined in dependencyManagement only the metadata is pulled in, you still need to define every dependency you want to use but you can omit the version.

See netty/netty#5994 (comment) for a good explanation.

Copy link
Member

Choose a reason for hiding this comment

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

@johnou OK, thanks for explanation. Yes, in this case importing the bom would make sense. @slaskawi Would you like to include that change here?

@slaskawi No, I mean new module in netty 4.1.11.

Copy link
Contributor

Choose a reason for hiding this comment

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

@slaskawi if you are using native transports you might want to wait until the next Netty release, see netty/netty#7563

Copy link
Member

Choose a reason for hiding this comment

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

@johnou Is this a kitchensink import? We want to include only what's needed.

dependencyManagement != dependencies

Whatever goes into dependencyManagement is not dependent upon necessarily. You have to then select what you depend on. We encourage users to do that all the time with Infinispan's bom (here).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with you guys - let's use the BOM. However I wasn't able to do a full cleanup. The Karaf feature from persistence/remote pull in client/hotrod, which in turn uses Maven filtering to fill out its features.xml file. I believe this can be fixed by using Netty as bundles and not wrapping them. I created ISPN-8735 to investigate this option. Any volunteers?

@tristantarrant
Copy link
Member

4.1.20 with a fix for netty/netty#7563 is out. Please update the PR to give CI a chance

@johnou
Copy link
Contributor

johnou commented Jan 29, 2018

@tristantarrant depending on your usage of Netty netty/netty#7627 might be considered a show stopper too (we haven't been able to update for the past two releases). 4.1.21 coming this week.

@slaskawi
Copy link
Contributor Author

@tristantarrant @johnou With the latest changes, we pull whichever transport the BOM points us to. I would like to keep it that way.

@slaskawi slaskawi added this to the 9.2.0.CR2 milestone Jan 30, 2018
@johnou
Copy link
Contributor

johnou commented Jan 30, 2018

@slaskawi the BOM doesn't dictate what transport is used, what I am getting at is for the past two Netty releases there have been two nasty regressions which may cause problems with projects which integrate with infinispan. Netty 4.1.21 is coming this week containing the fixes.

@slaskawi
Copy link
Contributor Author

@johnou Could you please point out, which regressions are you talking about?

Also, could you please explain what artifacts do you mean by saying transport? If you mean netty-transport-native-epoll, which we are using in Infinispan, your statement is incorrect - Netty BOM does declare versions of those artifacts. Please have a look at this section.

@johnou
Copy link
Contributor

johnou commented Jan 30, 2018

@slaskawi the regressions are in my previous comments in this pull request #5676 (comment) which links to netty/netty#7563 that may cause OOO messages and general data corruption when using native transports and #5676 (comment) linking to netty/netty#7627 which can result in the JVM hanging on shutdown. As far as transports goes, in order to use epoll you are required to setup an epoll event loop, programatically, adding the epoll artifact to your classpath isn't enough, I am well aware of how a BOM works (I was the author of it in the Netty project netty/netty#6412) and I believe it is useful in this use-case which is why I suggested it.

@gustavocoding
Copy link

I think we should wait for 4.1.21

@@ -666,62 +665,6 @@
<artifactId>reactive-streams</artifactId>
<version>${version.reactivestreams}</version>
</dependency>
<dependency>
Copy link
Contributor

Choose a reason for hiding this comment

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

The dependencies should still be defined, just excluding the version tag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely not, it's a DependencyManagement not a Dependencies section.

Copy link
Contributor

Choose a reason for hiding this comment

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

h0h0 my bad, so it is, I should have looked at the full diff 👍

@slaskawi
Copy link
Contributor Author

@tristantarrant Your call on waiting till 4.1.21 is out?

@tristantarrant
Copy link
Member

Sure, let's wait

@tristantarrant
Copy link
Member

Just wanted to catch any regressions (if any) with 4.1.20

@gustavocoding gustavocoding modified the milestones: 9.2.0.CR2, 9.2.0.Final Jan 30, 2018
@slaskawi
Copy link
Contributor Author

@johnou Yes, that's exactly what we do (defining Epoll Event Loops and declaring Epoll Transport as a dependency). See the Server Core module and NettyTransport class.

@johnou
Copy link
Contributor

johnou commented Jan 30, 2018

Yes I figured so, I was just explaining my statement that you said was incorrect 😄

@slaskawi
Copy link
Contributor Author

@johnou Ok, got it. Thanks for the explanation!

@johnou
Copy link
Contributor

johnou commented Feb 5, 2018

@slaskawi Netty 4.1.21 is now available in Central Maven.

@slaskawi slaskawi changed the title ISPN-8657 Netty upgrade to 4.1.19 ISPN-8657 Netty upgrade to 4.1.21 Feb 6, 2018
@slaskawi
Copy link
Contributor Author

slaskawi commented Feb 6, 2018

@johnou Thanks a lot! I've updated this PR.

pom.xml Outdated
@@ -316,6 +315,9 @@
<version.webdav.servlet>2.0.1</version.webdav.servlet>
<version.weld-se>2.3.4.Final</version.weld-se>
<version.weld>2.3.4.Final</version.weld>
<version.netty-tcpnative-boringssl-static>2.0.7.Final</version.netty-tcpnative-boringssl-static>
Copy link
Contributor

Choose a reason for hiding this comment

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

typo, tcpnative -> tcnative

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Thanks!

@gustavocoding
Copy link

CI is having trouble with this PR

@slaskawi
Copy link
Contributor Author

slaskawi commented Feb 8, 2018

@gustavonalle Yes, it seems the slave got a timeout.... Let me restart all of them and retrigger the job.

@tristantarrant
Copy link
Member

Retriggering build

@tristantarrant
Copy link
Member

Ok, it seems like it is hanging in the OSGi testsuite.

@slaskawi
Copy link
Contributor Author

@tristantarrant I got out the loop for a while. Is it related or not?

@tristantarrant
Copy link
Member

Yes: you have excluded org.conscrypt but something still wants it.

018-02-15T14:26:16,601 | ERROR | pool-1-thread-2 | BootFeaturesInstaller | 10 - org.apache.karaf.features.core - 4.1.4 | Error installing boot features
org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=infinispan-embedded; type=karaf.feature; version="[9.2.0.SNAPSHOT,9.2.0.SNAPSHOT]"; filter:="(&(osgi.identity=infinispan-embedded)(type=karaf.feature)(version>=9.2.0.SNAPSHOT)(version<=9.2.0.SNAPSHOT))" [caused by: Unable to resolve infinispan-embedded/9.2.0.SNAPSHOT: missing requirement [infinispan-embedded/9.2.0.SNAPSHOT] osgi.identity; osgi.identity=org.infinispan.embedded; type=osgi.bundle; version="[9.2.0.SNAPSHOT,9.2.0.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve org.infinispan.embedded/9.2.0.SNAPSHOT: missing requirement [org.infinispan.embedded/9.2.0.SNAPSHOT] osgi.wiring.package; filter:="(osgi.wiring.package=org.conscrypt)"]]
at org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42) ~[?:?]
at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:391) ~[?:?]
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:377) ~[?:?]
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:349) ~[?:?]
at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:218) ~[?:?]
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:291) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1248) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$1(FeaturesServiceImpl.java:1147) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]

@slaskawi
Copy link
Contributor Author

Thanks a lot @tristantarrant! I will investigate this in the first free time slot.

@johnou
Copy link
Contributor

johnou commented Feb 15, 2018

org.conscrypt is optional but it's possible that it wasn't marked as optional in the Netty osgi bundle?

@slaskawi
Copy link
Contributor Author

Rebased and excluded org.conscrypt from the embedded. Thanks @tristantarrant for sorting it out!

@tristantarrant tristantarrant merged commit c268f9c into infinispan:master Feb 15, 2018
@tristantarrant
Copy link
Member

Merged, thanks

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

Successfully merging this pull request may close these issues.

6 participants