Closed Bug 559217 Opened 15 years ago Closed 14 years ago

Browser freezes due a lock contention across Places statements

Categories

(Toolkit :: Places, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5
Tracking Status
blocking2.0 --- final+

People

(Reporter: Dolske, Assigned: mak)

References

Details

(Keywords: dogfood)

Attachments

(3 files)

Attached file process sample output
I seem to be getting these freezes once or twice a day. Seems to happen most commonly shortly after starting the browser (or opening a bunch of tabs?), and maybe on shutdown. Samples have a similar pattern, usually docshell/history stuff is resetting a statement. These freezes usually last 15-30 seconds, which is really bad. :(
Attached file Another hang
This was maybe 30 seconds after restarting the browser, just 2 tabs, both had restored. I was clicking the amusing "did you mean recursion" link when you Google recursion, and after 2 or 3 clicks it froze again. My places.sqlite file is 65006592 bytes in size.
(In reply to comment #1) > This was maybe 30 seconds after restarting the browser, just 2 tabs, both had > restored. I was clicking the amusing "did you mean recursion" link when you > Google recursion, and after 2 or 3 clicks it froze again. My places.sqlite file > is 65006592 bytes in size. We should probably make this a pure async statement. We have a lock contention issue there.
Argh, these hangs are driving me crazy. :( sdwilsh, you said this was a simple fix, could you roll up a patch or reassign?
Assignee: nobody → sdwilsh
Keywords: dogfood
i'm unsure is Shawn was pointing to registerOpenPage, but even if it's sync that is writing to a temp table, it should not cause any hang. Having a list of the statements that are running in that moment would be great. i'd like to know what is this mozilla::storage::AsyncExecuteStatements::Run(). Make a backup of your places.sqlite so we don't lose the opportunity to reproduce this. Let's start chcking expiration: could you tell me the value of places.history.expiration.transient_current_max_pages Then run in the error console Components.utils.import("resource://gre/modules/PlacesDBUtils.jsm");PlacesDBUtils.checkAndFixDatabase(); and post the log that will come out after some seconds
The problem is the call to Reset on the main thread, which is called by ExecuteAsync (due to a scoper: http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/src/History.cpp#80). We really need to abandon the scoper if we've succeeded everything, so this turns into a two liner.
yeah that scoper should not be there, good catch
Stealing bug, Shawn will just review. I'm actually touching the same code to remove Storage deprecate APIs usage, thus since that bug is in review i have to enqueue things to aviod bitrotting.
Assignee: sdwilsh → mak77
Summary: Browser freezes due to Places statements → Browser freezes due a lock contentions across Places statements
Attached patch patch v1.0Splinter Review
Attachment #441772 - Flags: review?(sdwilsh)
Summary: Browser freezes due a lock contentions across Places statements → Browser freezes due a lock contention across Places statements
Attachment #441772 - Flags: review?(sdwilsh) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
Blocks: 563538
blocking2.0: ? → final+
Depends on: 546253
No longer depends on: 546253
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: