You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using message pack to serialize k/v structure data and save in to db. In very rare case(about 0.000000001%), the result is corrupted.
We serializes a lot of data with thread local MessageBufferPacker, and 160 threads may executes serialization concurrently.
Seeing serializing result, in the middle of the some value, a part of the other data is mixed in. (no exception is occurred)
I've not yet to figure out how to reproduce, and cannot share the actual data here because it is production data.
Serialization input / output is similar to following. (actual data is more large(above 10kb, more fields))
input
data A: {field1: 'value1', field2:'value2', field3:'value3', field4:'value4'}
data B: {field6: 'value6', field7:'value7'}
output of data A
[map(4)][string(5)]field1[string(5)]valvalue6[string(5)]field7[string(5)]value7[string(5)]field4[string(5)]value4
(label [ ] means field type and value length):
data B is mixed in from the middle of value2
Because the real string length is different from length defined in header, cannot deserialize the result (causes error).
I think possible causes is
Previous packing state is remained illegally. (MessageBufferPacker.clear() is insufficient to clear data)
We are using message pack to serialize k/v structure data and save in to db. In very rare case(about 0.000000001%), the result is corrupted.
We serializes a lot of data with thread local MessageBufferPacker, and 160 threads may executes serialization concurrently.
Seeing serializing result, in the middle of the some value, a part of the other data is mixed in. (no exception is occurred)
I've not yet to figure out how to reproduce, and cannot share the actual data here because it is production data.
Serialization input / output is similar to following. (actual data is more large(above 10kb, more fields))
input
data A:
{field1: 'value1', field2:'value2', field3:'value3', field4:'value4'}
data B:
{field6: 'value6', field7:'value7'}
output of data A
[map(4)][string(5)]field1[string(5)]valvalue6[string(5)]field7[string(5)]value7[string(5)]field4[string(5)]value4
(label
[ ]
means field type and value length):data B is mixed in from the middle of
value2
Because the real string length is different from length defined in header, cannot deserialize the result (causes error).
I think possible causes is
Is this known behavior? Do you have any idea?
Code:
environment:
openjdk-17
'org.msgpack:msgpack-core:0.8.20'
'com.fasterxml.jackson.core:jackson-core:2.10.0'
The text was updated successfully, but these errors were encountered: