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

Prisma test harness fails due to a bounds check failure #8026

Closed
mcronce opened this issue May 3, 2021 · 0 comments · Fixed by #8033
Closed

Prisma test harness fails due to a bounds check failure #8026

mcronce opened this issue May 3, 2021 · 0 comments · Fixed by #8033
Assignees

Comments

@mcronce
Copy link

mcronce commented May 3, 2021

Overview of the Issue

Right now, the Prisma framework test is failing (after applying the fix in planetscale/vitess-framework-testing#149); vttestserver produces the following stack traces:

E0430 18:46:33.141775     740 tabletserver.go:1277] Uncaught panic for Sql: "create table invalid_enum_value_name (\n\tfield1 int(11) not null auto_increment,\n\there_be_enum enum('Y', 'N', '123', '$\xa7!') default null,\n\tPRIMARY KEY (field1)\n) ENGINE InnoDB,\n  CHARSET latin1", BindVars: {}:
runtime error: index out of range [65533] with length 256
/usr/local/go/src/runtime/panic.go:88 (0x435004)
/vt/src/vitess.io/vitess/go/sqltypes/value.go:454 (0xa2bd90)
/vt/src/vitess.io/vitess/go/sqltypes/value.go:467 (0xa9daab)
/vt/src/vitess.io/vitess/go/vt/sqlparser/ast_funcs.go:1338 (0xa9da7d)
sql.y:1304 (0xaf69af)
/vt/src/vitess.io/vitess/go/vt/sqlparser/parser.go:57 (0xae632f)
/vt/src/vitess.io/vitess/go/vt/sqlparser/parser.go:79 (0xae6434)
/vt/src/vitess.io/vitess/go/vt/sqlparser/parser.go:98 (0x1200958)
/vt/src/vitess.io/vitess/go/vt/vttablet/tabletserver/query_engine.go:305 (0x120093a)
/vt/src/vitess.io/vitess/go/vt/vttablet/tabletserver/tabletserver.go:716 (0x1237b86)
/vt/src/vitess.io/vitess/go/vt/vttablet/tabletserver/tabletserver.go:1259 (0x121cc0e)
/vt/src/vitess.io/vitess/go/vt/vttablet/tabletserver/tabletserver.go:707 (0x12197a8)
/vt/src/vitess.io/vitess/go/vt/vtcombo/tablet_map.go:406 (0x1268221)
/vt/src/vitess.io/vitess/go/vt/vttablet/queryservice/wrapped.go:185 (0xd6cefb)
/vt/src/vitess.io/vitess/go/vt/vtgate/tabletgateway.go:269 (0x1e87b2d)
/vt/src/vitess.io/vitess/go/vt/vttablet/queryservice/wrapped.go:183 (0xd6ab49)
/vt/src/vitess.io/vitess/go/vt/vtgate/scatter_conn.go:255 (0x1e9e1ac)
/vt/src/vitess.io/vitess/go/vt/vtgate/scatter_conn.go:589 (0x1ea0168)
/vt/src/vitess.io/vitess/go/vt/vtgate/scatter_conn.go:609 (0x1e845cc)
/vt/src/vitess.io/vitess/go/vt/vtgate/scatter_conn.go:190 (0x1e82ed3)
/vt/src/vitess.io/vitess/go/vt/vtgate/executor.go:1475 (0x1e75204)
/vt/src/vitess.io/vitess/go/vt/vtgate/vcursor_impl.go:401 (0x1e8db5c)
/vt/src/vitess.io/vitess/go/vt/vtgate/engine/send.go:115 (0x109ce8b)
/vt/src/vitess.io/vitess/go/vt/vtgate/engine/ddl.go:108 (0x107cf54)
/vt/src/vitess.io/vitess/go/vt/vtgate/plan_execute.go:178 (0x1e9c77a)
/vt/src/vitess.io/vitess/go/vt/vtgate/plan_execute.go:123 (0x1e780be)
/vt/src/vitess.io/vitess/go/vt/vtgate/executor.go:186 (0x1e6735a)
/vt/src/vitess.io/vitess/go/vt/vtgate/executor.go:150 (0x1e66f04)
/vt/src/vitess.io/vitess/go/vt/vtgate/vtgate.go:289 (0x1e97617)
/vt/src/vitess.io/vitess/go/vt/vtgate/plugin_mysql_server.go:220 (0x1e79f65)
/vt/src/vitess.io/vitess/go/mysql/conn.go:1250 (0xd1836b)
/vt/src/vitess.io/vitess/go/mysql/conn.go:1235 (0xd17f35)
/vt/src/vitess.io/vitess/go/mysql/conn.go:874 (0xd14ec7)
/vt/src/vitess.io/vitess/go/mysql/server.go:495 (0xd3af31)
/vt/src/vitess.io/vitess/go/mysql/server.go:286 (0xd41984)
/usr/local/go/src/runtime/asm_amd64.s:1374 (0x4705a0)
E0430 18:46:33.142062     740 server.go:303] mysql_server caught panic:
runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:212 (0x44e2f2)
/usr/local/go/src/runtime/signal_unix.go:742 (0x44e172)
/vt/src/vitess.io/vitess/go/sqltypes/result.go:241 (0x1e9e2d4)
/vt/src/vitess.io/vitess/go/vt/vtgate/scatter_conn.go:294 (0x1e9e2c6)
/vt/src/vitess.io/vitess/go/vt/vtgate/scatter_conn.go:589 (0x1ea0168)
/vt/src/vitess.io/vitess/go/vt/vtgate/scatter_conn.go:609 (0x1e845cc)
/vt/src/vitess.io/vitess/go/vt/vtgate/scatter_conn.go:190 (0x1e82ed3)
/vt/src/vitess.io/vitess/go/vt/vtgate/executor.go:1475 (0x1e75204)
/vt/src/vitess.io/vitess/go/vt/vtgate/vcursor_impl.go:401 (0x1e8db5c)
/vt/src/vitess.io/vitess/go/vt/vtgate/engine/send.go:115 (0x109ce8b)
/vt/src/vitess.io/vitess/go/vt/vtgate/engine/ddl.go:108 (0x107cf54)
/vt/src/vitess.io/vitess/go/vt/vtgate/plan_execute.go:178 (0x1e9c77a)
/vt/src/vitess.io/vitess/go/vt/vtgate/plan_execute.go:123 (0x1e780be)
/vt/src/vitess.io/vitess/go/vt/vtgate/executor.go:186 (0x1e6735a)
/vt/src/vitess.io/vitess/go/vt/vtgate/executor.go:150 (0x1e66f04)
/vt/src/vitess.io/vitess/go/vt/vtgate/vtgate.go:289 (0x1e97617)
/vt/src/vitess.io/vitess/go/vt/vtgate/plugin_mysql_server.go:220 (0x1e79f65)
/vt/src/vitess.io/vitess/go/mysql/conn.go:1250 (0xd1836b)
/vt/src/vitess.io/vitess/go/mysql/conn.go:1235 (0xd17f35)
/vt/src/vitess.io/vitess/go/mysql/conn.go:874 (0xd14ec7)
/vt/src/vitess.io/vitess/go/mysql/server.go:495 (0xd3af31)
/vt/src/vitess.io/vitess/go/mysql/server.go:286 (0xd41984)
/usr/local/go/src/runtime/asm_amd64.s:1374 (0x4705a0)

