Throwing an exception in case glibc is missing instead of segfaulting the JVM
See original GitHub issueIt seems Netty’s native support depends on glibc (btw is this documented?).
When glibc is missing (for example using vanilla Alpine), the JVM could end up with a crash (SIGSEGV
), see details in this issue: https://github.com/micrometer-metrics/micrometer/issues/2776
It also seems that Epoll.isAvailable()
returns true
even if glibc is missing.
Expected behavior
Throwing an exception
Actual behavior
JVM crash
Steps to reproduce
Using Netty native with an environment that does not have glibc, e.g.: vanilla Alpine
Minimal yet complete reproducer code (or URL to code)
This seems to be a known issue, please let me know if you really need a reproducer.
Netty version
4.1.68
(latest)
JVM version (e.g. java -version
)
Latest 11:
❯ docker run --rm 'azul/zulu-openjdk-alpine:11-jre' 'sh' '-c' 'java --version'
openjdk 11.0.12 2021-07-20 LTS
OpenJDK Runtime Environment Zulu11.50+19-CA (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM Zulu11.50+19-CA (build 11.0.12+7-LTS, mixed mode)
Or also latest 17:
❯ docker run --rm 'bellsoft/liberica-openjdk-alpine-musl:17' 'sh' '-c' 'java --version'
openjdk 17 2021-09-14 LTS
OpenJDK Runtime Environment (build 17+35-LTS)
OpenJDK 64-Bit Server VM (build 17+35-LTS, mixed mode)
I assume this is an issue in every JRE that is currently supported.
OS version (e.g. uname -a
)
Both images above have the same output:
❯ docker run --rm 'azul/zulu-openjdk-alpine:11-jre' 'sh' '-c' 'uname -a'
Linux 1ee8d1090f14 5.10.47-linuxkit #1 SMP Sat Jul 3 21:51:47 UTC 2021 x86_64 Linux
I assume this is an issue in every OS where glibc is missing.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:16 (12 by maintainers)
Top GitHub Comments
reopened
I have updated the documentation on the native transports to note that musl is not officially supported: https://github.com/netty/netty/wiki/Native-transports
I think that’s the best we can do for now.