Closed Bug 782881 Opened 12 years ago Closed 12 years ago

Protect against attempts to use the Add-ons Manager APIs after shutdown.

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: Unfocused, Assigned: mossop)

References

Details

Attachments

(1 file)

Split off from bug 671894, since it's separate enough for its own bug. Comment from bug 671894 comment 31 describing this: > Been trying to figure out potential problems and solutions here. One thing > I've seen in a number of logs is evidence of something attempting to access > the add-ons manager after it has been shutdown. I can only guess at three > causes for this, a fault in our code, or some add-on either shutting down > the add-ons manager itself or calling it during shutdown. Either that or an > async operation is waiting to complete when we start shutdown and completes > after, trying to use the DB again in the process. > > When this happens the DB is already locked and so we attempt to delete it > and recreate from scratch to continue, but since the add-ons manager is > shutdown most of the variables we need are uninitialised so this fails > probably leaving an empty DB in the profile. This is probably why some > people see empty add-ons lists until they install a new add-on (causes a > complete re-scan of the profile). > > This first patch attempts to protect against a lot of this. It removes the > currently fairly visible API to shutdown the add-ons manager (it's still > possible to do, just harder) and rejects any attempts to use the API while > it is shutdown.
Blocks: 671894
Attached patch Patch v2 (deleted) — Splinter Review
Patch from bug 671894. Carrying over review, as all I did was fix the bitrot.
Attachment #652020 - Flags: review+
Bah, backed out thanks to orange on *everything* for debug builds (opt builds are all fine): https://hg.mozilla.org/integration/fx-team/rev/7a847385e42b Seeing this everywhere: Assertion failure: !connections[i]->ConnectionReady(), at ../../../storage/src/mozStorageService.cpp:853 That seems to be happening on shutdown. Example logs: https://tbpl.mozilla.org/php/getParsedLog.php?id=14393594&full=1&branch=fx-team#error0 https://tbpl.mozilla.org/php/getParsedLog.php?id=14395245&tree=Fx-Team&full=1#error0
Assignee: dtownsend+bugmail → bmcbride
Whiteboard: [backed out]
That was due to a typo in AddonManagerInternal.observe(), causing AddonManagerInternal.shutdown() to never be called. Going to run this through Try just to be sure.
Assignee: bmcbride → dtownsend+bugmail
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Depends on: 788378
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: