microsoftarchive / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes
http://redis.io
Other
20.78k stars 5.37k forks source link

Fixes client buffer size underflow #546

Open lgsonic opened 7 years ago

lgsonic commented 7 years ago

Fixes client buffer size underflow due to miscalculation of object memory size.

Client buffer size increases by the value of getStringObjectSdsUsedMemory(o), while decreases by the value of sdsZmallocSize(o->ptr). The mismatch might cause client buffer size underflow and consequent connection close as the limit of client buffer size is exceeded.

Refer to https://github.com/antirez/redis/blob/3.2/src/networking.c

jdawgtech commented 7 years ago

Hi, I am also constantly seeing this issue in our setup whenever client starts writing a lot of data in a short time.

the omem value reported is suspect (very large number)

can we have a release with a fix to this issue please?

using version 3.0.503 a Redis master located in Chicago Data centre (VM Windows 2012 R2), has two slaves (one in London DC, and other in Hong Kong DC)