Bug #34177 aasertion failed in Table::validateUpdate
Submitted: 30 Jan 2008 21:19 Modified: 31 Jan 2008 12:14
Reporter: Vladislav Vaintroub Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.5BK OS:Microsoft Windows (x64)
Assigned to:

[30 Jan 2008 21:19] Vladislav Vaintroub
Description:
Assertion happens while running falcon_bug_22154 test
in Table.cpp, function Table::validateUpdate()
on this place

if (!next)
		{
		Log::debug("Table::validateUpdate: bad record\n");
		initial->print();
		Record *newRecord = fetch(recordNumber);
		Log::debug("Table::validateUpdate: currentRecord\n");
		newRecord->print();
-->		ASSERT(false);
		}

The stack backtrace of the failing thread is
 	ntdll.dll!DbgBreakPoint() 	
 	mysqld.exe!Error::debugBreak()  Line 94	C++
 	mysqld.exe!Error::error(const char * string=0x0000000140d328e0, ...)  Line 71	C++
 	mysqld.exe!Error::assertionFailed(const char * fileName=0x0000000140d36610, int line=3545)  Line 77	C++
>	mysqld.exe!Table::validateUpdate(int recordNumber=467, unsigned int transactionId=6698)  Line 3545 + 0x18 bytes	C++
 	mysqld.exe!Dbb::validateAndUpdateRecord(int sectionId=0, int recordId=467, Stream * stream=0x000000000512f010, unsigned int transId=6698, bool earlyWrite=false)  Line 339 + 0x29 bytes	C++
 	mysqld.exe!SRLUpdateRecords::commit()  Line 338 + 0x38 bytes	C++
 	mysqld.exe!SerialLogTransaction::commit()  Line 90	C++
 	mysqld.exe!SerialLogTransaction::doAction()  Line 155	C++
 	mysqld.exe!Gopher::gopherThread()  Line 67	C++
 	mysqld.exe!Gopher::gopherThread(void * arg=0x0000000002941c18)  Line 38	C++
 	mysqld.exe!Thread::thread()  Line 163	C++
 	mysqld.exe!Thread::thread(void * parameter=0x000000000294cec8)  Line 141	C++
 	kernel32.dll!BaseThreadInitThunk()  + 0xd bytes	
 	ntdll.dll!RtlUserThreadStart()  + 0x21 bytes	

Additionally, there are 2 another threads running in parallel, one doing drop table and  also scavenger.

Note that the 32 bit version does not crash - it finishes earlier with "record
cache exhausted" error.

Note also that possibilities for post-mortem analysis are available : I saved memory dump, PDB, executable and source.

How to repeat:
Get fresh bitkeeper tree  for Falcon. Compile in debug mode for x64.
run the test with 

perl mysql-test-run.pl --enable-disabled --suite=falcon falcon_bug_22154

Be patient it takes a while, until mysqld asserts.

Suggested fix:
?
[31 Jan 2008 12:14] Vladislav Vaintroub
The assertion has been changed with the latest push