After unwinding history for a while, it appears to have been broken in #7655; checking out de902e5d62 produces the same failure and similar stack traces, but the previous merge to master (ffb5d4d for #7670) does not.

Reproduction Steps

        CREATE TABLE `column_name_that_becomes_empty_string` (
          `field1` int(11) NOT NULL AUTO_INCREMENT,
          `12345` int(11) DEFAULT NULL,
          PRIMARY KEY (`field1`)
        ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

        CREATE TABLE `invalid_enum_value_name` (
          `field1` int(11) NOT NULL AUTO_INCREMENT,
          `here_be_enum` enum('Y','N','123','$§!') DEFAULT NULL,
          PRIMARY KEY (`field1`)
        ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Yes, it does actually require both CREATE TABLE statements. I cannot begin to guess why :)

If you want to try the full Prisma test suite and planetscale/vitess-framework-testing#149 hasn't been merged, the following will build and run the test harness from that branch:

git clone -b prisma-fixes https://github.com/planetscale/vitess-framework-testing.git
cd vitess-framework-testing
# Set VT_HOST, VT_PORT, VT_USERNAME, VT_PASSWORD, VT_DATABASE, VT_NUM_SHARDS, and VT_DIALECT for your environment.  I'm using VT_NUM_SHARDS=1 and VT_DIALECT=mysql57
./run.sh build_image javascript/prisma
./run.sh run_test javascript/prisma

Binary version

$ vtcombo --version
ERROR: logging before flag.Parse: E0503 17:41:25.805074     790 syslogger.go:149] can't connect to syslog
Version: 11.0.0-SNAPSHOT (Git revision 97e5963deb branch 'master') built on Mon May  3 17:35:38 UTC 2021 by vitess@09d48e4773a3 using go1.15.6 linux/amd64

Operating system and Environment details

On the host:

mc@mc-thinkpad vitess]$ cat /etc/os-release 
NAME="Manjaro Linux"
ID=manjaro
ID_LIKE=arch
BUILD_ID=rolling
PRETTY_NAME="Manjaro Linux"
ANSI_COLOR="32;1;24;144;200"
HOME_URL="https://manjaro.org/"
DOCUMENTATION_URL="https://wiki.manjaro.org/"
SUPPORT_URL="https://manjaro.org/"
BUG_REPORT_URL="https://bugs.manjaro.org/"
LOGO=manjarolinux
[mc@mc-thinkpad vitess]$ uname -sr
Linux 5.10.30-1-MANJARO
[mc@mc-thinkpad vitess]$ uname -m
x86_64

In the vttestserver container:

vitess@1f1ecb6b6ac8:/$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
vitess@1f1ecb6b6ac8:/$ uname -sr
Linux 5.10.30-1-MANJARO
vitess@1f1ecb6b6ac8:/$ uname -m
x86_64

Log Fragments

Just the stack traces, already pasted above

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

Successfully merging a pull request may close this issue.

2 participants