You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "pburka (via GitHub)" <gi...@apache.org> on 2023/04/11 19:58:18 UTC

[GitHub] [arrow] pburka opened a new issue, #35053: MemoryUtil.directBuffer throws UnsupportedOperationException on Java 21

pburka opened a new issue, #35053:
URL: https://github.com/apache/arrow/issues/35053

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   On an early access build of Java 21, I'm seeing some failures in Apache Arrow tests. The same tests work on Java 17, 18, 19 and 20.
   
   Test failures all look like this:
   ```
   java.lang.UnsupportedOperationException: sun.misc.Unsafe or java.nio.DirectByteBuffer.<init>(long, int) not available
          org.apache.arrow.memory.util.MemoryUtil.directBuffer(MemoryUtil.java:167)
          org.apache.arrow.memory.ArrowBuf.getDirectBuffer(ArrowBuf.java:228)
          org.apache.arrow.memory.ArrowBuf.nioBuffer(ArrowBuf.java:223)
          org.apache.arrow.vector.ipc.ReadChannel.readFully(ReadChannel.java:87)
          org.apache.arrow.vector.ipc.message.MessageSerializer.readMessageBody(MessageSerializer.java:727)
          org.apache.arrow.vector.ipc.message.MessageChannelReader.readNext(MessageChannelReader.java:67)
          org.apache.arrow.vector.ipc.ArrowStreamReader.loadNextBatch(ArrowStreamReader.java:145)
   ```
   
   From a brief investigation, it looks like the private `(long, int)` constructor has been replaced with a `(long, long)` constructor in Java 21. (See https://github.com/openjdk/jdk/blob/42fa000a7d042e425913aab2842f8166a0c2172a/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template#L180-L188 and https://github.com/openjdk/jdk/commit/a56598f5a534cc9223367e7faa8433ea38661db9)
   
   ### Component(s)
   
   Java


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] lidavidm commented on issue #35053: [Java] MemoryUtil.directBuffer throws UnsupportedOperationException on Java 21

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #35053:
URL: https://github.com/apache/arrow/issues/35053#issuecomment-1504237010

   CC @davisusanibar 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] lidavidm closed issue #35053: [Java] MemoryUtil.directBuffer throws UnsupportedOperationException on Java 21

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed issue #35053: [Java] MemoryUtil.directBuffer throws UnsupportedOperationException on Java 21
URL: https://github.com/apache/arrow/issues/35053


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] dongjoon-hyun commented on issue #35053: [Java] MemoryUtil.directBuffer throws UnsupportedOperationException on Java 21

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on issue #35053:
URL: https://github.com/apache/arrow/issues/35053#issuecomment-1612393816

   Hi, All. I made a PR for this issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org