brubeck icon indicating copy to clipboard operation
brubeck copied to clipboard

Gauge overflow

Open ghost opened this issue 7 years ago • 1 comments

Hi Seems like brubeck got overflow, when handling gauge-value more, than 2^32 (4294967296).

(I did not find in statsd specification max values for gauge: https://github.com/etsy/statsd/blob/master/docs/metric_types.md, and in my production envs we often sent values more than 2^32)

How to reproduce:

  1. Send metric to brubeck and watch network packets (I use ngrep): echo "complex.delete_me.mem:4294967296|g" | nc -u -q1 127.0.0.1 8126 ... U 127.0.0.1:38487 -> 127.0.0.1:8126 complex.delete_me.mem:4294967296|g.

  2. Watch network traffic from brubeck to storage: T 10.0.2.9:53546 -> 10.9.192.2:2003 [AP] complex.delete_me.mem 0 1493135074. # brubeck send 0 instead of 4294967296

My investigation lead me to this function. https://github.com/github/brubeck/blob/master/src/utils.c#L137

May you provide fix for that case? Thanks in advance!

ghost avatar Apr 25 '17 16:04 ghost

#37 I think this patch can fix this.

ccl0326 avatar Jul 26 '17 06:07 ccl0326