Closed Bug 1213124 Opened 4 years ago Closed 4 years ago

4,000 instances of "WARNING: SQL statement should have been finalized before closing the connection" emitted from storage/mozStorageConnection.cpp during linux64 debug testing

Categories

(Toolkit :: Places, defect, P1)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: erahm, Unassigned)

References

Details

(Keywords: regression)

Cumulatively this warning [1] is the #2 most verbose during testing. This seems to be a regression from around 9/30 - 10/2.

Breakdown of different statements that are warning (note these are just the first lines, they may differ in there full form). Most appear to be bookmarks related:

> 980 [NNNNN] WARNING: SQL statement 'SELECT b.guid, IFNULL(p.guid, "") AS parentGuid, b.position AS 'index',
> 500 [NNNNN] WARNING: SQL statement 'WITH RECURSIVE
> 495 [NNNNN] WARNING: SQL statement 'INSERT OR IGNORE INTO moz_places (url, rev_host, hidden, frecency, guid)
> 490 [NNNNN] WARNING: SQL statement 'UPDATE moz_bookmarks SET position = position + 1
> 490 [NNNNN] WARNING: SQL statement 'SELECT b.id, b.guid from moz_bookmarks b WHERE b.guid = :guid LIMIT 1' (NNNNNNNN) should have been finalized before closing the connection: file storage/mozStorageConnection.cpp, line 1009
> 490 [NNNNN] WARNING: SQL statement 'SELECT GENERATE_GUID() AS guid' (NNNNNNNN) should have been finalized before closing the connection: file storage/mozStorageConnection.cpp, line 1009
> 490 [NNNNN] WARNING: SQL statement 'INSERT INTO moz_bookmarks (fk, type, parent, position, title,
>  10 [NNNNN] WARNING: SQL statement 'DELETE FROM moz_items_annos
>   5 [NNNNN] WARNING: SQL statement 'UPDATE moz_bookmarks SET position = position - 1 WHERE
>   5 [NNNNN] WARNING: SQL statement 'INSERT INTO moz_keywords (keyword, place_id, post_data)
>   5 [NNNNN] WARNING: SQL statement 'DELETE FROM moz_bookmarks WHERE guid = :guid' (NNNNNNNN) should have been finalized before closing the connection: file storage/mozStorageConnection.cpp, line 1009
>   5 [NNNNN] WARNING: SQL statement 'DELETE FROM moz_anno_attributes
>   5 [NNNNN] WARNING: SQL statement '/* do not warn (bug no): not worth to add an index */
>   4 [NNNNN] WARNING: SQL statement 'SELECT id, place_id, visit_date / 1000 AS date, visit_type FROM moz_historyvisits
>   3 [NNNNN] WARNING: SQL statement 'UPDATE moz_bookmarks SET lastModified = :time
>   2 [NNNNN] WARNING: SQL statement 'SELECT b.id, b.guid from moz_bookmarks b WHERE b.id = :id LIMIT 1' (NNNNNNNN) should have been finalized before closing the connection: file storage/mozStorageConnection.cpp, line 1009
>   1 [NNNNN] WARNING: SQL statement 'UPDATE moz_bookmarks

[1] https://hg.mozilla.org/mozilla-central/annotate/1f4cf75c894862cf3634d6014d8de9c807a054a7/storage/mozStorageConnection.cpp#l1009
David, any idea who would know more about this?
Flags: needinfo?(dteller)
I guess mak, although there is a chance that bug 1089695 (i.e. me) might be the culprit.
Flags: needinfo?(dteller)
we are again not closing the database properly? sigh :(

Yes, it's very likely a regression from bug 1089695.

David, any time to look into this?
Blocks: 1089695
Component: Storage → Places
Flags: needinfo?(dteller)
Keywords: regression
It's most likely the small patch that fixed shutdown dependencies (or was supposed to).
Sadly, I'm not sure I'm going to have time to work on this within a few weeks.
Flags: needinfo?(dteller)
Priority: -- → P1
Blocks: 1215885
I expect that bug 1215885 has fixed this. Eric, could you confirm?
No longer blocks: 1215885
Depends on: 1215885
Flags: needinfo?(erahm)
Looks good, thank you David!
Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(erahm)
Resolution: --- → FIXED
I wonder if we should put an assert there, so in future shutdown breakage doesn't get unnoticed until someone notices warnings...
Blocks: 1220113
I filed bug 1220113 to evaluate that.
You need to log in before you can comment on or make changes to this bug.