{"action":"opened","issue":{"url":"https://api.github.com/repos/src-d/gitbase/issues/403","repository_url":"https://api.github.com/repos/src-d/gitbase","labels_url":"https://api.github.com/repos/src-d/gitbase/issues/403/labels{/name}","comments_url":"https://api.github.com/repos/src-d/gitbase/issues/403/comments","events_url":"https://api.github.com/repos/src-d/gitbase/issues/403/events","html_url":"https://github.com/src-d/gitbase/issues/403","id":345360569,"node_id":"MDU6SXNzdWUzNDUzNjA1Njk=","number":403,"title":"panic `UAST(    files.blob_content,    'bash',    '//FunctionGroup'  )`","user":{"login":"kuba--","id":4056521,"node_id":"MDQ6VXNlcjQwNTY1MjE=","avatar_url":"https://avatars1.githubusercontent.com/u/4056521?v=4","gravatar_id":"","url":"https://api.github.com/users/kuba--","html_url":"https://github.com/kuba--","followers_url":"https://api.github.com/users/kuba--/followers","following_url":"https://api.github.com/users/kuba--/following{/other_user}","gists_url":"https://api.github.com/users/kuba--/gists{/gist_id}","starred_url":"https://api.github.com/users/kuba--/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuba--/subscriptions","organizations_url":"https://api.github.com/users/kuba--/orgs","repos_url":"https://api.github.com/users/kuba--/repos","events_url":"https://api.github.com/users/kuba--/events{/privacy}","received_events_url":"https://api.github.com/users/kuba--/received_events","type":"User","site_admin":false},"labels":[{"id":445238580,"node_id":"MDU6TGFiZWw0NDUyMzg1ODA=","url":"https://api.github.com/repos/src-d/gitbase/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-27T20:43:20Z","updated_at":"2018-07-27T20:43:20Z","closed_at":null,"author_association":"MEMBER","body":"I don't know if it really makes sense, but because in theory we support `bash` and when list drivers:\r\n`docker exec -it bblfshd bblfshctl driver list` I get:\r\n```\r\n...\r\n| bash       | docker://bblfsh/bash-driver:latest       | dev-f5706ed | beta   | 3 months | alpine | 1.9 | 8.151.12-r0 |\r\n...\r\n```\r\n\r\nbut for my query:\r\n```sql\r\nSELECT files.repository_id, \r\nfiles.file_path,  \r\nUAST(    files.blob_content,    'bash',    '//FunctionGroup'  ) AS functions \r\nFROM files;\r\n```\r\n\r\ngitbase panics with:\r\n```\r\nERRO[0266] mysql_server caught panic:\r\nruntime error: makeslice: cap out of range\r\n/usr/local/opt/go/libexec/src/runtime/panic.go:502 (0x402c058)\r\n\tgopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))\r\n/usr/local/opt/go/libexec/src/runtime/slice.go:58 (0x4041f41)\r\n\tmakeslice: panic(errorString(\"makeslice: cap out of range\"))\r\n/Users/kuba/Workspace/src/github.com/src-d/gitbase/vendor/gopkg.in/bblfsh/client-go.v2/tools/bindings.go:245 (0x47c4d27)\r\n\tcom/src-d/gitbase/vendor/gopkg.in/bblfsh/client-go.v2/tools.getPropertyKeys: keys := make([]string, 0, len(p))\r\n/Users/kuba/Workspace/src/github.com/src-d/gitbase/vendor/gopkg.in/bblfsh/client-go.v2/tools/bindings.go:256 (0x47c4f8a)\r\n\tcom/src-d/gitbase/vendor/gopkg.in/bblfsh/client-go.v2/tools.goGetPropertyKey: keys := getPropertyKeys(ptr)\r\n_cgo_gotypes.go:340 (0x47c3f51)\r\n/usr/local/opt/go/libexec/src/runtime/asm_amd64.s:573 (0x40551aa)\r\n\tcall32: CALLFN(·call32, 32)\r\n/usr/local/opt/go/libexec/src/runtime/cgocall.go:316 (0x400450b)\r\n\tcgocallbackg1: reflectcall(nil, unsafe.Pointer(cb.fn), cb.arg, uint32(cb.argsize), 0)\r\n/usr/local/opt/go/libexec/src/runtime/cgocall.go:194 (0x40042d9)\r\n\tcgocallbackg: cgocallbackg1(ctxt)\r\n/usr/local/opt/go/libexec/src/runtime/asm_amd64.s:826 (0x405677a)\r\n\tcgocallback_gofunc: CALL\truntime·cgocallbackg(SB)\r\n/usr/local/opt/go/libexec/src/runtime/asm_amd64.s:673 (0x4056611)\r\n\tasmcgocall: CALL\tgosave<>(SB)\r\n/usr/local/opt/go/libexec/src/runtime/cgocall.go:131 (0x4004187)\r\n\tcgocall: errno := asmcgocall(fn, arg)\r\n_cgo_gotypes.go:107 (0x47c3859)\r\n/Users/kuba/Workspace/src/github.com/src-d/gitbase/vendor/gopkg.in/bblfsh/client-go.v2/tools/bindings.go:122 (0x47c4a13)\r\n\tcom/src-d/gitbase/vendor/gopkg.in/bblfsh/client-go.v2/tools.Filter: if !C.Filter(ptr, cquery) {\r\n/Users/kuba/Workspace/src/github.com/src-d/gitbase/internal/function/uast.go:213 (0x47c7de7)\r\n\tcom/src-d/gitbase/internal/function.UAST.Eval: nodes, err = tools.Filter(resp.UAST, xpath)\r\n/Users/kuba/Workspace/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/alias.go:27 (0x43bd7de)\r\n\tcom/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Alias).Eval: return e.Child.Eval(ctx, row)\r\n/Users/kuba/Workspace/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/project.go:147 (0x43e10a6)\r\n\tcom/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.filterRow: f, err := expr.Eval(s, row)\r\n/Users/kuba/Workspace/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/project.go:147 (0x43e10a6)\r\n\tcom/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.filterRow: f, err := expr.Eval(s, row)\r\n/Users/kuba/Workspace/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/project.go:133 (0x43e0f22)\r\n\tcom/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*iter).Next: return filterRow(i.ctx, i.p.Projections, childRow)\r\n/Users/kuba/Workspace/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:103 (0x4348a73)\r\n\tcom/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next: row, err := i.iter.Next()\r\n/Users/kuba/Workspace/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/server/handler.go:112 (0x46d8c16)\r\n\tcom/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/server.(*Handler).ComQuery: row, err := rows.Next()\r\n/Users/kuba/Workspace/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v0/mysql/server.go:338 (0x4696eef)\r\n\tcom/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v0/mysql.(*Listener).handle: err := l.handler.ComQuery(c, query, func(qr *sqltypes.Result) error {\r\n/usr/local/opt/go/libexec/src/runtime/asm_amd64.s:2361 (0x4057970)\r\n\tgoexit: BYTE\t$0x90\t// NOP\r\n```"}}
{"actor":{"display_login":"kuba--"}}