Bug #41035 | Running iuds6.tst is crashing Falcon | ||
---|---|---|---|
Submitted: | 25 Nov 2008 22:17 | Modified: | 15 May 2009 13:24 |
Reporter: | Hakan Küçükyılmaz | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Falcon storage engine | Severity: | S1 (Critical) |
Version: | mysql-6.0-falcon | OS: | Linux |
Assigned to: | Kevin Lewis | CPU Architecture: | Any |
Tags: | F_RECORD TREE |
[25 Nov 2008 22:17]
Hakan Küçükyılmaz
[25 Nov 2008 22:26]
Hakan Küçükyılmaz
Output of "thread apply all bt full"
Attachment: gdb.txt.gz (application/x-gzip, text), 43.67 KiB.
[16 Dec 2008 15:45]
Sveta Smirnova
Thank you for the report. I can not repeat described behavior with mysql-6.0-falcon-team tree built today on RedHat 64-bit machine. Please indicate which OS do you run?
[16 Dec 2008 15:49]
Kevin Lewis
I think I can verify this based on the call stack. The call stack crashed in a call to Sync::lock() on a bad syncPrior pointer. I think I can see how this could happen. Table::garbageCollect is called during a Transaction::rollback() for a newly inserted record. Table::garbageCollect will try to lock one of the syncPrior objects in the syncPriorVersions array. It chooses this in Table::getSyncPrior() based on the recordNumber. But there is no provision for a recordNumber of -1. Newly inserted record numbers get assigned a record number of -1 when they are created in allocRecordVersion(), (assigned in the constructor). The recordNumber is not added to the record object until Dbb::insertStub() is called. If something goes wrong with the insert after the record was created but before insertStub is called, the record will have a recordNumber of -1. Table::getSyncPrior() will return a bad pointer if recordNumber is -1. I'm still not certain how this record could have survived the insert to be garbage collected during the transaction::rollback with a recordNumber==-1, but I am pretty sure that fixing Table::getSyncPrior() to watch for negative recordNumbers will fix this bug.
[16 Dec 2008 16:01]
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/61782 2936 Kevin Lewis 2008-12-16 Bug#41035 - It is possible for record objects to contain a recordNumber == -1. Table::getSyncPrior() is not prepared for this and will return a bad pointer.
[16 Dec 2008 20:36]
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/61819 2936 Kevin Lewis 2008-12-16 (no message)
[15 May 2009 13:24]
MC Brown
Internal/test fix. No changelog entry required.