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

RC30: panic: runtime error: index out of range when insert data points #2596

Closed
fffw opened this issue May 18, 2015 · 3 comments
Closed

RC30: panic: runtime error: index out of range when insert data points #2596

fffw opened this issue May 18, 2015 · 3 comments
Milestone

Comments

@fffw
Copy link

fffw commented May 18, 2015

I installed it on Mac through brew install influxdb -devel which should be https://github.com/influxdb/influxdb/archive/v0.9.0-rc30.tar.gz

Server panics after tens of writes when I trying the example code of https://github.com/influxdb/influxdb/tree/master/client, code snippet as below:

    bps := client.BatchPoints{
        Points:          pts,
        Database:        MyDB,
        RetentionPolicy: "default",
    }
    start := time.Now()
    _, err := con.Write(bps)
    if err != nil {
        log.Fatalf("Write error: %s", err)
    }

Detailed stack trace.

panic: runtime error: index out of range

goroutine 4289671 [running]:
github.com/influxdb/influxdb.(*tx).CreateMapReduceJobs(0xc216574f80, 0xc2081720c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /private/tmp/influxdb20150517-58288-163h5v1/influxdb-0.9.0-rc30/src/github.com/influxdb/influxdb/tx.go:98 +0x2f86
github.com/influxdb/influxdb/influxql.(*Planner).Plan(0xc20c0cf140, 0xc2081720c0, 0x2710, 0x1, 0x0, 0x0)
    /private/tmp/influxdb20150517-58288-163h5v1/influxdb-0.9.0-rc30/src/github.com/influxdb/influxdb/influxql/engine.go:716 +0x319
github.com/influxdb/influxdb.(*Server).planSelectStatement(0xc208068300, 0xc2081720c0, 0x2710, 0x0, 0x0, 0x0)
    /private/tmp/influxdb20150517-58288-163h5v1/influxdb-0.9.0-rc30/src/github.com/influxdb/influxdb/server.go:2481 +0x14a
github.com/influxdb/influxdb.(*Server).executeSelectStatement(0xc208068300, 0x0, 0xc2081720c0, 0xc216574e8e, 0x5, 0x0, 0xc20832f3e0, 0x2710, 0x0, 0x0)
    /private/tmp/influxdb20150517-58288-163h5v1/influxdb-0.9.0-rc30/src/github.com/influxdb/influxdb/server.go:2308 +0xba
github.com/influxdb/influxdb.func·040()
    /private/tmp/influxdb20150517-58288-163h5v1/influxdb-0.9.0-rc30/src/github.com/influxdb/influxdb/server.go:2212 +0xae3
created by github.com/influxdb/influxdb.(*Server).ExecuteQuery
    /private/tmp/influxdb20150517-58288-163h5v1/influxdb-0.9.0-rc30/src/github.com/influxdb/influxdb/server.go:2294 +0x314
@toddboom
Copy link
Contributor

@fffw this looks like it was trying to run a query - were you issuing queries against the database at the same time? if so, can you send the query that caused this?

@fffw
Copy link
Author

fffw commented May 19, 2015

@toddboom Below are match lines in .influx_history and influxd logs before it panics. If it's a query that triggers the panic, it should be that stupid count().

select * from sonar
select count(loadTime) from sonar
select count() from sonar <---
[http] 2015/05/18 15:14:20 127.0.0.1 - - [18/May/2015:15:14:20 +0800] GET /query?db=sonar&q=select+%2A+from+sonar HTTP/1.1 200 4797 - InfluxDBShell/0.9 80cf7467-fd2d-11e4-ad2b-000000000000 9.845558ms
[http] 2015/05/18 15:14:20 127.0.0.1 - - [18/May/2015:15:14:19 +0800] POST /write HTTP/1.1 204 0 - InfluxDBClient 805ec76d-fd2d-11e4-ad29-000000000000 901.29124ms
[8 recurrence ommited]
[http] 2015/05/18 15:14:28 127.0.0.1 - - [18/May/2015:15:14:28 +0800] GET /query?db=sonar&q=select+count%28loadTime%29+from+sonar HTTP/1.1 200 115 - InfluxDBShell/0.9 855ef6f1-fd2d-11e4-ad3d-000000000000 1.72ms
[http] 2015/05/18 15:14:28 127.0.0.1 - - [18/May/2015:15:14:28 +0800] POST /write HTTP/1.1 204 0 - InfluxDBClient 8558dc51-fd2d-11e4-ad3c-000000000000 785.694223ms
[9 recurrence ommited]
[http] 2015/05/18 15:14:37 127.0.0.1 - - [18/May/2015:15:14:37 +0800] POST /write HTTP/1.1 204 0 - InfluxDBClient 8ab916c0-fd2d-11e4-ad50-000000000000 768.236115ms
panic: runtime error: index out of range

goroutine 4289671 [running]:

@corylanou corylanou mentioned this issue May 19, 2015
4 tasks
@beckettsean beckettsean added this to the 0.9.0 milestone May 19, 2015
@corylanou
Copy link
Contributor

Fixed by #2606

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

No branches or pull requests

4 participants