Bug #42006 | Running falcon_bug_22207-big on 32-bit Linux leads to crash | ||
---|---|---|---|
Submitted: | 9 Jan 2009 21:22 | Modified: | 15 May 2009 13:28 |
Reporter: | Hakan Küçükyılmaz | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Falcon storage engine | Severity: | S3 (Non-critical) |
Version: | mysql-6.0-falcon-team | OS: | Linux (32-bit) |
Assigned to: | Kevin Lewis | CPU Architecture: | Any |
Tags: | F_SCAVENGER |
[9 Jan 2009 21:22]
Hakan Küçükyılmaz
[10 Jan 2009 19:38]
Hakan Küçükyılmaz
Backtrace from 32-bit Mac OS X/PPC run Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x8209a81a [Switching to process 22029 thread 0x4003] MemFreeBlock::remove (this=0x8209a80a) at MemFreeBlock.cpp:384 384 int parentDelta = (nodeParent->smaller == node) ? 1 : -1; (gdb) (gdb) p parentDelta No symbol "parentDelta" in current context. (gdb) p nodeParent $1 = (MemFreeBlock *) 0xa815059 (gdb) p nodeParent->smaller $2 = (MemFreeBlock *) 0x812b980a (gdb) p node $3 = (MemFreeBlock *) 0x908ea8 (gdb) l 379 node->balance += delta; 380 381 return; 382 } 383 384 int parentDelta = (nodeParent->smaller == node) ? 1 : -1; 385 node->balance += delta; 386 387 if (node->balance == delta) 388 break; (gdb) p node->balance $4 = -3233832 (gdb) p node $5 = (MemFreeBlock *) 0x908ea8 (gdb) p *node $6 = { <MemBigObject> = { <MemBigHeader> = { next = 0x0, prior = 0x0 }, members of MemBigObject: memHeader = { pool = 0x0, length = 0 } }, members of MemFreeBlock: smaller = 0x0, larger = 0xa8209a8, parent = 0x0, nextTwin = 0x908ea8, priorTwin = 0x908ea8, balance = -3233832 } (gdb) (gdb) p *nodeParent->smaller Cannot access memory at address 0x812b980a
[13 Jan 2009 17:32]
MySQL Verification Team
Verified on 64-bit too: ======================================================= TEST RESULT TIME (ms) ------------------------------------------------------- falcon.falcon_bug_22207-big [ fail ] mysqltest: At line 68: query 'UPDATE t1 SET c2 = c2 + 1, c1 = concat(rpad(conv(c2,10,10),10,'_'), repeat(c3, 40))' failed: 2013: Lost connection to MySQL server during query The result from queries just before the failure was: < snip > 600000____EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 600000____FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 600000____GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG 600000____HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 600000____IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 600000____JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ 600000____KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK SELECT c1 from t1;
[13 Jan 2009 19:35]
Kevin Lewis
Assigning this to myself by way of proxy for Jim Starkey, who agreed to look into it.
[15 Jan 2009 16:43]
Hakan Küçükyılmaz
Latest changes in mysql-6.0-falcon-team tree fixed this issue: Linux 32-bit: TEST RESULT TIME (ms) ------------------------------------------------------- falcon.falcon_bug_22207-big [ pass ] 636862 falcon.falcon_bug_22207-big [ pass ] 636507 falcon.falcon_bug_22207-big [ pass ] 631690 falcon.falcon_bug_22207-big [ pass ] 633473 falcon.falcon_bug_22207-big [ pass ] 636163 falcon.falcon_bug_22207-big [ pass ] 637584 falcon.falcon_bug_22207-big [ pass ] 633753 falcon.falcon_bug_22207-big [ pass ] 631290 Mac 32-bit: falcon.falcon_bug_22207-big [ pass ] 2853551 falcon.falcon_bug_22207-big [ pass ] 2879854 falcon.falcon_bug_22207-big [ pass ] 2870679 falcon.falcon_bug_22207-big [ pass ] 2841266
[15 Jan 2009 16:54]
Kevin Lewis
I can probably take credit for fixing this with the following patch. But that also means I can take credit for causing this problem as well :) See also Bug#42080 & Bug#41831. 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/63294 2959 Kevin Lewis 2009-01-14 Bug#42080, Bug#41831 In both of these bugs, the scavenger was pruning records that it should not have. The record version chosen to start pruning is returned from RecordScavenge::inventoryRecord(). This function is improved so that only the oldest visible record is returned. In addition, Recordversion::committedbefore() is added to simplify the code and read RecordVersion::transaction only once since it can be set to null at any time.
[15 May 2009 13:28]
MC Brown
Internal/test fix only. No changelog entry required.