You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by si...@apache.org on 2018/03/06 09:33:32 UTC
[bookkeeper] branch master updated: Dont shade netty at
distributedlog-core-shaded
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new bed1d6f Dont shade netty at distributedlog-core-shaded
bed1d6f is described below
commit bed1d6f03700838f0667fbab8f8d9032b8294792
Author: Sijie Guo <si...@apache.org>
AuthorDate: Tue Mar 6 01:33:26 2018 -0800
Dont shade netty at distributedlog-core-shaded
Descriptions of the changes in this PR:
*Problem*
JVM crashed on linux platforms, when`distributedlog-core-shaded` (where netty `4.1.12.Final` was shaded) is used in a project where a non-shaded netty `4.1.21.Final` is used and epoll is enabled.
```
Event: 13.322 Thread 0x00007fef90013000 Exception <a 'java/lang/NoSuchMethodError': Method io.netty.channel.epoll.Native.epollWait0(IJII)I name or signature does not match> (0x00000000e709c060) thrown at [/build/openjdk-8-8u141-b15/src/hotspot/src/share/vm/prims/jni.cpp, line 4011]
```
Because Epoll is enabled on linux platforms. However because two different netty versions bring in two different jni bindings, when the netty epoll transport tries to resolve the jni library, it hit the signature mismatch issue.
*Solution*
Dont shade netty at all. Let the application resolve which netty version to use.
Author: Sijie Guo <si...@apache.org>
Reviewers: Jia Zhai <None>
This closes #1231 from sijie/dont_shade_netty
---
shaded/distributedlog-core-shaded/pom.xml | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/shaded/distributedlog-core-shaded/pom.xml b/shaded/distributedlog-core-shaded/pom.xml
index 96d4864..97d26f3 100644
--- a/shaded/distributedlog-core-shaded/pom.xml
+++ b/shaded/distributedlog-core-shaded/pom.xml
@@ -44,6 +44,14 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-common</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-buffer</artifactId>
+ </exclusion>
</exclusions>
</dependency>
</dependencies>
@@ -75,11 +83,8 @@
<include>com.fasterxml.jackson.core:jackson-annotations</include>
<include>com.google.guava:guava</include>
<include>com.google.protobuf:protobuf-java</include>
+ <!-- netty 3 (included from zookeeper) -->
<include>io.netty:netty</include>
- <include>io.netty:netty-all</include>
- <include>io.netty:netty-buffer</include>
- <include>io.netty:netty-common</include>
- <include>io.netty:netty-tcnative-boringssl-static</include>
<include>net.java.dev.jna:jna</include>
<include>net.jpountz.lz4:lz4</include>
<include>org.apache.bookkeeper:bookkeeper-common</include>
@@ -170,10 +175,6 @@
</relocation>
<!-- netty -->
<relocation>
- <pattern>io.netty</pattern>
- <shadedPattern>dlshade.io.netty</shadedPattern>
- </relocation>
- <relocation>
<pattern>org.jboss.netty</pattern>
<shadedPattern>dlshade.org.jboss.netty</shadedPattern>
</relocation>
--
To stop receiving notification emails like this one, please contact
sijie@apache.org.