Description:
Following assertion is observed during testing of 6.0.10 release binary with dbt2 and mysql-bench tests:
[Falcon] Error: assertion (record->useCount >= 2) failed at line 3534 in file Table.cpp
bt for dbt2:
#0 0x00002b23bb2734c5 in pthread_kill () from /lib64/libpthread.so.0
#1 0x00000000006518fe in handle_segfault (sig=6) at mysqld.cc:2689
#2 <signal handler called>
#3 0x00002b23bb275fed in raise () from /lib64/libpthread.so.0
#4 0x0000000000855a0f in Error::error (string=<value optimized out>) at Error.cpp:94
#5 0x0000000000871c7c in Table::fetchForUpdate (this=0x2aaaab4c4898, transaction=0x2aab39b8e6d8, source=<value optimized out>, usingIndex=<value optimized out>) at Table.cpp:3534
#6 0x000000000085ce7a in StorageDatabase::nextIndexed (this=<value optimized out>, storageTable=0x2aaaab4bee80, recordBitmap=0x2aaaab564dd0, recordNumber=23718, lockForUpdate=true) at StorageDatabase.cpp:430
#7 0x0000000000850b6b in StorageInterface::index_next (this=0x1f563c8, buf=0x1f566a0 "�") at ha_falcon.cpp:1835
#8 0x00000000008503ed in StorageInterface::read_range_first (this=0x1f563c8, start_key=0x1f564a8, end_key=<value optimized out>, eq_range_arg=<value optimized out>, sorted=<value optimized out>) at ha_falcon.cpp:1736
#9 0x000000000075314e in handler::multi_range_read_next (this=0x1f563c8, range_info=0x414cee08) at handler.cc:4337
#10 0x0000000000735323 in QUICK_RANGE_SELECT::get_next (this=0x2aab251390b0) at opt_range.cc:8558
#11 0x000000000074f27d in rr_quick (info=0x414cf210) at records.cc:322
#12 0x00000000006f67fc in mysql_delete (thd=0x1e0bbe0, table_list=0x1e17470, conds=0x1e17ff8, order=<value optimized out>, limit=18446744073709551615, options=0, reset_auto_increment=false) at sql_delete.cc:296
#13 0x00000000006654ea in mysql_execute_command (thd=0x1e0bbe0) at sql_parse.cc:3253
#14 0x000000000066735e in mysql_parse (thd=0x1e0bbe0, inBuf=0x1e17318 "DELETE FROM new_order\nWHERE no_o_id = 2419\n AND no_w_id = 3\n AND no_d_id = 7", length=78, found_semicolon=0x414d1120) at sql_parse.cc:5752
#15 0x0000000000668009 in dispatch_command (command=COM_QUERY, thd=0x1e0bbe0, packet=0x1e0f0a1 "DELETE FROM new_order\nWHERE no_o_id = 2419\n AND no_w_id = 3\n AND no_d_id = 7", packet_length=<value optimized out>) at sql_parse.cc:1009
#16 0x000000000065afb9 in handle_one_connection (arg=<value optimized out>) at sql_connect.cc:1146
#17 0x00002b23bb26f193 in start_thread () from /lib64/libpthread.so.0
#18 0x00002b23bbae745d in clone () from /lib64/libc.so.6
bt for mysql-bench:
#0 0x00002ae9c5a834c5 in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000a905a1 in my_write_core (sig=6) at stacktrace.c:309
#2 0x000000000063ef3b in handle_segfault (sig=6) at mysqld.cc:2689
#3 <signal handler called>
#4 0x00002ae9c5a85fed in raise () from /lib64/libpthread.so.0
#5 0x0000000000851ff8 in Error::debugBreak () at Error.cpp:94
#6 0x00000000008520e8 in Error::error (string=<value optimized out>) at Error.cpp:71
#7 0x000000000085214b in Error::assertionFailed (text=<value optimized out>, fileName=<value optimized out>, line=6)
at Error.cpp:78
#8 0x0000000000869bd9 in Table::fetchForUpdate (this=<value optimized out>, transaction=0x2aaaab433480,
source=0x2aaacdccd658, usingIndex=<value optimized out>) at Table.cpp:3534
#9 0x00000000008587a3 in StorageDatabase::nextIndexed (this=<value optimized out>, storageTable=0x2aaaab479850,
recordBitmap=0x2aaaab5b4228, recordNumber=1, lockForUpdate=true) at StorageDatabase.cpp:430
#10 0x000000000085d0d4 in StorageTable::nextIndexed (this=0x0, recordNumber=<value optimized out>,
lockForUpdate=<value optimized out>) at StorageTable.cpp:171
#11 0x000000000084f8bb in StorageInterface::index_next (this=0x2851778, buf=0x2851a50 "�") at ha_falcon.cpp:1835
#12 0x000000000084bfe5 in StorageInterface::index_next_same (this=0x2851778, buf=0x2851a50 "�", key=0x2851f68 "", key_len=4)
at ha_falcon.cpp:1887
#13 0x0000000000740aaa in handler::read_range_next (this=0x2851778) at handler.cc:5086
#14 0x000000000073fce2 in handler::multi_range_read_next (this=0x2851778, range_info=0x4b0957d8) at handler.cc:4311
#15 0x000000000084be68 in StorageInterface::multi_range_read_next (this=0x59a9, rangeInfo=0x59cf) at ha_falcon.cpp:1964
#16 0x0000000000724ac7 in QUICK_RANGE_SELECT::get_next (this=0x281be30) at opt_range.cc:8558
#17 0x000000000073b11b in rr_quick (info=0x4b095bf0) at records.cc:322
#18 0x00000000006e26b4 in mysql_delete (thd=0x26db4c0, table_list=0x2809120, conds=0x2809860, order=<value optimized out>,
limit=18446744073709551614, options=0, reset_auto_increment=false) at sql_delete.cc:296
#19 0x0000000000652182 in mysql_execute_command (thd=0x26db4c0) at sql_parse.cc:3253
#20 0x0000000000653fd2 in mysql_parse (thd=0x26db4c0, inBuf=0x2809028 "delete from bench2 where bench1_id=0", length=36,
found_semicolon=0x4b0970c8) at sql_parse.cc:5752
#21 0x0000000000654887 in dispatch_command (command=COM_QUERY, thd=0x26db4c0,
packet=0x27f92d1 "delete from bench2 where bench1_id=0", packet_length=36) at sql_parse.cc:1009
#22 0x000000000065578e in do_command (thd=0x26db4c0) at sql_parse.cc:691
#23 0x0000000000646d75 in handle_one_connection (arg=<value optimized out>) at sql_connect.cc:1146
#24 0x00002ae9c5a7f193 in start_thread () from /lib64/libpthread.so.0
#25 0x00002ae9c62f745d in clone () from /lib64/libc.so.6
For both cases assertion happens here:
(gdb) l
3529 if (insertIntoTree(recordVersion, record, recordNumber))
3530 {
3531 transaction->addRecord(recordVersion);
3532 recordVersion->release();
3533
3534 ASSERT(record->useCount >= 2);
3535
3536 return record;
3537 }
3538
How to repeat:
Run dbt2 or mysql-bench test for Falcon.