Closed Bug 1805529 Opened 1 year ago Closed 1 year ago

The Sqlite.sys.mjs module may open connections too late on shutdown

Categories

(Toolkit :: Storage, defect, P3)

defect

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: mak, Assigned: mak)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

There's 2 problems:

  1. There may be a delay between AsyncShutdown setting _done = true in the PromiseSet and Sqlite.sys.mjs setting isClosed.
  2. We may check isClosed it's still false, then we invoke openAsyncDatabase (or asyncClone) that us asynchronous, by the time the callback returns the handle, isClosed is now true. The consumer will receive the connection and may try to add a shutdown blocker to close it, but it's too late. It's better to close the connection if by the time we get it it's too late.
Component: Preferences → Storage
Assignee: nobody → mak
Attachment #9308109 - Attachment description: WIP: Bug 1805529 - The Sqlite.sys.mjs module may open connections too late on shutdown. → Bug 1805529 - The Sqlite.sys.mjs module may open connections too late on shutdown. r=gijs
Status: NEW → ASSIGNED
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/4d1f87d5eb0e
The Sqlite.sys.mjs module may open connections too late on shutdown. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: