Bug 16876

Summary: Reproducible assertion failure in SQLTransaction::performNextStep()
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, ddkilzer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
test case (assertion failure) none

Description Alexey Proskuryakov 2008-01-15 01:34:19 PST
Steps to reproduce:
1. Open <http://webkit.org/misc/DatabaseExample.html>
2. Start opening and closing notes.

Pretty soon, an assertion fails:
ASSERTION FAILED: m_nextStep == &SQLTransaction::openTransactionAndPreflight || m_nextStep == &SQLTransaction::runStatements || m_nextStep == &SQLTransaction::postflightAndCommit || m_nextStep == &SQLTransaction::cleanupAfterTransactionErrorCallback
(/Users/ap/Safari/OpenSource/WebCore/storage/SQLTransaction.cpp:95 bool WebCore::SQLTransaction::performNextStep())
Comment 1 Alexey Proskuryakov 2008-01-15 01:38:34 PST
It's worth noting that the assertion fails when closing a note. I've just got a failure after the very first attempt to close a note, without opening any:

[Session started at 2008-01-15 12:36:42 +0300.]
Iteration of main loop for DatabaseThread 0x19377970
Performing DatabaseTask 0x14df39b0
Opening and preflighting transaction 0x14de2260
SQL - prepare - PRAGMA max_page_count = 5120
SQL - step - PRAGMA max_page_count = 5120
SQL - finalize - PRAGMA max_page_count = 5120
SQL - prepare - BEGIN;
SQL - step - BEGIN;
SQL - finalize - BEGIN;
Performing DatabaseTask 0x14de5680
ASSERTION FAILED: m_nextStep == &SQLTransaction::openTransactionAndPreflight || m_nextStep == &SQLTransaction::runStatements || m_nextStep == &SQLTransaction::postflightAndCommit || m_nextStep == &SQLTransaction::cleanupAfterTransactionErrorCallback
(/Users/ap/Safari/OpenSource/WebCore/storage/SQLTransaction.cpp:95 bool WebCore::SQLTransaction::performNextStep())


Comment 2 Alexey Proskuryakov 2008-01-15 02:30:22 PST
(gdb) p m_currentTransaction->m_ptr->m_nextStep
$3 = {
  __pfn = 0x203777e <WebCore::SQLTransaction::deliverTransactionCallback()>, 
  __delta = 0
}

Comment 3 Alexey Proskuryakov 2008-01-15 02:58:01 PST
Created attachment 18455 [details]
test case (assertion failure)

With the test, I'm seeing a different next step, but the underlying problem is probably the same.

(gdb) p m_currentTransaction->m_ptr->m_nextStep
$2 = {
  __pfn = 0x2038250 <WebCore::SQLTransaction::runStatements()>, 
  __delta = 0
}
Comment 4 Mark Rowe (bdash) 2008-01-15 07:14:48 PST
<rdar://problem/5688428>
Comment 5 Timothy Hatcher 2008-01-30 14:28:11 PST
Landed a fix in r29872 and r29876.
Comment 6 Alexey Proskuryakov 2008-02-01 12:18:08 PST
This test still results in an assertion failure for me, filed bug 17140.