Carbon-Cache accepts metrics with invalid names
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Graphite |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
No attempt is made to validate that the metric name does not contain nulls or other characters no accepted by the os.path module's various functions. This results in an uncaught exception in the writer thread when attempting to flush metrics from cache to disk.
14/08/2012 09:52:02 :: Sorted 1012 cache queues in 0.000527 seconds
14/08/2012 09:52:02 :: Unhandled Error
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/local/
result = context.call(ctx, function, *args, **kwargs)
File "/usr/local/
return self.currentCon
File "/usr/local/
return func(*args,**kw)
--- <exception caught here> ---
File "/opt/graphite/
writeCached
File "/opt/graphite/
for (metric, datapoints, dbFilePath, dbFileExists) in optimalWriteOrd
File "/opt/graphite/
dbFileExists = exists(dbFilePath)
File "/usr/lib/
os.stat(path)
exceptions.
To resolve this issue it would be appropriate to catch these bogus metric names in the writer thread and raise a log event AND to pop the metrics from the cache to prevent a situation where bad metrics/datapoints fill the cache but are unable to be flushed or otherwise removed.
Changed in graphite: | |
status: | New → Won't Fix |
To reproduce send a metric with an embedded nulll character in the metric name to the tcp linereceiver.