Closed
Bug 679240
Opened 13 years ago
Closed 13 years ago
[OOPP] Investigate issues system sleep might have on plugin timeouts
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jimm, Assigned: jimm)
References
Details
Attachments
(1 file, 13 obsolete files)
8.24 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
http://mxr.mozilla.org/mozilla-central/source/ipc/glue/WindowsMessageLoop.cpp#546 Plugin timeouts for both the parent and the child currently don't account for the possibility that a computer might sleep for an extended period during a WaitForNotify call. If this happens we would likely flush all the child processes. This bug is about figuring out what the issues are and hopefully putting together a fix.
I experience this while playing the game 'crime city' on google+. I leave the game open when putting the computer to sleep and after waking the computer back up I get the plugin crashed notification. The crash signatures are always [@ mozalloc_abort(char const* const) | msvcr80.dll@0xe456 ]
Assignee | ||
Comment 2•13 years ago
|
||
Wip of this work. I still have a few things to do- test on mac, break up the patch, and try to work up some tests for this.
Assignee: nobody → jmathies
Assignee | ||
Comment 3•13 years ago
|
||
Attachment #573647 -
Attachment is obsolete: true
Assignee | ||
Comment 4•13 years ago
|
||
Assignee | ||
Comment 5•13 years ago
|
||
Assignee | ||
Comment 6•13 years ago
|
||
Assignee | ||
Comment 7•13 years ago
|
||
bsmedberg, not sure if you're the right reviewer for this, but you seem to own toolkit and this is a new component, so..
Attachment #578232 -
Attachment is obsolete: true
Attachment #578234 -
Attachment is obsolete: true
Attachment #578236 -
Attachment is obsolete: true
Attachment #578237 -
Attachment is obsolete: true
Attachment #578369 -
Flags: review?(benjamin)
Assignee | ||
Comment 8•13 years ago
|
||
Assignee | ||
Comment 9•13 years ago
|
||
Assignee | ||
Comment 10•13 years ago
|
||
Assignee | ||
Comment 11•13 years ago
|
||
Assignee | ||
Comment 12•13 years ago
|
||
Attachment #578373 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Attachment #578375 -
Attachment is patch: true
Assignee | ||
Comment 13•13 years ago
|
||
bsmedberg, should this also get hooked up to the hang monitor? Looks like we might have a similar problem there if the timeout thread happens to exit it's wait before the event loop starts processing events. Probably not a common occurrence but might still happen occasionally. http://mxr.mozilla.org/mozilla-central/source/xpcom/threads/HangMonitor.cpp#52
Comment 14•13 years ago
|
||
Comment on attachment 578369 [details] [diff] [review] base singleton v.1 I'm torn about this: for the in-process hang monitor we simply wait twice for half the timeout length (e.g. two 15-second waits for a 30-second timeout), which gives you pretty much all of the reliability you need without something quite this complex. See bug 429592 comment 20 for some details. I've got some minor nitpicks on the patch, but can I get you to comment on the general approach first?
Assignee | ||
Comment 15•13 years ago
|
||
I originally just did up a simple singleton that fired observer events (similar to the old widget code) and added observer support to the channels, and figured that would be it. Then realized child processes didn't have observer service, so had to add the simple callback mechanism. I ended up using that on the channels for both sides of the connection to keep it simple. On chrome side we want this to always run which is conveniently taken care of by the xpcom observer subscription. That's really about it. Platform code should be pretty easy to understand. The current location (toolkit) I just sort of randomly picked, it seemed like the best place. We now have some hal battery code (just landed and was developed in tandem with this code) that duplicates some of the window/mac code. I plan to file a follow up to blend the two together somehow.
Comment 16•13 years ago
|
||
Comment on attachment 578369 [details] [diff] [review] base singleton v.1 My point is that I don't think we need this code at all for plugin timeouts. Perhaps we need it elsewhere in which case I can review it more thoroughly, but I'd like to try the simpler approach if possible first.
Attachment #578369 -
Flags: review?(benjamin)
Assignee | ||
Comment 17•13 years ago
|
||
Two stage timeout patch. Need to test a bit and push to try.
Attachment #578369 -
Attachment is obsolete: true
Attachment #578370 -
Attachment is obsolete: true
Attachment #578371 -
Attachment is obsolete: true
Attachment #578372 -
Attachment is obsolete: true
Attachment #578375 -
Attachment is obsolete: true
Assignee | ||
Comment 18•13 years ago
|
||
Cleaned up with less duplicate code.
Attachment #585874 -
Attachment is obsolete: true
Assignee | ||
Comment 19•13 years ago
|
||
Final patch which passes try. I looked for a way to write an ipdl test for this, but didn't see it. Once we're in a Call or Send we don't break out until both stages of the timeout complete, so there doesn't appear to be a way to test the state of mInTimeoutSecondHalf in the middle. We have hang tests already though which test timeouts which passed on try, so things seem to be working as expected.
Attachment #585887 -
Attachment is obsolete: true
Attachment #586038 -
Flags: review?(benjamin)
Updated•13 years ago
|
Attachment #586038 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 20•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/fdc667b43e11
Assignee | ||
Comment 21•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fdc667b43e11 This landed on Saturday but for some reason didn't get closed out.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•