-
Notifications
You must be signed in to change notification settings - Fork 107
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
carbon.relay.* metrics get corrupted if a file cluster has a too long path (yes really) #159
Comments
errr yeah this is stupid. |
grobian
added a commit
that referenced
this issue
Mar 15, 2016
This commit fixes two aspects of issue #159. The first strncpy doesn't overrun the buffer, but doesn't add trailing \0 either. This caused the "corrupted" metrics, because garbage was read, so use plain snprintf instead to avoid that. Second, 32 bytes (as originally intended for IPv4 address) is a bit short, and insufficient for IPv6 addresses or paths, so enlarge the buffer size so most paths will fit.
Thanks for the quick fix!
|
Just to be sure, those xxxxx things are what you expect to see right? Given your config the xxxxx-es shouldn't be there... |
Yeah those x's are as expected. Its my quick & dirty attempt to create a looooooong path. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With v1.10 (and v1.8):
Use this config:
Please observe the unused file cluster and a silly long name. Note the length of the path.
Start with
./relay -f ./bla.conf -p 2003 -S 5 -H HOST
. Check the metrics send to the upstream cluster and find these:Now add a character to the file cluster path name:
The file cluster is still unused.
Start the relay with the same parameters. Check the metrics stream and now you'll find these:
See the dots are translated into underscores? That's the issue.
Bonus: the metrics stream now also contains monsters like these:
Smells like a bufferoverflow or one-off?
The text was updated successfully, but these errors were encountered: