Safebrowsing should shut down sooner if possible




Safe Browsing
8 years ago
4 years ago


(Reporter: Ben Turner (not reading bugmail, use the needinfo flag!), Unassigned)


Firefox Tracking Flags

(Not tracked)



(1 attachment)

Created attachment 408468 [details]
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.

Comment 1

8 years ago
I think

Comment 2

8 years ago
whoops, I think if we switch the mozStorage to executeAsync, we can cancel the current query? is that right sdwilsh?

Comment 3

8 years ago
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?

Comment 4

8 years ago
Looks like there is a "cancelUpdate" call in the dbService:
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.

Comment 6

8 years ago
Looks like there is an observer registered for xpcom-shutdown-threads

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. :)
Last Resolved: 5 years ago
Resolution: --- → INVALID


4 years ago
Component: Phishing Protection → Phishing Protection
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.