Bug #90525 [MySQL 8.0 GA Debug Build] Assertion `!is_set()' failed.
Submitted: 20 Apr 2018 8:33 Modified: 13 Aug 2018 8:02
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DML Severity:S6 (Debug Builds)
Version:8.0.11 GA OS:Any
Assigned to: CPU Architecture:Any
Tags: debug

[20 Apr 2018 8:33] Roel Van de Paar
Description:
2018-04-20T08:30:31.503268Z 0 [System] [MY-010931] [Server] /sda/MS200418-mysql-8.0.11-linux-x86_64-debug/bin/mysqld: ready for connections. Version: '8.0.11-debug'  socket: '/sda/MS200418-mysql-8.0.11-linux-x86_64-debug/socket.sock'  port: 12465  MySQL Community Server (GPL).
mysqld: /git/mysql-server_dbg/sql/sql_error.cc:379: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set()' failed.
08:30:35 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  0x000055a7d81d64a5 in my_write_core (sig=6) at /git/mysql-server_dbg/mysys/stacktrace.cc:278
#2  0x000055a7d6f5d18c 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  0x00007fd556fc8801 in __GI_abort () at abort.c:79
#6  0x00007fd556fb839a in __assert_fail_base (fmt=0x7fd55713f7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x55a7d91d9c20 "!is_set()", file=file@entry=0x55a7d91d9a50 "/git/mysql-server_dbg/sql/sql_error.cc", 
    line=line@entry=379, 
    function=function@entry=0x55a7d91d9fa0 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:92
#7  0x00007fd556fb8412 in __GI___assert_fail (assertion=0x55a7d91d9c20 "!is_set()", 
    file=0x55a7d91d9a50 "/git/mysql-server_dbg/sql/sql_error.cc", line=379, 
    function=0x55a7d91d9fa0 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:101
#8  0x000055a7d6d5857a in Diagnostics_area::set_ok_status (this=0x7fd52d8252e8, affected_rows=0, last_insert_id=0, 
    message_text=0x7fd558f1c940 "Records: 0  Duplicates: 0  Warnings: 1") at /git/mysql-server_dbg/sql/sql_error.cc:379
#9  0x000055a7d6d4fc65 in my_ok (thd=0x7fd52d823000, affected_rows=0, id=0, 
    message=0x7fd558f1c940 "Records: 0  Duplicates: 0  Warnings: 1") at /git/mysql-server_dbg/sql/sql_class.h:4051
#10 0x000055a7d6e73a97 in mysql_alter_table (thd=0x7fd52d823000, new_db=0x7fd52d86f9f0 "mysql", new_name=0x0, 
    create_info=0x7fd558f1d8b0, table_list=0x7fd52d86fe38, alter_info=0x7fd558f1d9a0) at /git/mysql-server_dbg/sql/sql_table.cc:13157
#11 0x000055a7d7331e44 in Sql_cmd_alter_table::execute (this=0x7fd52d870498, thd=0x7fd52d823000)
    at /git/mysql-server_dbg/sql/sql_alter.cc:330
#12 0x000055a7d6dbe63c in mysql_execute_command (thd=0x7fd52d823000, first_level=true) at /git/mysql-server_dbg/sql/sql_parse.cc:4220
#13 0x000055a7d6dc0bb2 in mysql_parse (thd=0x7fd52d823000, parser_state=0x7fd558f1f330) at /git/mysql-server_dbg/sql/sql_parse.cc:4935
#14 0x000055a7d6db6713 in dispatch_command (thd=0x7fd52d823000, com_data=0x7fd558f1fc90, command=COM_QUERY)
    at /git/mysql-server_dbg/sql/sql_parse.cc:1589
#15 0x000055a7d6db4fee in do_command (thd=0x7fd52d823000) at /git/mysql-server_dbg/sql/sql_parse.cc:1214
#16 0x000055a7d6f4aa70 in handle_connection (arg=0x7fd509870420)
    at /git/mysql-server_dbg/sql/conn_handler/connection_handler_per_thread.cc:308
#17 0x000055a7d886acf8 in pfs_spawn_thread (arg=0x7fd54abec720) at /git/mysql-server_dbg/storage/perfschema/pfs.cc:2814
#18 0x00007fd5589b26db in start_thread (arg=0x7fd558f20700) at pthread_create.c:463
#19 0x00007fd5570a988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

How to repeat:
# mysqld options required for replay:  --thread-stack=0 
ALTER TABLE mysql.user ADD COLUMN Password char;
[20 Apr 2018 8:33] Roel Van de Paar
If you try another command instead you get;

8.0.11>CREATE TABLE t1 (id INT);
ERROR 1436 (HY000): Thread stack overrun:  49240 bytes used of a 131072 byte stack, and 81920 bytes needed.  Use 'mysqld --thread_stack=#' to specify a bigger stack.
[20 Apr 2018 8:34] Roel Van de Paar
.
[20 Apr 2018 9:05] MySQL Verification Team
Hello Roel,

Thank you for the report and feedback.
Observed that only debug build affected.

Thanks,
Umesh
[7 Jun 2018 14:02] Paul DuBois
Posted by developer:
 
Fixed in 8.0.12.

For debug builds, starting the server with thread_stack=0 and
executing ALTER TABLE could raise an assertion.
[13 Aug 2018 8:02] Roel Van de Paar
See bug 91990