Bug #78643 InnoDB: Failing assertion: val <= 4294967295u in fts0vlc.ic line 96
Submitted: 30 Sep 2015 10:44 Modified: 30 Sep 2015 11:04
Reporter: Ramesh Sivaraman Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: FULLTEXT search Severity:S3 (Non-critical)
Version:5.6.26, 5.6.28, 5.7.10 OS:CentOS (CentOS 7)
Assigned to: CPU Architecture:Any
Tags: debug

[30 Sep 2015 10:44] Ramesh Sivaraman
Description:
+bt
#0  0x00007f2dbfea75d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007f2dbfea8cc8 in __GI_abort () at abort.c:90
#2  0x0000000000dd4e99 in fts_encode_int (val=42949672950, buf=0x7f2d9c846040 "") at /sda/ms/mysql-5.6.26/storage/innobase/include/fts0vlc.ic:96
#3  0x0000000000dd714b in fts_cache_node_add_positions (cache=0x0, node=0x7f2d9c8440c0, doc_id=42949672950, positions=0x7f2d9c844180) at /sda/ms/mysql-5.6.26/storage/innobase/fts/fts0fts.cc:1352
#4  0x0000000000c42d78 in row_fts_insert_tuple (ins_ctx=0x7f2d9bffed70, word=0x7f2d9bffed50, positions=0x7f2d9c844180, in_doc_id=0x7f2d9bffedd8, dtuple=0x0) at /sda/ms/mysql-5.6.26/storage/innobase/row/row0ftsort.cc:1057
#5  0x0000000000c43ef3 in row_fts_merge_insert (index=0x7f2da2874b78, table=0x7f2da286d378, psort_info=0x7f2da289ac78, id=2) at /sda/ms/mysql-5.6.26/storage/innobase/row/row0ftsort.cc:1489
#6  0x0000000000c42a26 in fts_parallel_merge (arg=0x7f2da2854798) at /sda/ms/mysql-5.6.26/storage/innobase/row/row0ftsort.cc:932
#7  0x00007f2dc1096df5 in start_thread (arg=0x7f2d9bfff700) at pthread_create.c:308
#8  0x00007f2dbff681ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
(gdb) +set logging off

How to repeat:
testcase

# mysqld options required for replay:  --sql_mode=ONLY_FULL_GROUP_BY
DROP DATABASE test;CREATE DATABASE test;USE test;
SET @@session.insert_id=42949672950;
CREATE TABLE t1(FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT KEY,title CHAR (1),body TEXT) ENGINE=InnoDB;
INSERT INTO t1(title,body)VALUES ('myfulltext database','my test fulltext database');
CREATE FULLTEXT INDEX idx2 ON t1(body);

The attached tarball gives the testcase as an exact match of our system, including some handy utilities

$ vi 1443601117_mybase     # STEP1: Update the base path in this file (usually the only change required!). If you use a non-binary distribution, please update SOURCE_DIR location also
$ ./1443601117_init        # STEP2: Initializes the data dir
$ ./1443601117_start       # STEP3: Starts mysqld
$ ./1443601117_cl          # STEP4: To check mysqld is up
$ ./1443601117_run_pquery  # STEP5: Run the testcase with the pquery binary
$ ./1443601117_run         # OPTIONAL: Run the testcase with the mysql CLI (may not reproduce the issue, as the pquery binary was used for the original testcase reduction)
$ vi /dev/shm/1443601117/error.log.out  # STEP6: Verify the error log
$ ./1443601117_gdb         # OPTIONAL: Brings you to a gdb prompt with gdb attached to the used mysqld and attached to the generated core
$ ./1443601117_parse_core  # STEP7: Create 1443601117_STD.gdb and 1443601117_FULL.gdb; standard and full variables gdb stack traces
[30 Sep 2015 10:44] Ramesh Sivaraman
Testcase bundle

Attachment: 1443601117.tar.gz (application/gzip, text), 1.00 MiB.

[30 Sep 2015 11:04] MySQL Verification Team
Hello Ramesh Sivaraman,
 
Thank you for the report and test case.
Observed that 5.6.26,5.6.28/5.7.10 debug builds are affected.

Thanks,
Umesh
[30 Sep 2015 11:05] MySQL Verification Team
// 5.6.28 - only debug build affected

[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.6.28: cat docs/INFO_SRC
commit: cba294cfbde9bd40ee49541d5c2723fe41e8b98c
date: 2015-09-22 15:04:14 +0200
build-date: 2015-09-23 14:47:15 +0200
short: cba294c
branch: mysql-5.6

MySQL source 5.6.28

(gdb) bt
#0  0x00007fed72d6b5d7 in raise () from /lib64/libc.so.6
#1  0x00007fed72d6ccc8 in abort () from /lib64/libc.so.6
#2  0x0000000000d427a0 in fts_encode_int (val=42949672950, buf=0x7fed0c00bf40 "")
    at /export/home/pb2/build/sb_0-16559838-1443014914.12/mysqlcom-pro-5.6.28/storage/innobase/include/fts0vlc.ic:96
#3  0x0000000000d4d7c0 in fts_cache_node_add_positions (cache=0x0, node=0x7fed0c00a040, doc_id=42949672950, positions=0x7fed0c00a100)
    at /export/home/pb2/build/sb_0-16559838-1443014914.12/mysqlcom-pro-5.6.28/storage/innobase/fts/fts0fts.cc:1352
#4  0x0000000000bbcf04 in row_fts_insert_tuple (ins_ctx=0x7fed397fad90, word=0x7fed397fadf0, positions=0x7fed0c00a100, in_doc_id=0x7fed397fae18, dtuple=0x0)
    at /export/home/pb2/build/sb_0-16559838-1443014914.12/mysqlcom-pro-5.6.28/storage/innobase/row/row0ftsort.cc:1057
#5  0x0000000000bbda1f in row_fts_merge_insert (index=0x7fed1c020ca8, table=0x7fed1c062c18, psort_info=0x7fed1c026928, id=2)
    at /export/home/pb2/build/sb_0-16559838-1443014914.12/mysqlcom-pro-5.6.28/storage/innobase/row/row0ftsort.cc:1489
#6  0x0000000000bbe060 in fts_parallel_merge (arg=0x7fed1c06eee8) at /export/home/pb2/build/sb_0-16559838-1443014914.12/mysqlcom-pro-5.6.28/storage/innobase/row/row0ftsort.cc:932
#7  0x00007fed74160df5 in start_thread () from /lib64/libpthread.so.0
#8  0x00007fed72e2c60d in clone () from /lib64/libc.so.6
(gdb)
[30 Sep 2015 11:05] MySQL Verification Team
// 5.7.10 - only debug build affected

[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.10: cat docs/INFO_SRC
commit: c70ec0ed106ddd0b9ec0adb551be63b99d969c5d
date: 2015-09-27 04:27:17 +0200
build-date: 2015-09-27 18:04:34 +0200
short: c70ec0e
branch: mysql-5.7

MySQL source 5.7.10

(gdb) bt
#0  0x00007f92c67fe5d7 in raise () from /lib64/libc.so.6
#1  0x00007f92c67ffcc8 in abort () from /lib64/libc.so.6
#2  0x0000000001a35c07 in ut_dbg_assertion_failed (expr=0x22c03d4 "val <= 4294967295u",
    file=0x22c0368 "/export/home2/pb2/build/sb_0-16591632-1443371030.54/mysqlcom-pro-5.7.10/storage/innobase/include/fts0vlc.ic", line=96)
    at /export/home2/pb2/build/sb_0-16591632-1443371030.54/mysqlcom-pro-5.7.10/storage/innobase/ut/ut0dbg.cc:67
#3  0x0000000001b4b1aa in fts_encode_int (val=42949672950, buf=0x7f9244023728 "")
    at /export/home2/pb2/build/sb_0-16591632-1443371030.54/mysqlcom-pro-5.7.10/storage/innobase/include/fts0vlc.ic:96
#4  0x0000000001b4d70a in fts_cache_node_add_positions (cache=0x0, node=0x7f92440212e8, doc_id=42949672950, positions=0x7f92440213a8)
    at /export/home2/pb2/build/sb_0-16591632-1443371030.54/mysqlcom-pro-5.7.10/storage/innobase/fts/fts0fts.cc:1304
#5  0x000000000191db35 in row_fts_insert_tuple (ins_ctx=0x7f927cdf9800, word=0x7f927cdf97e0, positions=0x7f92440213a8, in_doc_id=0x7f927cdf9b28, dtuple=0x0)
    at /export/home2/pb2/build/sb_0-16591632-1443371030.54/mysqlcom-pro-5.7.10/storage/innobase/row/row0ftsort.cc:1215
#6  0x000000000191ef0c in row_fts_merge_insert (index=0x7f9258950d90, table=0x7f9258957750, psort_info=0x7f9258963a98, id=2)
    at /export/home2/pb2/build/sb_0-16591632-1443371030.54/mysqlcom-pro-5.7.10/storage/innobase/row/row0ftsort.cc:1673
#7  0x000000000191d55b in fts_parallel_merge (arg=0x7f9258968338) at /export/home2/pb2/build/sb_0-16591632-1443371030.54/mysqlcom-pro-5.7.10/storage/innobase/row/row0ftsort.cc:1049
#8  0x00007f92c7dffdf5 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f92c68bf60d in clone () from /lib64/libc.so.6
(gdb)