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

Spring Boot 3.4.0 Native Image fails on Netty netty-common-4.1.115. java.lang.NoSuchFieldException: producerIndex #576

Closed
rowi1de opened this issue Nov 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rowi1de
Copy link

rowi1de commented Nov 23, 2024

Using Spring Boot 3.4.0 Native Image fails on Netty netty-common-4.1.115. java.lang.NoSuchFieldException: producerIndex
See https://github.com/rowi1de/netty-native

2024-11-23 01:03:57 2024-11-23T00:03:57.949Z ERROR 1 --- [netty-native] [ctor-http-nio-2] r.netty.transport.ServerTransport        : [71e5e572, L:/172.18.0.4:8080 - R:/192.168.65.1:29377] onUncaughtException(SimpleConnection{channel=[id: 0x71e5e572, L:/172.18.0.4:8080 - R:/192.168.65.1:29377]})
2024-11-23 01:03:57 
2024-11-23 01:03:57 java.lang.ExceptionInInitializerError: null
2024-11-23 01:03:57     at [email protected]/java.lang.Class.ensureInitialized(DynamicHub.java:604) ~[netty.graalvm.NettyNativeApiApplicationKt:na]
2024-11-23 01:03:57     at [email protected]/java.lang.Class.ensureInitialized(DynamicHub.java:604) ~[netty.graalvm.NettyNativeApiApplicationKt:na]
2024-11-23 01:03:57     at [email protected]/java.lang.Class.ensureInitialized(DynamicHub.java:604) ~[netty.graalvm.NettyNativeApiApplicationKt:na]
2024-11-23 01:03:57     at [email protected]/java.lang.Class.ensureInitialized(DynamicHub.java:604) ~[netty.graalvm.NettyNativeApiApplicationKt:na]
2024-11-23 01:03:57     at [email protected]/java.lang.Class.ensureInitialized(DynamicHub.java:604) ~[netty.graalvm.NettyNativeApiApplicationKt:na]
2024-11-23 01:03:57     at [email protected]/java.lang.Class.ensureInitialized(DynamicHub.java:604) ~[netty.graalvm.NettyNativeApiApplicationKt:na]
2024-11-23 01:03:57     at io.netty.util.internal.PlatformDependent.newFixedMpscUnpaddedQueue(PlatformDependent.java:1102) ~[na:na]
2024-11-23 01:03:57     at io.netty.buffer.PoolThreadCache$MemoryRegionCache.<init>(PoolThreadCache.java:337) ~[netty.graalvm.NettyNativeApiApplicationKt:4.1.115.Final]
2024-11-23 01:03:57     at io.netty.buffer.PoolThreadCache$SubPageMemoryRegionCache.<init>(PoolThreadCache.java:302) ~[na:na]
2024-11-23 01:03:57     at io.netty.buffer.PoolThreadCache.createSubPageCaches(PoolThreadCache.java:113) ~[netty.graalvm.NettyNativeApiApplicationKt:4.1.115.Final]
2024-11-23 01:03:57     at io.netty.buffer.PoolThreadCache.<init>(PoolThreadCache.java:77) ~[netty.graalvm.NettyNativeApiApplicationKt:4.1.115.Final]
2024-11-23 01:03:57     at io.netty.buffer.PooledByteBufAllocator$PoolThreadLocalCache.initialValue(PooledByteBufAllocator.java:541) ~[na:na]
2024-11-23 01:03:57     at io.netty.buffer.PooledByteBufAllocator$PoolThreadLocalCache.initialValue(PooledByteBufAllocator.java:518) ~[na:na]
2024-11-23 01:03:57     at io.netty.util.concurrent.FastThreadLocal.initialize(FastThreadLocal.java:177) ~[netty.graalvm.NettyNativeApiApplicationKt:4.1.115.Final]
2024-11-23 01:03:57     at io.netty.util.concurrent.FastThreadLocal.get(FastThreadLocal.java:142) ~[netty.graalvm.NettyNativeApiApplicationKt:4.1.115.Final]
2024-11-23 01:03:57     at io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:398) ~[na:na]
2024-11-23 01:03:57     at io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:188) ~[netty.graalvm.NettyNativeApiApplicationKt:4.1.115.Final]
2024-11-23 01:03:57     at io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:179) ~[netty.graalvm.NettyNativeApiApplicationKt:4.1.115.Final]
2024-11-23 01:03:57     at io.netty.buffer.AbstractByteBufAllocator.ioBuffer(AbstractByteBufAllocator.java:140) ~[netty.graalvm.NettyNativeApiApplicationKt:4.1.115.Final]
2024-11-23 01:03:57     at io.netty.channel.DefaultMaxMessagesRecvByteBufAllocator$MaxMessageHandle.allocate(DefaultMaxMessagesRecvByteBufAllocator.java:120) ~[netty.graalvm.NettyNativeApiApplicationKt:4.1.115.Final]
2024-11-23 01:03:57     at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:150) ~[netty.graalvm.NettyNativeApiApplicationKt:4.1.115.Final]
2024-11-23 01:03:57     at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[na:na]
2024-11-23 01:03:57     at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[na:na]
2024-11-23 01:03:57     at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[na:na]
2024-11-23 01:03:57     at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[na:na]
2024-11-23 01:03:57     at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[na:na]
2024-11-23 01:03:57     at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[na:na]
2024-11-23 01:03:57     at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[na:na]
2024-11-23 01:03:57     at [email protected]/java.lang.Thread.runWith(Thread.java:1596) ~[netty.graalvm.NettyNativeApiApplicationKt:na]
2024-11-23 01:03:57     at [email protected]/java.lang.Thread.run(Thread.java:1583) ~[netty.graalvm.NettyNativeApiApplicationKt:na]
2024-11-23 01:03:57     at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:902) ~[netty.graalvm.NettyNativeApiApplicationKt:na]
2024-11-23 01:03:57     at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:878) ~[netty.graalvm.NettyNativeApiApplicationKt:na]
2024-11-23 01:03:57 Caused by: java.lang.RuntimeException: java.lang.NoSuchFieldException: producerIndex
2024-11-23 01:03:57     at io.netty.util.internal.shaded.org.jctools.util.UnsafeAccess.fieldOffset(UnsafeAccess.java:111) ~[na:na]
2024-11-23 01:03:57     at io.netty.util.internal.shaded.org.jctools.queues.unpadded.MpscUnpaddedArrayQueueProducerIndexField.<clinit>(MpscUnpaddedArrayQueue.java:38) ~[netty.graalvm.NettyNativeApiApplicationKt:4.1.115.Final]
2024-11-23 01:03:57     ... 32 common frames omitted
2024-11-23 01:03:57 Caused by: java.lang.NoSuchFieldException: producerIndex
2024-11-23 01:03:57     at [email protected]/java.lang.Class.checkField(DynamicHub.java:1044) ~[netty.graalvm.NettyNativeApiApplicationKt:na]
2024-11-23 01:03:57     at [email protected]/java.lang.Class.getDeclaredField(DynamicHub.java:1159) ~[netty.graalvm.NettyNativeApiApplicationKt:na]
2024-11-23 01:03:57     at io.netty.util.internal.shaded.org.jctools.util.UnsafeAccess.fieldOffset(UnsafeAccess.java:107) ~[na:na]
2024-11-23 01:03:57     ... 33 common frames omitted
2024-11-23 01:03:57 
@rowi1de rowi1de added the bug Something isn't working label Nov 23, 2024
@rowi1de
Copy link
Author

rowi1de commented Nov 23, 2024

Spring is including an outdated release
spring-projects/spring-boot#43273

@rowi1de rowi1de closed this as completed Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant