| Bug #90546 | [MySQL 8.0 GA Debug Build] Assertion `!thd || thd->locked_tables_mode || !thd->m | ||
|---|---|---|---|
| Submitted: | 21 Apr 2018 3:02 | Modified: | 7 May 2018 16:28 |
| Reporter: | Roel Van de Paar | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Locking | Severity: | S6 (Debug Builds) |
| Version: | 8.0.11 GA | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | debug | ||
[21 Apr 2018 4:53]
MySQL Verification Team
Release server not affected: Your MySQL connection id is 8 Server version: 8.0.12 Source distribution 2018-APR-18 Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 8.0 > DROP DATABASE test; CREATE DATABASE test; USE test; Query OK, 2 rows affected (0,33 sec) Query OK, 1 row affected (0,06 sec) Database changed mysql 8.0 > SET @@autocommit=FALSE; Query OK, 0 rows affected (0,00 sec) mysql 8.0 > CREATE TABLE t(a CHAR (1))ENGINE=InnoDB; Query OK, 0 rows affected (0,37 sec) mysql 8.0 > RESET PERSIST size; ERROR 3615 (HY000): Variable size does not exist in persisted config file mysql 8.0 > SELECT JSON_OBJECTAGG(id,x)FROM t; ERROR 1054 (42S22): Unknown column 'id' in 'field list' mysql 8.0 > RESET SLAVE; Query OK, 0 rows affected (0,00 sec) mysql 8.0 > exit
[21 Apr 2018 4:56]
MySQL Verification Team
Thank you for the bug report. Server version: 8.0.12-debug Source distribution 2018-APR-18 Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 8.0 > DROP DATABASE test; CREATE DATABASE test; USE test; Query OK, 2 rows affected (0,38 sec) Query OK, 1 row affected (0,06 sec) Database changed mysql 8.0 > SET @@autocommit=FALSE; Query OK, 0 rows affected (0,00 sec) mysql 8.0 > CREATE TABLE t(a CHAR (1))ENGINE=InnoDB; Query OK, 0 rows affected (0,41 sec) mysql 8.0 > RESET PERSIST size; ERROR 3615 (HY000): Variable size does not exist in persisted config file mysql 8.0 > SELECT JSON_OBJECTAGG(id,x)FROM t; ERROR 1054 (42S22): Unknown column 'id' in 'field list' mysql 8.0 > RESET SLAVE; ERROR 2013 (HY000): Lost connection to MySQL server during query 2018-04-21T04:54:01.537573Z 0 [System] [MY-010931] [Server] /home/miguel/dbsd/8.0/bin/mysqld: ready for connections. Version: '8.0.12-debug' socket: '/tmp/mysql80.sock' port: 3380 Source distribution 2018-APR-18. mysqld: /home/miguel/buildd/2018APR18/mysql-8.0/sql/sql_reload.cc:187: bool handle_reload_request(THD*, long unsigned int, TABLE_LIST*, int*): Assertion `!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks() || !thd->handler_tables_hash.empty() || thd->mdl_context.has_locks(MDL_key::USER_LEVEL_LOCK) || thd->mdl_context.has_locks(MDL_key::LOCKING_SERVICE) || thd->mdl_context.has_locks(MDL_key::BACKUP_LOCK) || thd->global_read_lock.is_acquired()' failed. 04:54:36 UTC - mysqld got signal 6 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. Attempting to collect some information that could help diagnose the problem. As this is a crash and something is definitely wrong, the information collection process might fail. key_buffer_size=8388608 read_buffer_size=131072 max_used_connections=1 max_threads=151 thread_count=2 connection_count=1 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 67877 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x7f5c24000be0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 7f5cd5a8bd38 thread_stack 0x46000 /home/miguel/dbsd/8.0/bin/mysqld(my_print_stacktrace(unsigned char*, unsigned long)+0x55) [0x411be4d] /home/miguel/dbsd/8.0/bin/mysqld(handle_fatal_signal+0x424) [0x2e53f77] /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7f5ce9d49390] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7f5ce8447428] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f5ce844902a] /lib/x86_64-linux-gnu/libc.so.6(+0x2dbd7) [0x7f5ce843fbd7] /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82) [0x7f5ce843fc82] /home/miguel/dbsd/8.0/bin/mysqld(handle_reload_request(THD*, unsigned long, TABLE_LIST*, int*)+0x49b) [0x2cf7724] /home/miguel/dbsd/8.0/bin/mysqld(mysql_execute_command(THD*, bool)+0x3fcf) [0x2cabe71] /home/miguel/dbsd/8.0/bin/mysqld(mysql_parse(THD*, Parser_state*)+0x65e) [0x2cafbd0] /home/miguel/dbsd/8.0/bin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x13a7) [0x2ca570c] /home/miguel/dbsd/8.0/bin/mysqld(do_command(THD*)+0x484) [0x2ca3fc5] /home/miguel/dbsd/8.0/bin/mysqld() [0x2e4174b] /home/miguel/dbsd/8.0/bin/mysqld() [0x47eef1a] /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7f5ce9d3f6ba] /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f5ce851941d] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (7f5c2425c828): RESET SLAVE Connection ID (thread ID): 8 Status: NOT_KILLED
[7 May 2018 16:28]
Paul DuBois
Posted by developer: Fixed in 8.0.12. For debug builds, RESET PERSIST for an unknown variable could cause an assertion to be raised.

Description: mysqld: /git/mysql-server_dbg/sql/sql_reload.cc:187: bool handle_reload_request(THD*, long unsigned int, TABLE_LIST*, int*): Assertion `!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks() || !thd->handler_tables_hash.empty() || thd->mdl_context.has_locks(MDL_key::USER_LEVEL_LOCK) || thd->mdl_context.has_locks(MDL_key::LOCKING_SERVICE) || thd->mdl_context.has_locks(MDL_key::BACKUP_LOCK) || thd->global_read_lock.is_acquired()' failed. 03:01:20 UTC - mysqld got signal 6 ; (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 #1 0x0000561ea265d4a5 in my_write_core (sig=6) at /git/mysql-server_dbg/mysys/stacktrace.cc:278 #2 0x0000561ea13e418c in handle_fatal_signal (sig=6) at /git/mysql-server_dbg/sql/signal_handler.cc:249 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #5 0x00007f0e50798801 in __GI_abort () at abort.c:79 #6 0x00007f0e5078839a in __assert_fail_base (fmt=0x7f0e5090f7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x561ea3685b28 "!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks() || !thd->handler_tables_hash.empty() || thd->mdl_context.has_locks(MDL_key::USER_LEVEL_LOCK) || thd->mdl_context.has_locks(MDL_key::LOC"..., file=file@entry=0x561ea3685ae0 "/git/mysql-server_dbg/sql/sql_reload.cc", line=line@entry=187, function=function@entry=0x561ea3685ca0 <handle_reload_request(THD*, unsigned long, TABLE_LIST*, int*)::__PRETTY_FUNCTION__> "bool handle_reload_request(THD*, long unsigned int, TABLE_LIST*, int*)") at assert.c:92 #7 0x00007f0e50788412 in __GI___assert_fail ( assertion=0x561ea3685b28 "!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks() || !thd->handler_tables_hash.empty() || thd->mdl_context.has_locks(MDL_key::USER_LEVEL_LOCK) || thd->mdl_context.has_locks(MDL_key::LOC"..., file=0x561ea3685ae0 "/git/mysql-server_dbg/sql/sql_reload.cc", line=187, function=0x561ea3685ca0 <handle_reload_request(THD*, unsigned long, TABLE_LIST*, int*)::__PRETTY_FUNCTION__> "bool handle_reload_request(THD*, long unsigned int, TABLE_LIST*, int*)") at assert.c:101 #8 0x0000561ea128e9d0 in handle_reload_request (thd=0x7f0e22854000, options=64, tables=0x0, write_to_binlog=0x7f0e507551f0) at /git/mysql-server_dbg/sql/sql_reload.cc:181 #9 0x0000561ea1243e77 in mysql_execute_command (thd=0x7f0e22854000, first_level=true) at /git/mysql-server_dbg/sql/sql_parse.cc:3716 #10 0x0000561ea1247bb2 in mysql_parse (thd=0x7f0e22854000, parser_state=0x7f0e50756330) at /git/mysql-server_dbg/sql/sql_parse.cc:4935 #11 0x0000561ea123d713 in dispatch_command (thd=0x7f0e22854000, com_data=0x7f0e50756c90, command=COM_QUERY) at /git/mysql-server_dbg/sql/sql_parse.cc:1589 #12 0x0000561ea123bfee in do_command (thd=0x7f0e22854000) at /git/mysql-server_dbg/sql/sql_parse.cc:1214 #13 0x0000561ea13d1a70 in handle_connection (arg=0x7f0e05070420) at /git/mysql-server_dbg/sql/conn_handler/connection_handler_per_thread.cc:308 #14 0x0000561ea2cf1cf8 in pfs_spawn_thread (arg=0x7f0e443e7820) at /git/mysql-server_dbg/storage/perfschema/pfs.cc:2814 #15 0x00007f0e521826db in start_thread (arg=0x7f0e50757700) at pthread_create.c:463 #16 0x00007f0e5087988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 How to repeat: DROP DATABASE test; CREATE DATABASE test; USE test; SET @@autocommit=FALSE; CREATE TABLE t(a CHAR (1))ENGINE=InnoDB; RESET PERSIST size; SELECT JSON_OBJECTAGG(id,x)FROM t; RESET SLAVE;