Skip to content

[Bug] The default implementations of Dubbo ObjectOutput.writeEvent and ObjectInput.readEvent are inconsistent, resulting in abnormal functionality of some serialization components. #15737

Closed

Description

@huisman6

Pre-check

  • I am sure that all the content I provide is in English.

Search before asking

  • I had searched in the issues and found no similar issues.

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

Dubbo 3.3.5 , JDK21

Steps to reproduce this issue

Backgroud

The default implementation of org.apache.dubbo.common.serialize.ObjectOutput.writeEvent calls writeObject(data),
The default implementation of org.apache.dubbo.common.serialize.ObjectInput.readEvent is readUTF().

We used apache dubbo-serialization-fury/fory, which requires that serialization and deserialization methods must be called in pairs. The serialization format and parsing logic of writeObject and readUTF are different, resulting in deserialization exceptions.

The error stack is as follows:

[DUBBO] Decode request failed: Decode dubbo protocol event failed.
java.io.IOException: org.apache.dubbo.common.serialize.SerializationException: java.lang.IndexOutofBoundsException: readerindex(6) + length(67108837) exceeds
size(32): org.apache.fory.memory.MemoryBuffer$BsoundChecker@52b2d461

How to reproduce:

  1. add maven dependency dubbo-serialization-fury or dubbo-serialization-fory
  2. call:ForyObjectInput.writeEvent("R") and ForyObjectInput.readEvent()

What you expected to happen

The default implementation logic of oObjectOutput.writeEvent and ObjectInput.readEvent remains consistent, and the default implementation of writeEvent is adjusted to writeUTF(String).

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

Activity

  1. finefuture commented on Oct 23, 2025

    @finefuture
    Contributor

    Would you like to submit a PR to fix it?

  2. added
    help wantedEverything needs help from contributors
    and removed on Oct 23, 2025
  3. added a commit that references this issue on Oct 27, 2025
    aed93d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedEverything needs help from contributors

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions