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
{{ message }}
This repository was archived by the owner on Oct 7, 2023. It is now read-only.
where the 4 letter command is incorrectly interpreted as the length of the payload.
So in the case of cons, int(binary.BigEndian.Uint32(buf[:4])) returns 1668247155, this exceeds the capacity of the buffer so a new buffer is allocated of that size causing the large memory usage.
Running a 4 letter word command against zetcd causes a spike in memory usage, this applies to all but
ruok.Steps to reproduce:
echo cons | nc 127.0.0.1 2181Looks like the issue is caused by
zetcd/encode.go
Line 244 in 8db3822
So in the case of
cons,int(binary.BigEndian.Uint32(buf[:4]))returns1668247155, this exceeds the capacity of the buffer so a new buffer is allocated of that size causing the large memory usage.