Skip to content

NUL-corrupted keys, values on JSON serialization #1274

Closed
@jaredstehler

Description

@jaredstehler

First posted in discussions: FasterXML/jackson#215

Jackson version: 2.12.6

We have observed sporadic instances of serialized JSON messages containing corrupted keys and/or values (correct length, but some amount of string suffix is replaced with NUL (0) bytes).

From our metrics, it seemed to recur every 2-4 days on average. We have swapped in a fork of jackson-core with fields marked as volatile in SerializedString (HubSpot@4d3bd2d) and have not seen the issue in > 10 days now.

Even though we saw this once or twice a while back on JDK 17, it seems to have been exacerbated with JDK 21. We are also running on ARM64 instances, which could have some behavior contributing here.

I have not been able to reproduce this in isolation, unfortunately. Happy to help provide any additional information. We are working on an upgrade to jackson 2.18 but I see those fields are unchanged in that branch as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions