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

vtgate panic kills connection when selecting database() when using OLAP workload #6200

Closed
aquarapid opened this issue May 19, 2020 · 1 comment
Milestone

Comments

@aquarapid
Copy link
Contributor

Scenario:

  • Connect to vtgate
  • set workload=olap;
  • select database()

Result:

mysql> set workload=olap;
Query OK, 0 rows affected (0.00 sec)

mysql> select database();
ERROR 2013 (HY000): Lost connection to MySQL server during query

In vtgate logs:

E0519 12:57:51.181414  160083 server.go:277] mysql_server caught panic:
runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:212 (0x44d079)
        panicmem: panic(memoryError)
/usr/local/go/src/runtime/signal_unix.go:695 (0x44cec8)
        sigpanic: panicmem()
/home/jacques/go/src/vitess.io/vitess/go/vt/vtgate/evalengine/expressions.go:201 (0x7bd535)
        io/vitess/go/vt/vtgate/evalengine.(*BindVariable).Type: return e[b.Key].Type
/home/jacques/go/src/vitess.io/vitess/go/vt/vtgate/engine/projection.go:102 (0xb380a9)
        io/vitess/go/vt/vtgate/engine.(*Projection).addFields: Type: p.Exprs[i].Type(env),
/home/jacques/go/src/vitess.io/vitess/go/vt/vtgate/engine/projection.go:70 (0xb37ed8)
        io/vitess/go/vt/vtgate/engine.(*Projection).StreamExecute: p.addFields(result, bindVars)
/home/jacques/go/src/vitess.io/vitess/go/vt/vtgate/executor.go:1112 (0xb8ac26)
        io/vitess/go/vt/vtgate.(*Executor).StreamExecute: err = plan.Instructions.StreamExecute(vcursor, bindVars, true, func(qr *sqltypes.Result) error {
/home/jacques/go/src/vitess.io/vitess/go/vt/vtgate/vtgate.go:322 (0xba7591)
        io/vitess/go/vt/vtgate.(*VTGate).StreamExecute: err = vtg.executor.StreamExecute(
/home/jacques/go/src/vitess.io/vitess/go/vt/vtgate/plugin_mysql_server.go:208 (0xb93499)
        io/vitess/go/vt/vtgate.(*vtgateHandler).ComQuery: err := vh.vtg.StreamExecute(ctx, session, query, make(map[string]*querypb.BindVariable), callback)
/home/jacques/go/src/vitess.io/vitess/go/mysql/conn.go:1135 (0x8764b7)
        io/vitess/go/mysql.(*Conn).execQuery: err := handler.ComQuery(c, query, func(qr *sqltypes.Result) error {
/home/jacques/go/src/vitess.io/vitess/go/mysql/conn.go:818 (0x8974f2)
        io/vitess/go/mysql.(*Conn).handleNextCommand.func1: if err := c.execQuery(sql, handler, more); err != nil {
/home/jacques/go/src/vitess.io/vitess/go/mysql/conn.go:826 (0x8761ff)
        io/vitess/go/mysql.(*Conn).handleNextCommand: }()
/home/jacques/go/src/vitess.io/vitess/go/mysql/server.go:469 (0x892266)
        io/vitess/go/mysql.(*Listener).handle: err := c.handleNextCommand(l.handler)
/usr/local/go/src/runtime/asm_amd64.s:1373 (0x469100)
        goexit: BYTE    $0x90   // NOP

This is against a recent copy of master: 17dd6c6

adsr added a commit to adsr/vitess that referenced this issue May 20, 2020
Signed-off-by: Adam Saponara <as@php.net>
harshit-gangal added a commit that referenced this issue May 20, 2020
Fix panic with `select database()` in OLAP mode (#6200)
@harshit-gangal
Copy link
Member

Fixed by #6205

@deepthi deepthi added this to the v7.0 milestone Jun 15, 2020
deepthi pushed a commit to planetscale/vitess that referenced this issue Jun 16, 2020
Signed-off-by: Adam Saponara <as@php.net>
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

3 participants