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

[0.9.4] submitting empty write payload causes panic with index out of range #4764

Closed
newtoncorp opened this issue Nov 12, 2015 · 1 comment
Closed

Comments

@newtoncorp
Copy link

Similar to #4735 different stack trace, in a write query.

2015/11/12 16:39:56 http: panic serving 10.42.5.20:53319: runtime error: index out of range
goroutine 42218 [running]:
net/http.(*conn).serve.func1(0xc8200d3b80, 0x7f9c0a722f30, 0xc820020e10)
        /home/philip/.gvm/gos/go1.5/src/net/http/server.go:1287 +0xb5
github.com/influxdb/influxdb/services/httpd.(*Handler).serveWriteLine(0xc82007d280, 0x7f9c0a7496f0, 0xc82013aca0, 0xc8205228c0, 0xc820111c00, 0x1, 0x200, 0x0)
        /tmp/build/src/github.com/influxdb/influxdb/services/httpd/handler.go:458 +0x1384
github.com/influxdb/influxdb/services/httpd.(*Handler).serveWrite(0xc82007d280, 0x7f9c0a7496f0, 0xc82013aca0, 0xc8205228c0, 0x0)
        /tmp/build/src/github.com/influxdb/influxdb/services/httpd/handler.go:376 +0x79c
github.com/influxdb/influxdb/services/httpd.(*Handler).(github.com/influxdb/influxdb/services/httpd.serveWrite)-fm(0x7f9c0a7496f0, 0xc82013aca0, 0xc8205228c0, 0x0)
        /tmp/build/src/github.com/influxdb/influxdb/services/httpd/handler.go:106 +0x48
github.com/influxdb/influxdb/services/httpd.authenticate.func1(0x7f9c0a7496f0, 0xc82013aca0, 0xc8205228c0)
        /tmp/build/src/github.com/influxdb/influxdb/services/httpd/handler.go:673 +0x70
net/http.HandlerFunc.ServeHTTP(0xc820131c20, 0x7f9c0a7496f0, 0xc82013aca0, 0xc8205228c0)
        /home/philip/.gvm/gos/go1.5/src/net/http/server.go:1422 +0x3a
github.com/influxdb/influxdb/services/httpd.gzipFilter.func1(0x7f9c0a749618, 0xc82013ac20, 0xc8205228c0)
        /tmp/build/src/github.com/influxdb/influxdb/services/httpd/handler.go:734 +0x2af
net/http.HandlerFunc.ServeHTTP(0xc820131c40, 0x7f9c0a749618, 0xc82013ac20, 0xc8205228c0)
        /home/philip/.gvm/gos/go1.5/src/net/http/server.go:1422 +0x3a
github.com/influxdb/influxdb/services/httpd.versionHeader.func1(0x7f9c0a749618, 0xc82013ac20, 0xc8205228c0)
        /tmp/build/src/github.com/influxdb/influxdb/services/httpd/handler.go:743 +0xc0
net/http.HandlerFunc.ServeHTTP(0xc820131c60, 0x7f9c0a749618, 0xc82013ac20, 0xc8205228c0)
        /home/philip/.gvm/gos/go1.5/src/net/http/server.go:1422 +0x3a
github.com/influxdb/influxdb/services/httpd.cors.func1(0x7f9c0a749618, 0xc82013ac20, 0xc8205228c0)
        /tmp/build/src/github.com/influxdb/influxdb/services/httpd/handler.go:776 +0x328
net/http.HandlerFunc.ServeHTTP(0xc820131c80, 0x7f9c0a749618, 0xc82013ac20, 0xc8205228c0)
        /home/philip/.gvm/gos/go1.5/src/net/http/server.go:1422 +0x3a
github.com/influxdb/influxdb/services/httpd.requestID.func1(0x7f9c0a749618, 0xc82013ac20, 0xc8205228c0)
        /tmp/build/src/github.com/influxdb/influxdb/services/httpd/handler.go:786 +0x15d
net/http.HandlerFunc.ServeHTTP(0xc820131ca0, 0x7f9c0a749618, 0xc82013ac20, 0xc8205228c0)
        /home/philip/.gvm/gos/go1.5/src/net/http/server.go:1422 +0x3a
github.com/influxdb/influxdb/services/httpd.logging.func1(0x7f9c0a749618, 0xc82013ab80, 0xc8205228c0)
        /tmp/build/src/github.com/influxdb/influxdb/services/httpd/handler.go:794 +0x10b
net/http.HandlerFunc.ServeHTTP(0xc820131cc0, 0x7f9c0a749618, 0xc82013ab80, 0xc8205228c0)
        /home/philip/.gvm/gos/go1.5/src/net/http/server.go:1422 +0x3a
github.com/influxdb/influxdb/services/httpd.recovery.func1(0x7f9c0a7495e0, 0xc8200ba160, 0xc8205228c0)
        /tmp/build/src/github.com/influxdb/influxdb/services/httpd/handler.go:804 +0x114
net/http.HandlerFunc.ServeHTTP(0xc820131ce0, 0x7f9c0a7495e0, 0xc8200ba160, 0xc8205228c0)
        /home/philip/.gvm/gos/go1.5/src/net/http/server.go:1422 +0x3a
github.com/bmizerany/pat.(*PatternServeMux).ServeHTTP(0xc820020110, 0x7f9c0a7495e0, 0xc8200ba160, 0xc8205228c0)
        /tmp/build/src/github.com/bmizerany/pat/mux.go:109 +0x244
github.com/influxdb/influxdb/services/httpd.(*Handler).ServeHTTP(0xc82007d280, 0x7f9c0a7495e0, 0xc8200ba160, 0xc8205228c0)
        /tmp/build/src/github.com/influxdb/influxdb/services/httpd/handler.go:172 +0x357
net/http.serverHandler.ServeHTTP(0xc82017e5a0, 0x7f9c0a7495e0, 0xc8200ba160, 0xc8205228c0)
        /home/philip/.gvm/gos/go1.5/src/net/http/server.go:1862 +0x19e
net/http.(*conn).serve(0xc8200d3b80)
        /home/philip/.gvm/gos/go1.5/src/net/http/server.go:1361 +0xbee
created by net/http.(*Server).Serve
        /home/philip/.gvm/gos/go1.5/src/net/http/server.go:1910 +0x3f6

Reproduced 100% by writing an empty array of points with the python influxdb client

from influxdb import InfluxDBClient
client = InfluxDBClient("xxx", 8086, "xxx", "xxx", "xxx")
influx_client.write_points([])
@oiooj
Copy link
Contributor

oiooj commented Nov 12, 2015

Already fixed in 0.9.5 #4625

@beckettsean beckettsean changed the title panic with index out of range [0.9.4] submitting empty write payload causes panic with index out of range Dec 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants