-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
decode: remove summary quantile limit. #168
Conversation
While running with this configuration I get a two Invalid reads in valgrind:
And here is the valgrind log:
It does not happen for each record, it happens only twice. Any ideas @leonardo-albertovich or @edsiper? |
@tarruda can you take a look at this from the Prometheus decoding perspective ? @leonardo-albertovich can you check the logic for msgpack encoding/decoding here? |
@@ -130,7 +130,7 @@ double cmt_summary_quantile_get_value(struct cmt_metric *metric, int quantile_id | |||
{ | |||
uint64_t val; | |||
|
|||
if (quantile_id < 0 || quantile_id > 5) { | |||
if (quantile_id < 0 /*|| quantile_id > metric->sum_quantiles_count*/) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible the invalid read is because of this commented check? Even though valgrind reports this as happening on cmt_summary_set_default
, it is possible the compiler inlined cmt_summary_quantile_get_value
/ cmt_summary_quantile_set_value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is entirely possible. That check was commented while I worked out the best way to check the limit. The limit before was just hardcoded.
fixed the invalid read (plus another invalid parsing bug) in #170 |
* decode: prometheus: Add failing test for summary issue Signed-off-by: Thiago Padilha <[email protected]> * decode: prometheus: Fix pr 168 summary issue Signed-off-by: Thiago Padilha <[email protected]> Signed-off-by: Thiago Padilha <[email protected]>
Signed-off-by: Phillip Whelan <[email protected]>
Here is a valgrind log of this patch running with fluent-bit 2.0.4:
|
f061751
to
c74ddc7
Compare
@edsiper this is ready for merging and/or review. |
Remove the self-imposed limit of 5 quantile summaries, re #167. This causes a bug when decoding prometheus metrics.