Bug #41663 Falcon assertion (deferredIndex->virtualOffset) failed at Index.cpp:264
Submitted: 21 Dec 2008 14:21 Modified: 7 May 2009 16:16
Reporter: Philip Stoev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S1 (Critical)
Version:6.0-falcon-team OS:Any
Assigned to: Christopher Powers CPU Architecture:Any
Tags: F_CHILL THAW

[21 Dec 2008 14:21] Philip Stoev
Description:
When executing a transactional workload under --falcon-record-chill-threshold=1 and --falcon-index-chill-threshold=1, Falcon asserts as follows.

I undestand that those are not realistic chill/thaw values however otherwise the table is very simple and the queries involved are simple and realistic.

[Falcon] Error: assertion (deferredIndex->virtualOffset) failed at line 264 in file Index.cpp

#7  0x00000000009ccc47 in Error::assertionFailed (text=0xe10314 "deferredIndex->virtualOffset", fileName=0xe0fc73 "Index.cpp", line=264) at Error.cpp:78
#8  0x00000000009dd925 in Index::getDeferredIndex (this=0x7fedef2a7b38, transaction=0x7fedee35b938) at Index.cpp:264
#9  0x00000000009ddb24 in Index::insert (this=0x7fedef2a7b38, key=0x7fede08bf530, recordNumber=1, transaction=0x7fedee35b938) at Index.cpp:215
#10 0x00000000009ddbdf in Index::update (this=0x7fedef2a7b38, oldRecord=0x7fede86e7950, record=0x7fede86e82a8, transaction=0x7fedee35b938) at Index.cpp:593
#11 0x000000000097dbed in Table::updateIndexes (this=0x7fedef60c490, transaction=0x7fedee35b938, record=0x7fede86e82a8, oldRecord=0x7fede86e7950)
    at Table.cpp:1223
#12 0x000000000097df53 in Table::update (this=0x7fedef60c490, transaction=0x7fedee35b938, orgRecord=0x7fede86e7950, stream=0x7fedef60c010) at Table.cpp:3174
#13 0x000000000096053d in StorageDatabase::updateRow (this=0x7fedef251210, storageConnection=0x7fedef2b2390, table=0x7fedef60c490, oldRecord=0x7fede86e7950,
    stream=0x7fedef60c010) at StorageDatabase.cpp:688
#14 0x00000000009684b2 in StorageTable::updateRow (this=0x7fedef606a70, recordNumber=1) at StorageTable.cpp:132
#15 0x000000000095a7bc in StorageInterface::update_row (this=0x4432ed0, oldData=0x44331a0 "ЫрЛЪЪ", newData=0x4433190 "Ы╬ЛЪЪ") at ha_falcon.cpp:1187
#16 0x0000000000800524 in handler::ha_update_row (this=0x4432ed0, old_data=0x44331a0 "ЫрЛЪЪ", new_data=0x4433190 "Ы╬ЛЪЪ") at handler.cc:5393
#17 0x0000000000782210 in mysql_update (thd=0x444e8b8, table_list=0x4460e68, fields=@0x44509a8, values=@0x4450db0, conds=0x0, order_num=0, order=0x0,
    limit=18446744073709551614, handle_duplicates=DUP_ERROR, ignore=false) at sql_update.cc:649
#18 0x00000000006cdc7a in mysql_execute_command (thd=0x444e8b8) at sql_parse.cc:3002
#19 0x00000000006d37d1 in mysql_parse (thd=0x444e8b8,
    inBuf=0x4460a20 "UPDATE `table10_falcon_int_autoinc` SET `int_key` = `int_key` - 20, `int` = `int` + 20", length=86, found_semicolon=0x7fede08c3f00)
    at sql_parse.cc:5732
#20 0x00000000006d43bc in dispatch_command (command=COM_QUERY, thd=0x444e8b8,
    packet=0x4458989 " UPDATE `table10_falcon_int_autoinc` SET `int_key` = `int_key` - 20, `int` = `int` + 20 ", packet_length=88) at sql_parse.cc:1007
#21 0x00000000006d58e5 in do_command (thd=0x444e8b8) at sql_parse.cc:690
#22 0x00000000006c3a69 in handle_one_connection (arg=0x444e8b8) at sql_connect.cc:1154
#23 0x000000315b0073da in start_thread () from /lib64/libpthread.so.0
#24 0x000000315a4e627d in clone () from /lib64/libc.so.6

(gdb) print deferredIndex->virtualOffset
$1 = 0

(gdb) print * deferredIndex
$3 = {syncObject = {<SynchronizationObject> = {_vptr.SynchronizationObject = 0xe03030}, monitorCount = 0, mutex = {<SynchronizationObject> = {
        _vptr.SynchronizationObject = 0xe11910}, holder = 0x0, mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0,
          __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\0' <repeats 39 times>, __align = 0}}, queue = 0x0, exclusiveThread = 0x0,
    readers = 0, waiters = 0, lockState = 0, stalls = 0, objectId = 16904, sharedCount = 0, collisionCount = 0, exclusiveCount = 3, waitCount = 0,
    queueLength = 0, location = 0xe1b99a "SRLUpdateIndex::append(DI)", name = 0xe0db05 "DeferredIndex::syncObject"}, useCount = 1, next = 0x0, prior = 0x0,
  nextInTransaction = 0x0, index = 0x7fedef2a7b38, transaction = 0x7fedee35b938, transactionId = 4131, hunks = 0x0, minValue = 0x0, maxValue = 0x0,
  initialSpace = 'л' <repeats 232 times>, "\000\000\000\000\b\000?S{ЪЪЪЪЪлл\000\000\000\000лллл╟\020&ОМ\177\000\000", 'л' <repeats 248 times>,
  base = 0x7fedef260fc8 'л' <repeats 200 times>..., root = 0x7fedef2610c0, currentHunkOffset = 248, count = 0, levels = 0, haveMinValue = true,
  haveMaxValue = true, sizeEstimate = 10, virtualOffset = 0, virtualOffsetAtEnd = 0, window = 0x7fedef25c8c0}

I understand 

How to repeat:
clone the mysql-test-extra-6.0 tree and execute

cd mysql-test/gentest

perl runall.pl \
--basedir=/build/bzr/6.0-falcon-team \
--grammar=conf/transactions.yy \
--gendata=conf/transactions.zz \
--engine=Falcon --queries=100000 \
--mysqld=--falcon-index-chill-threshold=1 \
--mysqld=--falcon-record-chill-threshold=1
[24 Jan 2009 19:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/63991

2972 Christopher Powers	2009-01-24
      Bug #41663, "Falcon assertion (deferredIndex->virtualOffset) failed at Index.cpp:264"
      
      Don't try to chill empty deferred indexes.
[26 Jan 2009 17:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/64057

2974 Christopher Powers	2009-01-26
      Bug #41663, "Falcon assertion (deferredIndex->virtualOffset) failed at Index.cpp:264"
      
      Don't try to chill empty deferred indexes.
[13 Feb 2009 7:24] Bugs System
Pushed into 6.0.10-alpha (revid:alik@sun.com-20090211182317-uagkyj01fk30p1f8) (version source revid:vvaintroub@mysql.com-20090126231319-7b6yu4zqp2xfxuqg) (merge vers: 6.0.10-alpha) (pib:6)
[7 May 2009 16:16] MC Brown
Internal/test fix. No changelog entry required.