apache / apache/arrow-java

Java 21 breaks access to netty-buffer class

未關閉
#1,106 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
Type: bug
主要語言
Java
星號
94
分支
152
平均合併
3 天 16 小時
30 天內合併 PR
11

描述

### Describe the bug, including details regarding any error messages, version, and platform.

When trying to start an Arrow Flight server use is made of class `io.netty.buffer.PoolArena` in netty-buffer that is no longer accessible in java 21 from class `io.netty.buffer.PooledByteBufAllocatorL` in `arrow-memory-netty-buffer-patch-19.0.0.jar`.
I think this might be caused by Java 21 being more restrictive than 17.

Stack trace
```java
Exception in thread "main" java.lang.IllegalAccessError: failed to access class io.netty.buffer.PoolArena from class io.netty.buffer.PooledByteBufAllocatorL$InnerAllocator (io.netty.buffer.PoolArena is in unnamed module of loader 'app'; io.netty.buffer.PooledByteBufAllocatorL$InnerAllocator is in unnamed module of loader org.apache.hop.core.plugins.HopURLClassLoader @26612078)
at io.netty.buffer.PooledByteBufAllocatorL$InnerAllocator.(PooledByteBufAllocatorL.java:141)
at io.netty.buffer.PooledByteBufAllocatorL.(PooledByteBufAllocatorL.java:46)
at org.apache.arrow.memory.netty.NettyAllocationManager.(NettyAllocationManager.java:54)
at org.apache.arrow.memory.netty.DefaultAllocationManagerFactory.(DefaultAllocationManagerFactory.java:26)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:423)
at java.base/java.lang.Class.forName(Class.java:414)
at org.apache.arrow.memory.DefaultAllocationManagerOption.getFactory(DefaultAllocationManagerOption.java:105)
at org.apache.arrow.memory.DefaultAllocationManagerOption.getDefaultAllocationManagerFactory(DefaultAllocationManagerOption.java:92)
at org.apache.arrow.memory.BaseAllocator$Config.getAllocationManagerFactory(BaseAllocator.java:826)
at org.apache.arrow.memory.ImmutableConfig.access$001(ImmutableConfig.java:20)
at org.apache.arrow.memory.ImmutableConfig$InitShim.getAllocationManagerFactory(ImmutableConfig.java:80)
at org.apache.arrow.memory.ImmutableConfig.(ImmutableConfig.java:43)
at org.apache.arrow.memory.ImmutableConfig$Builder.build(ImmutableConfig.java:492)
at org.apache.arrow.memory.BaseAllocator.(BaseAllocator.java:72)
at org.apache.hop.arrow.flight.ArrowFlightServer.(ArrowFlightServer.java:59)
at org.apache.hop.arrow.command.ArrowCommand.run(ArrowCommand.java:108)
at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2423)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2425)
at picocli.CommandLine.execute(CommandLine.java:2174)
at org.apache.hop.hop.Hop.main(Hop.java:131)

```

貢獻指南

開啟貢獻指南

研究方向

首先,在 Java 21 上啟動 Arrow Flight 伺服器時重現該故障,然後檢查堆疊追蹤中識別出的 PooledByteBufAllocatorL 和 NettyAllocationManager。將相關的存取行為與 Java 17 進行比較;當不再發生 IllegalAccessError 且伺服器成功啟動時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
backend, data-engineering
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。