Bug #88267 InnoDB: Assertion failure: fts0vlc.ic:96:val <= 4294967295u
Submitted: 28 Oct 2017 1:02 Modified: 2 Jan 2018 15:24
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DML Severity:S6 (Debug Builds)
Version:8.0.3 RC/5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: debug

[28 Oct 2017 1:02] Roel Van de Paar
Description:
2017-10-28T00:31:21.085221Z 0 [Note] /sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/bin/mysqld: ready for connections. Version: '8.0.3-rc-debug-log'  socket: '/sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/socket.sock'  port: 16654  MySQL Community Server (GPL)
2017-10-28T00:31:37.344450Z 7 [ERROR] InnoDB: Assertion failure: fts0vlc.ic:96:val <= 4294967295u
InnoDB: thread 140447874991872
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
00:31:37 UTC - mysqld got signal 6 ;

Core was generated by `/sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/bin/mysqld --no-defaults --core'.
Program terminated with signal 6, Aborted.
#0  0x00007fbc915859b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
61	  val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
(gdb) bt
#0  0x00007fbc915859b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x000000000369e428 in my_write_core (sig=6) at /git/mysql-server_dbg/mysys/stacktrace.cc:291
#2  0x000000000286b8f6 in handle_fatal_signal (sig=6) at /git/mysql-server_dbg/sql/signal_handler.cc:234
#3  <signal handler called>
#4  0x00007fbc8f89d1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007fbc8f89e8e8 in __GI_abort () at abort.c:90
#6  0x0000000003a8b8f9 in ut_dbg_assertion_failed (expr=0x493111a "val <= 4294967295u", 
    file=0x49310e0 "/git/mysql-server_dbg/storage/innobase/include/fts0vlc.ic", line=96)
    at /git/mysql-server_dbg/storage/innobase/ut/ut0dbg.cc:60
#7  0x0000000003c001f0 in fts_encode_int (val=20030101000000, buf=0x7fbc4957fa78 "test½4t1½2")
    at /git/mysql-server_dbg/storage/innobase/include/fts0vlc.ic:96
#8  0x0000000003c022e3 in fts_cache_node_add_positions (cache=0x7fbc495a64b8, node=0x7fbc49436c50, doc_id=20030101000000, 
    positions=0x7fbc49413968) at /git/mysql-server_dbg/storage/innobase/fts/fts0fts.cc:1332
#9  0x0000000003c02676 in fts_cache_add_doc (cache=0x7fbc495a64b8, index_cache=0x7fbc495a69a0, doc_id=20030101000000, 
    tokens=0x7fbc496371b8) at /git/mysql-server_dbg/storage/innobase/fts/fts0fts.cc:1429
#10 0x0000000003c07b6c in fts_add_doc_by_id (ftt=0x7fbc49437b88, doc_id=20030101000000, fts_indexes=0x0)
    at /git/mysql-server_dbg/storage/innobase/fts/fts0fts.cc:4240
#11 0x0000000003c0620d in fts_add (ftt=0x7fbc49437b88, row=0x7fbc494100d8)
    at /git/mysql-server_dbg/storage/innobase/fts/fts0fts.cc:3484
#12 0x0000000003c06a29 in fts_commit_table (ftt=0x7fbc49437b88) at /git/mysql-server_dbg/storage/innobase/fts/fts0fts.cc:3697
#13 0x0000000003c06b1d in fts_commit (trx=0x7fbc7b4008c0) at /git/mysql-server_dbg/storage/innobase/fts/fts0fts.cc:3746
#14 0x0000000003a78c65 in trx_commit_low (trx=0x7fbc7b4008c0, mtr=0x7fbc91b28590)
    at /git/mysql-server_dbg/storage/innobase/trx/trx0trx.cc:2133
#15 0x0000000003a78e1f in trx_commit (trx=0x7fbc7b4008c0) at /git/mysql-server_dbg/storage/innobase/trx/trx0trx.cc:2225
#16 0x0000000003a79522 in trx_commit_for_mysql (trx=0x7fbc7b4008c0) at /git/mysql-server_dbg/storage/innobase/trx/trx0trx.cc:2445
#17 0x000000000382203c in innobase_commit_low (trx=0x7fbc7b4008c0) at /git/mysql-server_dbg/storage/innobase/handler/ha_innodb.cc:4990
#18 0x000000000382257c in innobase_commit (hton=0x7fbc8d80ed20, thd=0x7fbc49419000, commit_trx=false)
    at /git/mysql-server_dbg/storage/innobase/handler/ha_innodb.cc:5152
#19 0x00000000029c7dc8 in ha_commit_low (thd=0x7fbc49419000, all=false, run_after_commit=false)
    at /git/mysql-server_dbg/sql/handler.cc:1972
#20 0x00000000035eb2d6 in MYSQL_BIN_LOG::process_commit_stage_queue (this=0x56e3f80 <mysql_bin_log>, thd=0x7fbc49419000, 
    first=0x7fbc49419000) at /git/mysql-server_dbg/sql/binlog.cc:9095
#21 0x00000000035eccab in MYSQL_BIN_LOG::ordered_commit (this=0x56e3f80 <mysql_bin_log>, thd=0x7fbc49419000, all=false, 
    skip_commit=false) at /git/mysql-server_dbg/sql/binlog.cc:9766
#22 0x00000000035eac97 in MYSQL_BIN_LOG::commit (this=0x56e3f80 <mysql_bin_log>, thd=0x7fbc49419000, all=false)
    at /git/mysql-server_dbg/sql/binlog.cc:8911
#23 0x00000000029c793c in ha_commit_trans (thd=0x7fbc49419000, all=false, ignore_global_read_lock=false)
    at /git/mysql-server_dbg/sql/handler.cc:1839
#24 0x00000000025ee984 in trans_commit_stmt (thd=0x7fbc49419000, ignore_global_read_lock=false)
    at /git/mysql-server_dbg/sql/transaction.cc:508
#25 0x00000000024be9ba in mysql_execute_command (thd=0x7fbc49419000, first_level=true) at /git/mysql-server_dbg/sql/sql_parse.cc:4775
#26 0x00000000024c042b in mysql_parse (thd=0x7fbc49419000, parser_state=0x7fbc91b2b2f0) at /git/mysql-server_dbg/sql/sql_parse.cc:5414
#27 0x00000000024b68e7 in dispatch_command (thd=0x7fbc49419000, com_data=0x7fbc91b2bb80, command=COM_QUERY)
    at /git/mysql-server_dbg/sql/sql_parse.cc:1708
#28 0x00000000024b53f5 in do_command (thd=0x7fbc49419000) at /git/mysql-server_dbg/sql/sql_parse.cc:1291
#29 0x000000000285b2d6 in handle_connection (arg=0x7fbc7daeb3c0)
    at /git/mysql-server_dbg/sql/conn_handler/connection_handler_per_thread.cc:328
#30 0x00000000036ec54d in pfs_spawn_thread (arg=0x7fbc7db91620) at /git/mysql-server_dbg/storage/perfschema/pfs.cc:2985
#31 0x00007fbc91580e25 in start_thread (arg=0x7fbc91b2c700) at pthread_create.c:308
#32 0x00007fbc8f96034d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

How to repeat:
CREATE DATABASE test;
USE test;
CREATE TABLE t1 (FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), FULLTEXT(title)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL, NULL), (20030101000000, 20030102000000);
[28 Oct 2017 19:04] MySQL Verification Team
Thank you for the bug report. Verified as described.
[2 Jan 2018 15:24] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 5.6.40, 5.7.22, and 8.0.5  release, and here's the changelog entry:

 A multiple-insert statement on a table containing a FULLTEXT key and a
FTS_DOC_ID column caused a server error.