Pulsar Java Client 2.8.x does not work on Alpine Linux
See original GitHub issueDescribe the bug I am trying to upgrade from Pulsar Client 2.7.1 to Pulsar Client 2.8.0-SNAPSHOT an application that runs on a docker container based on jdk15-alpine, so with JDK15 and Alpine Linux.
It crashes with a core dump.
This is a regression because it used to work with Pulsar Client 2.7.1 and it prevents the application to be upgrade.
The problem seems related to Netty Native
--------------- S U M M A R Y ------------
Command Line: nb.jar run driver=pulsar yaml=/config/pulsar.yaml config=/config/config.txt cycles=1..100
Host: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, 10 cores, 23G, Alpine Linux v3.12
Time: Thu Jun 3 06:53:51 2021 UTC elapsed time: 3.377851 seconds (0d 0h 0m 3s)
--------------- T H R E A D ---------------
Current thread (0x000055edc903bb00): JavaThread "scenarios:001" [_thread_in_native, id=83, stack(0x00007f50991d6000,0x00007f50992d6aa8)]
Stack: [0x00007f50991d6000,0x00007f50992d6aa8], sp=0x00007f50992d2318, free space=1008k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
C 0x0000000000003efe
C [liborg_apache_pulsar_shade_netty_transport_native_epoll_x86_648601706269064153288.so+0xb487] netty_jni_util_JNI_OnLoad+0x67
C [libjava.so+0xf4bd] Java_jdk_internal_loader_NativeLibraries_load+0xdd
j jdk.internal.loader.NativeLibraries.load(Ljdk/internal/loader/NativeLibraries$NativeLibraryImpl;Ljava/lang/String;ZZ)Z+0 java.base@15-ea
j jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open()Z+57 java.base@15-ea
j jdk.internal.loader.NativeLibraries.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)Ljdk/internal/loader/NativeLibrary;+256 java.base@15-ea
j jdk.internal.loader.NativeLibraries.loadLibrary(Ljava/lang/Class;Ljava/io/File;)Ljdk/internal/loader/NativeLibrary;+51 java.base@15-ea
j java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/io/File;)Ljdk/internal/loader/NativeLibrary;+31 java.base@15-ea
j java.lang.Runtime.load0(Ljava/lang/Class;Ljava/lang/String;)V+61 java.base@15-ea
j java.lang.System.load(Ljava/lang/String;)V+7 java.base@15-ea
j org.apache.pulsar.shade.io.netty.util.internal.NativeLibraryUtil.loadLibrary(Ljava/lang/String;Z)V+5
v ~StubRoutines::call_stub
V [libjvm.so+0x75dbe2] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x2a2
V [libjvm.so+0xb8066b] invoke(InstanceKlass*, methodHandle const&, Handle, bool, objArrayHandle, BasicType, objArrayHandle, bool, Thread*) [clone .constprop.126]+0x85b
V [libjvm.so+0xb81156] Reflection::invoke_method(oopDesc*, Handle, objArrayHandle, Thread*)+0x106
V [libjvm.so+0x814c83] JVM_InvokeMethod+0xf3
j jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0 java.base@15-ea
To Reproduce In order to reproduce you have to run a Java application that boots the Pulsar Client on a docker container with an imaged based on alpine linux.
Expected behavior The client works as for Pulsar 2.7.x
Desktop (please complete the following information):
- Docker, Alpine linux
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
[GitHub] [pulsar] eolivelli opened a new issue #10798: Pulsar Java ...
This is a regression because it used to work with Pulsar Client 2.7.1 and it prevents the application to be upgrade. The problem...
Read more >Pulsar C++ client
You can use a Pulsar C++ client to create producers, consumers, and readers. For Pulsar features that C++ clients support, see Client Feature...
Read more >Release Notes - StreamSets Documentation
5.2.x Known Issues. Data Collector cannot locate a separate runtime properties file that has been uploaded as an external resource for the engine....
Read more >apachepulsar/pulsar-build:alpine-3.7-alpine3.10 - Docker Hub
apachepulsar /pulsar-build:alpine-3.7-alpine3.10. Digest:sha256:387ca20558bea3ab14b2df52e15f55cc2ac4d8e0a307e5aca65768b265699018. OS/ARCH. linux/amd64.
Read more >Java. This vulnerability - CVE - Search Results
This vulnerability does not allow other users to overwrite the contents of these ... Connections from the Pulsar Java Client to the Pulsar...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
it looks like that the problem is more about “epoll” and not about tc-native. and also it looks like that with
adoptopenjdk/openjdk15:alpine-slim
docker image the problem does not reproduce@codelipenghui I am testing about simply reverting "Rollback netty-tc-native version to 2.0.33.Final (#10833) "
Since adoptopenjdk is deprecated, it’s recommended to use eclipse-temurin:17-alpine base image if one wants to use an alpine base image. Eclipse Temurin images are maintained by Adoptium and it provides pre-built OpenJDK binaries.