Skip to content

Dont shade netty at distributedlog-core-shaded#1231

Closed
sijie wants to merge 1 commit into
apache:masterfrom
sijie:dont_shade_netty
Closed

Dont shade netty at distributedlog-core-shaded#1231
sijie wants to merge 1 commit into
apache:masterfrom
sijie:dont_shade_netty

Conversation

@sijie
Copy link
Copy Markdown
Member

@sijie sijie commented Mar 6, 2018

Descriptions of the changes in this PR:

Problem

JVM crashed on linux platforms, whendistributedlog-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.

*Problem*

JVM crashed when `distributedlog-core-shaded` (where netty was shaded) is used in a project where netty isn't shaded
and epoll is enabled. The conflict happens on loading the native epoll transport because shaded netty doesn't actually
shade the native jni library. so signature mismatch when both version of netty try to resolve jni library.

*Solution*

Dont shade netty at all. Let the application resolve which netty version to use.
@sijie sijie self-assigned this Mar 6, 2018
@sijie sijie requested a review from jiazhai March 6, 2018 08:24
@sijie sijie added the area/dlog label Mar 6, 2018
Copy link
Copy Markdown
Member

@jiazhai jiazhai left a comment

Choose a reason for hiding this comment

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

+1, lgtm.

@sijie
Copy link
Copy Markdown
Member Author

sijie commented Mar 6, 2018

travis and IT passed. since this change is only touch the dlog shaded jar, ignore CI results to merge this, allowing to unblock pulsar.

@sijie
Copy link
Copy Markdown
Member Author

sijie commented Mar 6, 2018

IGNORE CI

@sijie sijie added this to the 4.7.0 milestone Mar 6, 2018
@sijie sijie closed this in bed1d6f Mar 6, 2018
@sijie sijie deleted the dont_shade_netty branch July 16, 2018 02:35
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.

2 participants