Bug #91990 Assertion `!is_set()' failed.
Submitted: 13 Aug 2018 8:02 Modified: 16 Dec 2018 23:00
Reporter: Roel Van de Paar (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DML Severity:S6 (Debug Builds)
Version:8.0.12 OS:Any
Assigned to: CPU Architecture:Any
Tags: debug

[13 Aug 2018 8:02] Roel Van de Paar
Description:
2018-08-13T07:56:10.791016Z 0 [Warning] [MY-011071] [Server] option 'thread_stack': value -1 adjusted to 131072
2018-08-13T07:56:10.791149Z 0 [System] [MY-010116] [Server] /sda/MS300718-mysql-8.0.12-linux-x86_64-debug/bin/mysqld (mysqld 8.0.12-debug) starting as process 7736
2018-08-13T07:56:12.061487Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
[...]
2018-08-13T07:56:12.095001Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2018-08-13T07:56:12.126309Z 0 [ERROR] [MY-010326] [Server] Fatal error: Can't open and lock privilege tables: Table 'mysql.proxies_priv' doesn't exist
2018-08-13T07:56:12.126454Z 0 [Warning] [MY-010952] [Server] The privilege system failed to initialize correctly. If you have upgraded your server, make sure you're executing mysql_upgrade to correct the issue.
2018-08-13T07:56:12.145714Z 0 [Warning] [MY-010405] [Repl] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.
2018-08-13T07:56:12.145786Z 0 [ERROR] [MY-010422] [Repl] Error in checking mysql.slave_master_info repository info type of TABLE.
2018-08-13T07:56:12.145802Z 0 [ERROR] [MY-010415] [Repl] Error creating master info: Error checking repositories.
2018-08-13T07:56:12.145811Z 0 [ERROR] [MY-010426] [Repl] Slave: Failed to initialize the master info structure for channel ''; its record may still be present in 'mysql.slave_master_info' table, consider deleting it.
2018-08-13T07:56:12.145819Z 0 [ERROR] [MY-010529] [Repl] Failed to create or recover replication info repositories.
2018-08-13T07:56:12.146279Z 0 [System] [MY-010931] [Server] /sda/MS300718-mysql-8.0.12-linux-x86_64-debug/bin/mysqld: ready for connections. Version: '8.0.12-debug'  socket: '/sda/MS300718-mysql-8.0.12-linux-x86_64-debug/socket.sock'  port: 10029  MySQL Community Server (GPL).
[...]
mysqld: /git/MS-8.0.12_dbg/sql/sql_error.cc:379: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set()' failed.
07:56:26 UTC - mysqld got signal 6 ;

Core was generated by `/sda/MS300718-mysql-8.0.12-linux-x86_64-debug/bin/mysqld --no-defaults --core-f'.
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
57      ../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory.
[Current thread is 1 (Thread 0x7fd7c8c89700 (LWP 26480))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
#1  0x0000557473d7878d in my_write_core (sig=6) at /git/MS-8.0.12_dbg/mysys/stacktrace.cc:278
#2  0x0000557472accd94 in handle_fatal_signal (sig=6) at /git/MS-8.0.12_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  0x00007fd7c6d2f801 in __GI_abort () at abort.c:79
#6  0x00007fd7c6d1f39a in __assert_fail_base (fmt=0x7fd7c6ea67d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
    assertion=assertion@entry=0x557474d9c348 "!is_set()", file=file@entry=0x557474d9c178 "/git/MS-8.0.12_dbg/sql/sql_error.cc",
    line=line@entry=379,
    function=function@entry=0x557474d9c6c0 <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  0x00007fd7c6d1f412 in __GI___assert_fail (assertion=0x557474d9c348 "!is_set()",
    file=0x557474d9c178 "/git/MS-8.0.12_dbg/sql/sql_error.cc", line=379,
    function=0x557474d9c6c0 <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  0x00005574728d3f42 in Diagnostics_area::set_ok_status (this=0x7fd79c025308, affected_rows=0, last_insert_id=0,
    message_text=0x7fd7c8c85940 "Records: 0  Duplicates: 0  Warnings: 1") at /git/MS-8.0.12_dbg/sql/sql_error.cc:379
#9  0x00005574728cb5f5 in my_ok (thd=0x7fd79c023000, affected_rows=0, id=0,
    message=0x7fd7c8c85940 "Records: 0  Duplicates: 0  Warnings: 1") at /git/MS-8.0.12_dbg/sql/sql_class.h:4057
#10 0x00005574729dfe07 in mysql_alter_table (thd=0x7fd79c023000, new_db=0x7fd79c103388 "test", new_name=0x0,
    create_info=0x7fd7c8c868b0, table_list=0x7fd79c102e00, alter_info=0x7fd7c8c869a0) at /git/MS-8.0.12_dbg/sql/sql_table.cc:14443
#11 0x0000557472eaae7a in Sql_cmd_alter_table::execute (this=0x7fd79c103468, thd=0x7fd79c023000)
    at /git/MS-8.0.12_dbg/sql/sql_alter.cc:330
#12 0x0000557472923a19 in mysql_execute_command (thd=0x7fd79c023000, first_level=true) at /git/MS-8.0.12_dbg/sql/sql_parse.cc:4210
#13 0x0000557472925f94 in mysql_parse (thd=0x7fd79c023000, parser_state=0x7fd7c8c88330) at /git/MS-8.0.12_dbg/sql/sql_parse.cc:4925
#14 0x000055747291baeb in dispatch_command (thd=0x7fd79c023000, com_data=0x7fd7c8c88c90, command=COM_QUERY)
    at /git/MS-8.0.12_dbg/sql/sql_parse.cc:1607
#15 0x000055747291a3c6 in do_command (thd=0x7fd79c023000) at /git/MS-8.0.12_dbg/sql/sql_parse.cc:1232
#16 0x0000557472aba678 in handle_connection (arg=0x7fd7b47a5480)
    at /git/MS-8.0.12_dbg/sql/conn_handler/connection_handler_per_thread.cc:308
#17 0x0000557474429422 in pfs_spawn_thread (arg=0x7fd7ba7ea720) at /git/MS-8.0.12_dbg/storage/perfschema/pfs.cc:2836
#18 0x00007fd7c871b6db in start_thread (arg=0x7fd7c8c89700) at pthread_create.c:463
#19 0x00007fd7c6e1088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

How to repeat:
# mysqld options required for replay: --thread-stack=-1
CREATE DATABASE test;
USE test;
CREATE TEMPORARY TABLE t0(c0 REAL);
ALTER TABLE t0 CHANGE c0 c0 INT;
[13 Aug 2018 8:02] Roel Van de Paar
See bug 90525 (not fixed?)
[13 Aug 2018 8:24] Umesh Shastry
Hello Roel,

Thank you for the report.
Observed that 8.0.12 debug build is affected.

thanks,
Umesh
[16 Dec 2018 23:00] Paul Dubois
Posted by developer:
 
Fixed in 8.0.14.

For debug builds, incorrect foreign key error checking for ALTER
TABLE on a TEMPORARY table could result in a server exit.