apache / apache/arrow-java

Java 21 breaks access to netty-buffer class

Aperta
#1,106 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Type: bug
Lingua principale
Java
Stelle
94
Fork
152
Merge medio
3g 16h
PR unite (30g)
11

Descrizione

### 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)

```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo il fallimento durante l’avvio di un server Arrow Flight su Java 21, quindi esamina PooledByteBufAllocatorL e NettyAllocationManager, come identificati nello stack trace. Confronta il comportamento di accesso pertinente con Java 17; il lavoro è completato quando l’IllegalAccessError non si verifica più e il server si avvia correttamente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
backend, data-engineering
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.