GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Cassandra client fails with Netty 4.2.2 · Issue #15324 · netty/netty

Cassandra client fails with Netty 4.2.2 #15324

New issue
Copy link
New issue
Copy link
Closed
#15338
Closed
Cassandra client fails with Netty 4.2.2#15324
#15338
Copy link
Assignees
chrisvest
Milestone
4.2.3.Final

Description

@wendigo
wendigo
opened on Jun 6, 2025
Issue body actions

Worked in 4.2.1, stopped working in 4.2.2 with the exception:

Caused by: java.lang.UnsupportedOperationException: ByteBuffer derived from closeable shared sessions not supported
		at java.base/java.nio.DirectByteBuffer.address(DirectByteBuffer.java:319)
		at java.base/java.util.zip.CRC32.update(CRC32.java:102)
		at com.datastax.oss.driver.internal.core.protocol.ByteBufPrimitiveCodec.updateCrc(ByteBufPrimitiveCodec.java:153)
		at com.datastax.oss.driver.internal.core.protocol.ByteBufPrimitiveCodec.updateCrc(ByteBufPrimitiveCodec.java:30)
		at com.datastax.oss.protocol.internal.util.Crc.computeCrc32(Crc.java:31)
		at com.datastax.oss.protocol.internal.SegmentCodec.encode(SegmentCodec.java:70)
		at com.datastax.oss.driver.internal.core.protocol.SegmentToBytesEncoder.encode(SegmentToBytesEncoder.java:43)
		at com.datastax.oss.driver.internal.core.protocol.SegmentToBytesEncoder.encode(SegmentToBytesEncoder.java:28)
		at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:90)

This happens on JDK 24

Activity

  1. wendigo commented on Jun 6, 2025

    @wendigo
    wendigo
    on Jun 6, 2025
    Author
    More actions

    As far as I know until JDK 25, ByteBuffers created from shared MemorySegments won't work in certain internal Java APIs. This is going to be fixed by: openjdk/jdk#25324 and openjdk/jdk#25321

  2. wendigo commented on Jun 6, 2025

    @wendigo
    wendigo
    on Jun 6, 2025
    Author
    More actions

    cc @normanmaurer

  3. wendigo commented on Jun 6, 2025

    @wendigo
    wendigo
    on Jun 6, 2025
    Author
    More actions

    This is related to #15231 I think

  4. chrisvest commented on Jun 6, 2025

    @chrisvest
    chrisvest
    on Jun 6, 2025
    Member
    More actions

    @wendigo Yeah, you can see in #15231 how we had to add work-arounds for those JDK bugs to several places. Others will have to do the same as we can only fix Netty code. 😞 The only alternative is to just not use memory segments for obtaining native memory, but the performance hit of relying on the GC for freeing native memory is too much to tolerate.

  5. wendigo commented on Jun 7, 2025

    @wendigo
    wendigo
    on Jun 7, 2025
    Author
    More actions

    @chrisvest issue I'm facing is that the netty update alone switches to memorysegments and breaks cassandra client and there is no way of disabling these new memorysegment-based bytebuffers on JDK 24

  6. slandelle commented on Jun 9, 2025

    @slandelle
    slandelle
    on Jun 9, 2025
    Contributor
    More actions

    It looks to me like an unexpected breaking change from netty that should be reverted and only brought back for Java 25 when memory segments are more production ready.

    Reacted by Mateusz "Serafin" Gajewski
  7. normanmaurer commented on Jun 9, 2025

    @normanmaurer
    normanmaurer
    on Jun 9, 2025
    Member
    More actions

    I agree with @slandelle... @chrisvest let's only enable memory segments once there is a Java25 release that actually fix it for real.

    Reacted by Mateusz "Serafin" Gajewski and Chris Vest
  8. chrisvest
    added this to the 4.2.3.Final milestone on Jun 10, 2025
  9. chrisvest commented on Jun 10, 2025

    @chrisvest
    chrisvest
    on Jun 10, 2025
    Member
    More actions

    Please take a look: #15338

  10. chrisvest
    self-assigned this
    on Jun 10, 2025
  11. chrisvest
    added a commit that references this issue on Jun 11, 2025

    Only use MemorySegments on Java 25+

    f51e40a
  12. normanmaurer
    closed this as completedin #15338on Jun 13, 2025
  13. pull
    added a commit that references this issue on Jun 13, 2025

    Only use MemorySegments on Java 25+ (netty#15338)

    a919dd3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @chrisvest
    chrisvest

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    • 4.2.3.Final

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.