Closed Bug 791441 Opened 12 years ago Closed 6 years ago

android.database.sqlite.SQLiteException: index bookmarks_type_deleted_index already exists: , while compiling: CREATE INDEX bookmarks_type_deleted_index ON bookmarks(type, deleted) at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)

Categories

(Firefox for Android Graveyard :: General, defect)

18 Branch
ARM
Android
defect
Not set
critical

Tracking

(firefox16 unaffected, firefox17- unaffected, firefox18- unaffected, firefox19 affected, firefox20 affected)

RESOLVED WONTFIX
Tracking Status
firefox16 --- unaffected
firefox17 - unaffected
firefox18 - unaffected
firefox19 --- affected
firefox20 --- affected

People

(Reporter: scoobidiver, Unassigned)

References

Details

(Keywords: crash, regression, Whiteboard: [native-crash][startupcrash])

Crash Data

It has been hit by three users.
It first appeared in 17.0a2/20120914 and 18.0a1/20120913. The regression ranges might be:
http://hg.mozilla.org/releases/mozilla-aurora/pushloghtml?fromchange=01054a593d3d&tochange=bd535573e384
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=6e78c3efd115&tochange=f36b93c70d05
It might be caused by bug 790608, which is odd.

Here is a crash report: bp-be8658a8-8458-4ae8-a9bd-fb2b82120914.

android.database.sqlite.SQLiteException: index bookmarks_type_deleted_index already exists: , while compiling: CREATE INDEX bookmarks_type_deleted_index ON bookmarks(type, deleted)
	at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
	at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:68)
	at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:134)
	at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram.java:361)
	at android.database.sqlite.SQLiteStatement.acquireAndLock(SQLiteStatement.java:260)
	at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:84)
	at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1899)
	at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1839)
	at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper.upgradeDatabaseFrom10to11(BrowserProvider.java:1061)
	at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper.onUpgrade(BrowserProvider.java:1115)
	at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:170)
	at org.mozilla.gecko.db.DBUtils.ensureDatabaseIsNotLocked(DBUtils.java:76)
	at org.mozilla.fennec.db.BrowserProvider.getDatabaseHelperForProfile(BrowserProvider.java:1210)
	at org.mozilla.fennec.db.BrowserProvider.getWritableDatabase(BrowserProvider.java:1260)
	at org.mozilla.fennec.db.BrowserProvider.update(BrowserProvider.java:1555)
	at android.content.ContentProvider$Transport.update(ContentProvider.java:219)
	at android.content.ContentResolver.update(ContentResolver.java:856)
	at org.mozilla.gecko.db.LocalBrowserDB.updateVisitedHistory(LocalBrowserDB.java:209)
	at org.mozilla.gecko.db.BrowserDB.updateVisitedHistory(BrowserDB.java:105)
	at org.mozilla.gecko.GlobalHistory.add(GlobalHistory.java:122)
	at org.mozilla.gecko.GeckoAppShell$16.run(GeckoAppShell.java:2014)
	at android.os.Handler.handleCallback(Handler.java:605)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:137)
	at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:31)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=android.database.sqlite.SQLiteException%3A+index+bookmarks_type_deleted_index+already+exists%3A+%2C+while+compiling%3A+CREATE+INDEX+bookmarks_type_deleted_index+ON+bookmarks%28type%2C+deleted%29+at+android.database.sqlite.SQLiteCompiledSql.native_compile%28Native+Method%29
