Closed Bug 524548 Opened 15 years ago Closed 11 years ago

Safebrowsing should shut down sooner if possible

Categories

(Toolkit :: Safe Browsing, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: bent.mozilla, Unassigned)

Details

Attachments

(1 file)

Attached file Shutdown stacks
On my windows VM sometimes shutdown takes forever. When I break I see that the main thread is waiting to join the safebrowsing thread, but it's still processing lots of updates and using sqlite extensively. I don't know anything about the architecture here but would it be possible to interrupt this processing and run the updates later?

I'll attach the stacks from both threads.
I think
whoops, I think if we switch the mozStorage to executeAsync, we can cancel the current query? is that right sdwilsh?
I'm wondering if you would create an observer that detects XPCOM shutdown each time you run the db update. If you detect XPCOM shutdown, you call reset() on the statement. Would that rollback the transaction, which would make url-classifier start over on the next startup?
You could do that with executeAsync, but in this case it doesn't matter.  You'd just want to stop processing any updates, and do it at next startup.
Looks like there is an observer registered for xpcom-shutdown-threads

http://mxr.mozilla.org/mozilla-central/source/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp#3962

Would we need to add another observer for 'xpcom-shutdown' explicitly?
The old sqlite DB is gone, I do hope the new one shuts down faster. :)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: