Closed Bug 790922 Opened 12 years ago Closed 5 years ago

android.database.sqlite.SQLiteDatabaseLockedException: database is locked: retrycount exceeded at android.database.sqlite.SQLiteQuery.nativeFillWindow(Native Method) on ICS

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
critical

Tracking

(firefox16 affected, firefox17 affected, firefox18 affected, firefox19 affected, firefox20 affected, firefox21 affected, firefox22 affected, firefox23 affected)

RESOLVED WONTFIX
Tracking Status
firefox16 --- affected
firefox17 --- affected
firefox18 --- affected
firefox19 --- affected
firefox20 --- affected
firefox21 --- affected
firefox22 --- affected
firefox23 --- affected

People

(Reporter: scoobidiver, Unassigned)

References

Details

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

Crash Data

There are 276 crashes across channels over the last four week, including bp-07bfd2c8-0672-4526-9d09-d2e242120913.
It's #260 top crasher in 15.0.1.

The first frames of the Java stack trace are:
android.database.sqlite.SQLiteDatabaseLockedException: database is locked: retrycount exceeded
	at android.database.sqlite.SQLiteQuery.nativeFillWindow(Native Method)
	at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:86)
	at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:164)
	at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:156)
	at android.content.ContentResolver.query(ContentResolver.java:317)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=android.database.sqlite.SQLiteDatabaseLockedException%3A+database+is+locked%3A+retrycount+exceeded+at+android.database.sqlite.SQLiteQuery.nativeFillWindow%28Native+Method%29
lucasr, could this be related to the locked SQLite database problems you had to workaround months ago? The Bookmarks DB is locked.

Here is the rest of the stack trace:

android.database.sqlite.SQLiteDatabaseLockedException: database is locked: retrycount exceeded
at android.database.sqlite.SQLiteQuery.nativeFillWindow(Native Method)
at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:86)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:164)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:156)
at android.content.ContentResolver.query(ContentResolver.java:317)
at org.mozilla.gecko.db.LocalBrowserDB.isBookmark(LocalBrowserDB.java:402)
at org.mozilla.gecko.db.BrowserDB.isBookmark(BrowserDB.java:142)
at org.mozilla.gecko.Tab$6.doInBackground(Tab.java:385)
at org.mozilla.gecko.Tab$6.doInBackground(Tab.java:381)
at org.mozilla.gecko.util.GeckoAsyncTask$BackgroundTaskRunnable.run(GeckoAsyncTask.java:34)
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)
(In reply to Chris Peterson (:cpeterson) from comment #1)
> Here is the rest of the stack trace:
If I didn't provide the full stack trace, it's because they are various. It can be:
android.database.sqlite.SQLiteDatabaseLockedException: database is locked: retrycount exceeded
	at android.database.sqlite.SQLiteQuery.nativeFillWindow(Native Method)
	at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:86)
	at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:164)
	at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:156)
	at android.content.ContentResolver.query(ContentResolver.java:318)
	at org.mozilla.gecko.db.LocalBrowserDB.filterAllSites(LocalBrowserDB.java:166)
	at org.mozilla.gecko.db.LocalBrowserDB.getTopSites(LocalBrowserDB.java:190)
	at org.mozilla.gecko.db.BrowserDB.getTopSites(BrowserDB.java:101)
	at org.mozilla.gecko.AboutHomeContent.loadTopSites(AboutHomeContent.java:257)
	at org.mozilla.gecko.AboutHomeContent.access$400(AboutHomeContent.java:59)
	at org.mozilla.gecko.AboutHomeContent$9.run(AboutHomeContent.java:288)
	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)

android.database.sqlite.SQLiteDatabaseLockedException: database is locked: retrycount exceeded
	at android.database.sqlite.SQLiteQuery.nativeFillWindow(Native Method)
	at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:86)
	at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:164)
	at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:156)
	at android.content.ContentResolver.query(ContentResolver.java:318)
	at org.mozilla.gecko.db.LocalBrowserDB.getUrlForKeyword(LocalBrowserDB.java:437)
	at org.mozilla.gecko.db.BrowserDB.getUrlForKeyword(BrowserDB.java:140)
	at org.mozilla.gecko.AwesomeBar.openUserEnteredAndFinish(AwesomeBar.java:361)
	at org.mozilla.gecko.AwesomeBar.access$300(AwesomeBar.java:50)
	at org.mozilla.gecko.AwesomeBar$5.onKey(AwesomeBar.java:197)
	at android.view.View.dispatchKeyEvent(View.java:5549)
	at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1246)

and so on.
oh, I didn't realize there was more than one database affected.

Lucas, do all these databases share the same SQLite file? Are these queries all contending for the same file?
Depends on: 843029
No longer depends on: 843029
Depends on: 843029
Still seeing this bug in 21 and down.  

I don't see this in 22 as of yet.  I think bug 843005 was patched to fix REL 11 and higher. and was pushed 4/09.  Is that correct?

There are crashes from 4/12 build : 
ex. https://crash-stats.mozilla.com/report/index/94c6fd56-4a71-4845-bb0f-45ead2130415 which show a REL of 15.
Crash Signature: [@ android.database.sqlite.SQLiteDatabaseLockedException: database is locked: retrycount exceeded at android.database.sqlite.SQLiteQuery.nativeFillWindow(Native Method)] → [@ android.database.sqlite.SQLiteDatabaseLockedException: database is locked: retrycount exceeded at android.database.sqlite.SQLiteQuery.nativeFillWindow(Native Method)] [@ android.database.sqlite.SQLiteDatabaseLockedException: database is locked: retryc…
It looks like in the last few days (since Apr 11), some volume of crashes have shifted from bug 752828 over to this one - across different releases, at least 20 and above.
This signature has scooped up between half and all of the decline of bug 752828 since the release of 20.0.1 and 21.0b2, apparently.
It's #32 crasher in 22.0 and #86 in 23.0b1 so no longer a top crash.
Keywords: topcrash
Interestingly, it looks like all those crashes have API level 15 and ARMv7, on all kinds of devices though, see the android devices split on the signature summary tab of https://crash-stats.mozilla.com/report/list?signature=android.database.sqlite.SQLiteDatabaseLockedException%3A%20database%20is%20locked%3A%20retrycount%20exceeded%20at%20android.database.sqlite.SQLiteQuery.nativeFillWindow%28Native%20Method%29
Blocks: 975024
Crash Signature: retrycount exceeded: at android.database.sqlite.SQLiteQuery.nativeFillWindow(Native Method) ] → retrycount exceeded: at android.database.sqlite.SQLiteQuery.nativeFillWindow(Native Method) ] [@ android.database.sqlite.SQLiteDatabaseLockedException: database is locked: retrycount exceeded at android.database.sqlite.SQLiteQuery.nativeFillWindow] [@ …
Closing because no crashes reported for 12 weeks.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
Closing because no crashes reported for 12 weeks.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.