More reports also at:
https://crash-stats.mozilla.com/report/list?signature=android.database.sqlite.SQLiteException%3A+index+bookmarks_type_deleted_index+already+exists%3A+CREATE+INDEX+bookmarks_type_deleted_index+ON+bookmarks%28type%2C+deleted%29+at+android.database.sqlite.SQLiteDatabase.native_execSQL%28Native+Method%29
Crash Signature: deleted) at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)] → deleted) at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)] [@ android.database.sqlite.SQLiteException: index bookmarks_type_deleted_index already exists: CREATE INDEX bookmarks_type_deleted_index ON bookmarks(type deleted) at an…
This SQLiteException looks like something you might be interested in.
Crashes happened in 18.0a1/20120912 later. The m-c regression range is:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=96287ad60bef&tochange=6e78c3efd115
No bugs belong to both.
With combined signatures, it's #6 top crasher in 17.0a2 and #5 in 18.0a1 considering crash signatures of bug 790139 as a single one.
tracking-fennec: --- → ?
Keywords: topcrash
I don't understand how this could be related to bug 790139, but the stack in this crash looks sane. Can you take a look Lucas?
Assignee: nobody → lucasr.at.mozilla
tracking-fennec: ? → 17+
(In reply to Mark Finkle (:mfinkle) from comment #5)
> I don't understand how this could be related to bug 790139
I haven't said that. Bug 790139 takes 10 top ranks in 17.0a2 and 18.0a1 because its signature moves with each builds, so this bug is wrongly ranked. Ranks in comment 4 are an extrapolation.
(In reply to Mark Finkle (:mfinkle) from comment #5)
> I don't understand how this could be related to bug 790139, but the stack in
> this crash looks sane. Can you take a look Lucas?

This index has been added in bug 768268. Will have a look.
It's #2 unfixed top crasher in 18.0a1.
Very strange. The index is created on an upgrade from schema version 10 to 11 or if the database is being created with version 11 from the start. There's probably some weird upgrade situation happening there. I need more specific STR in order to work on this.
Keywords: qawanted
Might cause upgrading issues from previous to 18?  Self note : need to keep an eye on this.
(In reply to Lucas Rocha (:lucasr) from comment #9)
> Very strange. The index is created on an upgrade from schema version 10 to
> 11 or if the database is being created with version 11 from the start.
> There's probably some weird upgrade situation happening there. I need more
> specific STR in order to work on this.

We'll continue to try to reproduce in QA. There are no speculative fixes or debug info that can be added at this point?
QA Contact: kbrosnan
Kevin, any luck coming up with STR here?  Added steps-wanted in case this has fallen off the radar.  We can talk more about it at Tuesday's channel meeting.
We're not seeing this on Beta/Release, only Nightly/Aurora. Kevin is guessing this may be related to the updater. Untracking regardless.
createBookmarksTable() is called here, in migrateBookmarksTable():

http://hg.mozilla.org/integration/mozilla-inbound/file/0c3592db8b44/mobile/android/base/db/BrowserProvider.java.in#l982

migrateBookmarksTable() is called when upgrading from 1->2, 3->4, or 6->7. So I imagine this will happen whenever we try to upgrade from 10->11 after that (since we also create the index in upgradeDatabaseFrom10to11()).
What versions did we make this upgrade last? (FxA X -> Y)
Bug 768268 was the 10->11 upgrade, which landed on Fx18. It was also uplifted to Fx16 and Fx17.
Bug 739514 was 6->7, and landed in Fx14. So perhaps you can hit this bug if you try going from Fx13 (or earlier) directly to Fx16 (or later)?
17.0 Beta is almost unaffected.
Version: Firefox 17 → Firefox 18
Yeah, this is probably another symptom of bug 794929.
Crash Signature: deleted) at android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method)] → deleted) at android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method)] [@ android.database.sqlite.SQLiteException: index bookmarks_type_deleted_index already exists at android.database.sqlite.SQLiteStatement.native_executeSql(Native Method)]
tracking-fennec: 17+ → 18+
There are no crashes in 18.0b1.
Don't think there's any safe thing we can do in 18 here. This is most likely a bug caused by upgrades from very old versions to latest. Also, no instances of this crash in 18 so far. Untracking.
tracking-fennec: 18+ → ---
Keywords: qawanted
Depends on: 821602
There are only a few crashes.
Keywords: topcrash
Assignee: lucasr.at.mozilla → nobody
Crash Signature: Method)] → Method)] [@ android.database.sqlite.SQLiteException: index bookmarks_type_deleted_index already exists: , while compiling: CREATE INDEX bookmarks_type_deleted_index ON bookmarks at android.database.sqlite.SQLiteCompiledSql.native_compile] [@ android.da…
Closing because no crash reported since 12 weeks.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Closing because no crash reported since 12 weeks.
Product: Firefox for Android → Firefox for Android Graveyard

Removing steps-wanted keyword because this bug has been resolved.

Keywords: steps-wanted

Removing steps-wanted keyword because this bug has been resolved.

You need to log in before you can comment on or make changes to this bug.