Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

panic in group by #481

Closed
jfontan opened this issue Oct 19, 2018 · 1 comment
Closed

panic in group by #481

jfontan opened this issue Oct 19, 2018 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jfontan
Copy link
Contributor

jfontan commented Oct 19, 2018

gitbase commit: cffce77ec6b225f3d05390b979138200ee238d1c
go-mysql-server commit: 8796d13

Query:

select commit_author_when, count(commit_files.file_path)
from commits
  natural join commit_files
  natural join ref_commits
where ref_commits.ref_name="master"  limit 1;

Panic:

DEBU[0182] executing query                               query="select commit_author_when, count(commit_files.file_path) from commits natural join commit_files natural join ref_commits where ref_commits.ref_name=\"master\"  limit 1"
INFO[0184] ConnectionClosed: client 1                   
ERROR: logging before flag.Parse: E1019 15:45:19.413315   25829 server.go:237] mysql_server caught panic:
runtime error: index out of range
/usr/lib/go/src/runtime/panic.go:513 (0x42f898)
	gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/usr/lib/go/src/runtime/panic.go:44 (0x42e6d9)
	panicindex: panic(indexError)
/home/jfontan/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/group_by.go:397 (0x8d05fa)
	com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.evalBuffer: return buffer[0], nil
/home/jfontan/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/group_by.go:376 (0x8d0205)
	com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.evalBuffers: val, err := evalBuffer(ctx, agg, buffers[i])
/home/jfontan/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/group_by.go:212 (0x8cee20)
	com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*groupByIter).Next: return evalBuffers(i.ctx, i.buf, i.aggregate)
/home/jfontan/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:228 (0x7a045c)
	com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next: row, err := i.iter.Next()
/home/jfontan/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/limit.go:79 (0x8d34c4)
	com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*limitIter).Next: childRow, err := li.childIter.Next()
/home/jfontan/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:228 (0x7a045c)
	com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next: row, err := i.iter.Next()
/home/jfontan/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/process.go:145 (0x8d6086)
	com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*trackedRowIter).Next: row, err := i.iter.Next()
/home/jfontan/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/server/handler.go:111 (0xc7344c)
	com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/server.(*Handler).ComQuery: row, err := rows.Next()
/home/jfontan/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql/server.go:417 (0xba83bb)
	com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql.(*Listener).handle: err := l.handler.ComQuery(c, query, func(qr *sqltypes.Result) error {
/usr/lib/go/src/runtime/asm_amd64.s:1333 (0x45ccc0)
	goexit: BYTE	$0x90	// NOP

Repositories:

gopkg.in/src-d/core-retrieval.v0
gopkg.in/src-d/framework.v0
gopkg.in/src-d/go-billy-siva.v4
gopkg.in/src-d/go-billy.v4
gopkg.in/src-d/go-cli.v0
gopkg.in/src-d/go-errors.v0
gopkg.in/src-d/go-errors.v1
gopkg.in/src-d/go-git-fixtures.v3
gopkg.in/src-d/go-git.v4
gopkg.in/src-d/go-kallax.v1
gopkg.in/src-d/go-log.v0
gopkg.in/src-d/go-log.v1
gopkg.in/src-d/go-mysql-server.v0
gopkg.in/src-d/go-parse-utils.v1
gopkg.in/src-d/go-queue.v1
gopkg.in/src-d/go-siva.v1
gopkg.in/src-d/go-vitess.v0
gopkg.in/src-d/go-vitess.v1
gopkg.in/src-d/regression-core.v0
@jfontan jfontan added the bug Something isn't working label Oct 19, 2018
@kuba-- kuba-- self-assigned this Oct 22, 2018
@kuba--
Copy link
Contributor

kuba-- commented Oct 22, 2018

It's also reproducible on the current master (042dd2ce) with pga repos:
pga list -l python -f json | head -n 10 | jq -r '.sivaFilenames[]' | pga get -i -o repos

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants