Bug #92777 Assertion `(error == 3110) || (error >= 10000)' failed.
Submitted: 14 Oct 2018 16:58 Modified: 29 Oct 2018 18:29
Reporter: Roel Van de Paar (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DML Severity:S1 (Critical)
Version:8.0.12 OS:Any
Assigned to: CPU Architecture:Any

[14 Oct 2018 16:58] Roel Van de Paar
Description:
ctions. Version: '8.0.12-debug'  socket: '/sda/MS300718-mysql-8.0.12-linux-x86_64-debug/socket.sock'  port: 10029  MySQL Community Server (GPL).
2018-10-14T16:55:47.946627Z 8 [ERROR] [MY-013140] [Server] Error in diagnostics area: MY-001194 - Table 't1' is marked as crashed and should be repaired
mysqld: /git/MS-8.0.12_dbg/sql/mysqld.cc:2923: void my_message_sql(uint, const char*, myf): Assertion `(error == 3110) || (error >= 10000)' failed.
16:55:47 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
[Current thread is 1 (Thread 0x7fb765bfe700 (LWP 27723))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
#1  0x0000559fd0e7878d in my_write_core (sig=6) at /git/MS-8.0.12_dbg/mysys/stacktrace.cc:278
#2  0x0000559fcfbccd94 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  0x00007fb77ac79801 in __GI_abort () at abort.c:79
#6  0x00007fb77ac6939a in __assert_fail_base (fmt=0x7fb77adf07d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x559fd17cf498 "(error == 3110) || (error >= 10000)", 
    file=file@entry=0x559fd17ceff8 "/git/MS-8.0.12_dbg/sql/mysqld.cc", line=line@entry=2923, 
    function=function@entry=0x559fd17d62a0 <my_message_sql::__PRETTY_FUNCTION__> "void my_message_sql(uint, const char*, myf)")
    at assert.c:92
#7  0x00007fb77ac69412 in __GI___assert_fail (assertion=0x559fd17cf498 "(error == 3110) || (error >= 10000)", 
    file=0x559fd17ceff8 "/git/MS-8.0.12_dbg/sql/mysqld.cc", line=2923, 
    function=0x559fd17d62a0 <my_message_sql::__PRETTY_FUNCTION__> "void my_message_sql(uint, const char*, myf)") at assert.c:101
#8  0x0000559fcf8b96a2 in my_message_sql (error=1194, str=0x7fb765bfa360 "Table 't1' is marked as crashed and should be repaired", 
    MyFlags=64) at /git/MS-8.0.12_dbg/sql/mysqld.cc:2922
#9  0x0000559fd0e66fc6 in my_error (nr=1194, MyFlags=64) at /git/MS-8.0.12_dbg/mysys/my_error.cc:247
#10 0x0000559fcfd55bb4 in handler::print_error (this=0x7fb7527e2028, error=127, errflag=64)
    at /git/MS-8.0.12_dbg/sql/handler.cc:4088
#11 0x0000559fcfd31e66 in read_all_rows (thd=0x7fb752423000, param=0x7fb765bfb7d0, qep_tab=0x7fb7525df388, fs_info=0x7fb7524470c0, 
    chunk_file=0x7fb765bfb9d0, tempfile=0x7fb765bfb8b0, pq=0x0, found_rows=0x7fb765bfbbc0)
    at /git/MS-8.0.12_dbg/sql/filesort.cc:1076
#12 0x0000559fcfd2f8b2 in filesort (thd=0x7fb752423000, filesort=0x7fb7525df7f0, sort_positions=false, 
    examined_rows=0x7fb765bfbbb8, found_rows=0x7fb765bfbbc0, returned_rows=0x7fb765bfbbc8) at /git/MS-8.0.12_dbg/sql/filesort.cc:470
#13 0x0000559fcffc2a06 in create_sort_index (thd=0x7fb752423000, join=0x7fb7525de930, qep_tab=0x7fb7525df388)
    at /git/MS-8.0.12_dbg/sql/sql_executor.cc:5395
#14 0x0000559fcffbb71a in QEP_TAB::sort_table (this=0x7fb7525df388) at /git/MS-8.0.12_dbg/sql/sql_executor.cc:2764
#15 0x0000559fcffbaf6c in join_init_read_record (tab=0x7fb7525df388) at /git/MS-8.0.12_dbg/sql/sql_executor.cc:2617
#16 0x0000559fcffb7e08 in sub_select (join=0x7fb7525de930, qep_tab=0x7fb7525df388, end_of_records=false)
    at /git/MS-8.0.12_dbg/sql/sql_executor.cc:1512
#17 0x0000559fcffb7515 in do_select (join=0x7fb7525de930) at /git/MS-8.0.12_dbg/sql/sql_executor.cc:1171
#18 0x0000559fcffb4621 in JOIN::exec (this=0x7fb7525de930) at /git/MS-8.0.12_dbg/sql/sql_executor.cc:294
#19 0x0000559fcfa81a30 in Sql_cmd_dml::execute_inner (this=0x7fb7525de568, thd=0x7fb752423000)
    at /git/MS-8.0.12_dbg/sql/sql_select.cc:651
#20 0x0000559fcfa814bd in Sql_cmd_dml::execute (this=0x7fb7525de568, thd=0x7fb752423000) at /git/MS-8.0.12_dbg/sql/sql_select.cc:554
#21 0x0000559fcfa23a19 in mysql_execute_command (thd=0x7fb752423000, first_level=true) at /git/MS-8.0.12_dbg/sql/sql_parse.cc:4210
#22 0x0000559fcfa25f94 in mysql_parse (thd=0x7fb752423000, parser_state=0x7fb765bfd330) at /git/MS-8.0.12_dbg/sql/sql_parse.cc:4925
#23 0x0000559fcfa1baeb in dispatch_command (thd=0x7fb752423000, com_data=0x7fb765bfdc90, command=COM_QUERY)
    at /git/MS-8.0.12_dbg/sql/sql_parse.cc:1607
#24 0x0000559fcfa1a3c6 in do_command (thd=0x7fb752423000) at /git/MS-8.0.12_dbg/sql/sql_parse.cc:1232
#25 0x0000559fcfbba678 in handle_connection (arg=0x7fb7687a5480)
    at /git/MS-8.0.12_dbg/sql/conn_handler/connection_handler_per_thread.cc:308
#26 0x0000559fd1529422 in pfs_spawn_thread (arg=0x7fb76e7e7720) at /git/MS-8.0.12_dbg/storage/perfschema/pfs.cc:2836
#27 0x00007fb77c6656db in start_thread (arg=0x7fb765bfe700) at pthread_create.c:463
#28 0x00007fb77ad5a88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

How to repeat:
CREATE DATABASE test;
USE test;
create TABLE t1(c1 varchar(32),key (c1)) engine=myisam;
ALTER TABLE t1 ADD c2 REAL;
INSERT INTO t1 values(0,0),('2147643648','4294967296');
CREATE TRIGGER bd BEFORE DELETE ON t1 FOR EACH ROW DELETE FROM t1;
LOCK TABLES t1 LOW_PRIORITY WRITE;
repair TABLE t1;
SELECT * FROM t1 ORDER BY c2 DESC;
[14 Oct 2018 17:01] Roel Van de Paar
Another testcase 

CREATE DATABASE test;
USE test;
SET default_storage_engine=BLACKHOLE;
CREATE TABLE wp(FTS_DOC_ID INT(1)UNSIGNED,title CHAR (1) DEFAULT'',text TEXT,dummy INT,KEY (FTS_DOC_ID),UNIQUE KEY FTS_DOC_ID_INDEX (FTS_DOC_ID),FULLTEXT KEY idx (title,text)) DEFAULT CHARSET=latin1;
SELECT title,MATCH(title,text)AGAINST ('+InnoDB -database' IN BOOLEAN MODE) AS score FROM wp WHERE MATCH(title,text) AGAINST ('InnoDB database' WITH QUERY EXPANSION) ORDER BY score DESC;
[15 Oct 2018 1:13] Miguel Solorzano
Results Release and Debug build

Attachment: 92777.txt (text/plain), 5.44 KiB.

[15 Oct 2018 1:17] Miguel Solorzano
Thank you for the bug report. Tested with recent source server both build release and debug got the error: ERROR 1194 (HY000): Table 't1' is marked as crashed and should be repaired, however without server crash.

5.7 version not affected.
[29 Oct 2018 18:29] Paul Dubois
Posted by developer:
 
Fixed in 8.0.13.

filesort operations could cause a server exit.
[5 Dec 2018 9:40] Ramesh Sivaraman
Another testcase

CREATE DATABASE test;
USE test;
create TABLE t1(a DATE not null)engine=csv;
SET sql_mode=no_zero_date;
insert into t1 values('1 x');
SELECT * FROM(SELECT * FROM t1)as b ORDER BY a ASC;