Skip to content
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

InfluxDB panic crashes while parsing "-" as Float #5965

Closed
PaoloSaul opened this issue Mar 10, 2016 · 2 comments · Fixed by #6009
Closed

InfluxDB panic crashes while parsing "-" as Float #5965

PaoloSaul opened this issue Mar 10, 2016 · 2 comments · Fixed by #6009
Assignees
Milestone

Comments

@PaoloSaul
Copy link

on version 0.10.0:

Error Output Line:
influxdb/models/points.go:1418

Likely Source of Error:
influxdb/models/points.go:1374

on version 0.10.0

Possible Solution:
check for non-numeric characters and parse those with len() == 1 as zero or something else.

panic: unable to parse number value '-': strconv.ParseFloat: parsing "-": invalid syntax

goroutine 146484 [running]:
github.com/influxdb/influxdb/models.newFieldsFromBinary(0xc381a7a837, 0x7, 0x175c9, 0x4)
/tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/models/points.go:1418 +0x63d
github.com/influxdb/influxdb/models.(_point).unmarshalBinary(0xc320f65710, 0xc2be8602c0)
/tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/models/points.go:1298 +0x3b
github.com/influxdb/influxdb/models.(_point).Fields(0xc320f65710, 0xc2ba0b9dd0)
/tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/models/points.go:1211 +0x41
github.com/influxdb/influxdb/tsdb.(_Shard).validateSeriesAndFields(0xc2b6ab6840, 0xc364fc6000, 0x181c, 0x1e00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/tsdb/shard.go:420 +0xbfc
github.com/influxdb/influxdb/tsdb.(_Shard).WritePoints(0xc2b6ab6840, 0xc364fc6000, 0x181c, 0x1e00, 0x0, 0x0)
/tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/tsdb/shard.go:202 +0xa6
github.com/influxdb/influxdb/tsdb.(*Store).WriteToShard(0xc2080e22c0, 0x5ec40, 0xc364fc6000, 0x181c, 0x1e00, 0x0, 0x0)
/tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/tsdb/store.go:442 +0x14e
github.com/influxdb/influxdb/cluster.func·002(0x5ec40, 0x1, 0xc364fc6000, 0x181c, 0x1e00)

@jwilder jwilder added this to the 0.11.0 milestone Mar 10, 2016
@jwilder
Copy link
Contributor

jwilder commented Mar 10, 2016

Reproduces this via the cli with:

insert cpu value=-

@PaoloSaul
Copy link
Author

If you haven't tested this yet, this also crashes for any non-numeric value in the list of conditions in newFieldsFromBinary, like '.', '+'

@joelegasse joelegasse self-assigned this Mar 14, 2016
joelegasse added a commit that referenced this issue Mar 14, 2016
This should fix #5965, and other issues that result from submitting
malformed numbers with points
joelegasse added a commit that referenced this issue Mar 14, 2016
This should fix #5965, and other issues that result from submitting
malformed numbers with points
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants