Bug #76307 Assertion `share->rows_recorded' failed in ha_tina::delete_row(const uchar*)
Submitted: 13 Mar 2015 3:46 Modified: 13 Mar 2015 4:47
Reporter: Ramesh Sivaraman Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.6.23, 5.6.25, 5.7.7, 5.5.44 OS:Linux (CentOS 7)
Assigned to: CPU Architecture:Any
Tags: debug

[13 Mar 2015 3:46] Ramesh Sivaraman
Description:
+bt
#0  0x00007f5609d39771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000000a980a6 in my_write_core (sig=6) at /sda/mysql-server-5.6/mysys/stacktrace.c:422
#2  0x00000000007277f0 in handle_fatal_signal (sig=6) at /sda/mysql-server-5.6/sql/signal_handler.cc:230
#3  <signal handler called>
#4  0x00007f5608b455c9 in raise () from /lib64/libc.so.6
#5  0x00007f5608b46cd8 in abort () from /lib64/libc.so.6
#6  0x00007f5608b3e536 in __assert_fail_base () from /lib64/libc.so.6
#7  0x00007f5608b3e5e2 in __assert_fail () from /lib64/libc.so.6
#8  0x0000000000abd12c in ha_tina::delete_row (this=0x7f55e9c89010, buf=0x7f55e9c25010 "") at /sda/mysql-server-5.6/storage/csv/ha_tina.cc:1101
#9  0x0000000000646080 in handler::ha_delete_row (this=0x7f55e9c89010, buf=0x7f55e9c25010 "") at /sda/mysql-server-5.6/sql/handler.cc:7333
#10 0x000000000098f74a in mysql_delete (thd=0x7f55f2bf8000, table_list=0x7f55e9c1f0f8, conds=0x7f55e9c1f818, order_list=0x7f55f2bfaa40, limit=18446744073709551615, options=0) at /sda/mysql-server-5.6/sql/sql_delete.cc:374
#11 0x00000000007d5d85 in mysql_execute_command (thd=0x7f55f2bf8000) at /sda/mysql-server-5.6/sql/sql_parse.cc:3568
#12 0x00000000007dd54a in mysql_parse (thd=0x7f55f2bf8000, rawbuf=0x7f55e9c1f010 "delete from t1 where a = 0", length=26, parser_state=0x7f560a26de70) at /sda/mysql-server-5.6/sql/sql_parse.cc:6357
#13 0x00000000007d06bc in dispatch_command (command=COM_QUERY, thd=0x7f55f2bf8000, packet=0x7f55f9223001 "delete from t1 where a = 0;", packet_length=27) at /sda/mysql-server-5.6/sql/sql_parse.cc:1332
#14 0x00000000007cf7ab in do_command (thd=0x7f55f2bf8000) at /sda/mysql-server-5.6/sql/sql_parse.cc:1034
#15 0x0000000000797b3d in do_handle_one_connection (thd_arg=0x7f55f2bf8000) at /sda/mysql-server-5.6/sql/sql_connect.cc:982
#16 0x0000000000797626 in handle_one_connection (arg=0x7f55f2bf8000) at /sda/mysql-server-5.6/sql/sql_connect.cc:898
#17 0x0000000000b5d7f0 in pfs_spawn_thread (arg=0x7f5603737e80) at /sda/mysql-server-5.6/storage/perfschema/pfs.cc:1860
#18 0x00007f5609d34df3 in start_thread () from /lib64/libpthread.so.0
#19 0x00007f5608c061ad in clone () from /lib64/libc.so.6

How to repeat:
DROP DATABASE test;CREATE DATABASE test;USE test;
create TABLE t1(a datetime not null) engine=csv;
delete from t1 where a = 0;
LOCK TABLES t1 LOW_PRIORITY WRITE;
INSERT INTO t1  VALUES ('10:10:10.993');
REPAIR TABLE t1 EXTENDED;

To reproducing the bug we need to use multi thread pquery binary, the
attached tarball gives the testcase as an exact match of our system,
including some handy utilities
$ vi {epoch}_mybase # Update base path in this file (the only change
required!)
$ ./{epoch}_init # Initializes the data dir
$ ./{epoch}_start # Starts mysqld
$ ./{epoch}_cl # To check mysqld is up
$ ./{epoch}_run_pquery # Run the testcase with pquery binary(produces
output)
$ vi /dev/shm/{epoch}/error.log.out # Verify the error log
$ ./{epoch}_gdb # Brings you to a gdb prompt attached to correct
mysqld
& generated core
$ ./{epoch}_parse_core # Create {epoch}_STD.gdb and {epoch}_FULL.gdb;
standard and full var gdb stack traces
etc.
[13 Mar 2015 3:46] Ramesh Sivaraman
Testcase bundle

Attachment: 1425919276_bug_bundle.tar.gz (application/gzip, text), 294.36 KiB.

[13 Mar 2015 4:47] MySQL Verification Team
Hello Ramesh Sivaraman,

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

Thanks,
Umesh
[13 Mar 2015 4:55] MySQL Verification Team
// MySQL versions 5.6.25, 5.7.7, 5.5.44 - debug builds are affected
[13 Mar 2015 6:23] MySQL Verification Team
fyi, my internal
Bug 17746357 - ASSERTION FAILED: SHARE->ROWS_RECORDED, FILE HA_TINA.CC, LINE 1122