Closed
Bug 1092844
Opened 11 years ago
Closed 11 years ago
Close execSQL() cursor to fix "Cursor finalized without being closed" warnings
Categories
(Firefox for Android Graveyard :: Data Providers, defect)
Tracking
(firefox35 wontfix, firefox36 fixed)
RESOLVED
FIXED
Firefox 36
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
Attachments
(2 files)
4.58 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
2.84 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
When I run a debug build of Fennec with a clean profile and Sync, adb logcat reports ~50 warnings about "Cursor finalized without being closed":
E/GeckoMatrixCursor( 9179): Cursor finalized without being closed
E/GeckoMatrixCursor( 9179): java.lang.RuntimeException: stack
E/GeckoMatrixCursor( 9179): at org.mozilla.gecko.sqlite.MatrixBlobCursor.finalize(MatrixBlobCursor.java:347)
E/GeckoMatrixCursor( 9179): at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:187)
E/GeckoMatrixCursor( 9179): at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:170)
E/GeckoMatrixCursor( 9179): at java.lang.Thread.run(Thread.java:841)
These unclosed cursors are from SQLiteBridge calling internalQuery() to execute (non-query) SQL statements without closing the returned cursor. This patch replaces some non-query uses of internalQuery() with execSQL() and then closes execSQL()'s cursor.
Here is a green Try run:
https://tbpl.mozilla.org/?tree=Try&rev=28598807bdaf
Attachment #8515669 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 1•11 years ago
|
||
Part 2: Log MatrixBlobCursor's allocation stack, instead of the finalization stack, with "Cursor finalized without being closed" warnings.
Tracking down the unclosed cursors was difficult because the "Cursor finalized without being closed" warnings logged the finalization stack trace, which is useless and always the same. This patch captures the allocation stack trace in MatrixBlobCursor's constructor in DEBUG builds, so the warning can log something useful.
Some other Fennec classes have finalizers that log similar warnings; perhaps this patch should morph (in this bug or a follow-up) into a more generic facility for logging finalizer warnings?
Attachment #8515670 -
Flags: review?(mark.finkle)
Comment 2•11 years ago
|
||
Comment on attachment 8515669 [details] [diff] [review]
part-1-close-execSQL-cursor.patch
Seems reasonable. TBPL logs don't seem to have any bad output.
Attachment #8515669 -
Flags: review?(mark.finkle) → review+
Updated•11 years ago
|
Attachment #8515670 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 3•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/cf90a2ce6a02
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b156eff26e7
status-firefox35:
--- → wontfix
status-firefox36:
--- → fixed
Comment 4•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/cf90a2ce6a02
https://hg.mozilla.org/mozilla-central/rev/6b156eff26e7
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 36
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•