Open
Bug 948194
Opened 11 years ago
Updated 2 years ago
[e10s] Decoded Images seem to not be discarded on memory-pressure notification with e10s enabled
Categories
(Core :: Graphics: ImageLib, defect, P3)
Core
Graphics: ImageLib
Tracking
()
NEW
Tracking | Status | |
---|---|---|
e10s | + | --- |
People
(Reporter: markh, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 2 obsolete files)
3.25 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
7.28 KB,
patch
|
seth
:
review+
|
Details | Diff | Splinter Review |
5.38 KB,
patch
|
seth
:
review+
|
Details | Diff | Splinter Review |
The test browser_bug666317.js fails when e10s is enabled, reporting:
0:06.04 TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/image/test/browser/browser_bug666317.js | Image should be discarded.
I did a little debugging here. The memory-pressure notification makes its way down to the child process, and the 2 observers in imgLoader.cpp are called in both the parent and child processes, but still the test reports failure. I instrumented the test to use 1 second setTimeout() after sending the notification under the assumption that the cross-process forwarding of that notification introduced latency the test wasn't expecting, but the problem remains.
Updated•11 years ago
|
tracking-e10s:
--- → +
Updated•11 years ago
|
Blocks: old-e10s-m2
Updated•10 years ago
|
Assignee: nobody → mrbkap
Priority: -- → P2
Assignee: mrbkap → atifrea
Attachment #8469690 -
Flags: review?(mrbkap)
Comment 2•10 years ago
|
||
Comment on attachment 8469690 [details] [diff] [review]
Bug 948194: Re-write the test so that checking if the image is decoded takes place in the child allowing for the `memory-pressure` notification to be processed.
Review of attachment 8469690 [details] [diff] [review]:
-----------------------------------------------------------------
Tell me if you disagree with my comment... Also, don't forget to change image/test/browser/browser.ini to not skip this test if we're e10s!
I'll check in the next patch I see here.
::: image/test/browser/browser_bug666317.js
@@ +17,5 @@
> + let request = img.getRequest(Components.interfaces.nsIImageLoadingContent.CURRENT_REQUEST);
> + let result = request.imageStatus & Components.interfaces.imgIRequest.STATUS_FRAME_COMPLETE ? true : false;
> +
> + let msg_name = "test666317:isImgDecoded:Answer_Type_" + message.data.test;
> + message.target.sendAsyncMessage(msg_name, { result: result });
It'd probably be a little easier to have a single message and pass which test we're responding to in the "data" object.
Attachment #8469690 -
Flags: review?(mrbkap)
Attachment #8469690 -
Attachment is obsolete: true
Attachment #8470336 -
Flags: review?(mrbkap)
Comment 4•10 years ago
|
||
Comment on attachment 8470336 [details] [diff] [review]
Bug 948194: Re-write the test so that checking if the image is decoded takes place in the child allowing for the `memory-pressure` notification to be processed.
Review of attachment 8470336 [details] [diff] [review]:
-----------------------------------------------------------------
::: image/test/browser/browser.ini
@@ -7,5 @@
> image.html
> imageX2.html
> -
> -[browser_bug666317.js]
> -skip-if = e10s # Bug 948194 - Decoded Images seem to not be discarded on memory-pressure notification with e10s enabled
Oops, you only want to remove the skip-if line. Otherwise, we won't run these tests at all.
Attachment #8470336 -
Flags: review?(mrbkap)
Sorry about that. I didn't even notice those lines.
Attachment #8470336 -
Attachment is obsolete: true
Attachment #8470344 -
Flags: review?(mrbkap)
Updated•10 years ago
|
Attachment #8470344 -
Flags: review?(mrbkap) → review+
Comment 6•10 years ago
|
||
Moving old M2 P2 bugs to M4.
Comment 9•10 years ago
|
||
Blake, looks like this just needs to land?
Tried ni'ing atifrea@mozilla.com but that account is dead.
Flags: needinfo?(mrbkap)
Comment 10•10 years ago
|
||
Yes, my old account is dead. My current one is alex.tifrea93@gmail.com
Comment 11•10 years ago
|
||
I went to check this patch in to find that it had bitrotted badly. In un-bitrotting it, I ran into two bugs that were worth talking about.
The first is that on e10s only, tab switching no longer sends all of its notifications and events synchronously. This meant that the pattern |gBrowser.selectedTab = oldTab; /* expect newTab to be inactive */| was no longer correct in e10s.
The second is that now that we run the event loop (and send a low-memory notification) the chances of collecting the scripted image observer were much higher. I fixed this by holding a strong reference to it in the JS, but I'm a little worried that this will be a footgun in the future. I guess the two options are to hold a strong reference to it from imagelib and depend on JS calling cancelAndForgetObserver (or forgetting and leaking) or the opposite (and crashing if JS forgets). Seth, your comments are welcome :)
I'll attach a diff -w as well, since that's much easier to read.
Attachment #8528541 -
Flags: review?(seth)
Comment 12•10 years ago
|
||
Flags: needinfo?(mrbkap)
Comment 13•10 years ago
|
||
Comment on attachment 8528542 [details] [diff] [review]
patch -w
Review of attachment 8528542 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good! As I mentioned in person, it might be wise to push a try job rebased on top of the current mozilla-central, since some notification-related changes just landed.
::: image/test/browser/browser_bug666317.js
@@ +37,4 @@
>
> // Clone the current imgIRequest with our new observer.
> let request = currentRequest();
> + return [ request.clone(scriptedObserver), scriptedObserver ];
I'd suggest adding a comment here so readers know that we're doing this to make sure we have a live reference to the scriptedObserver. (I'm sure in a year I'll have forgotten what's going on here.)
Attachment #8528542 -
Flags: review+
Comment 14•10 years ago
|
||
Comment on attachment 8528541 [details] [diff] [review]
Rebased patch
Review of attachment 8528541 [details] [diff] [review]:
-----------------------------------------------------------------
(r+'ing based on the other version of the patch.)
Attachment #8528541 -
Flags: review?(seth) → review+
Comment 15•10 years ago
|
||
Comment 16•10 years ago
|
||
Comment 17•10 years ago
|
||
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/df5c7392ecbf, apparently it's still a bit racy.
https://treeherder.mozilla.org/logviewer.html#?job_id=4246502&repo=mozilla-inbound
https://treeherder.mozilla.org/logviewer.html#?job_id=4246633&repo=mozilla-inbound
https://treeherder.mozilla.org/logviewer.html#?job_id=4243982&repo=mozilla-inbound
https://treeherder.mozilla.org/logviewer.html#?job_id=4245287&repo=mozilla-inbound
https://treeherder.mozilla.org/logviewer.html#?job_id=4246996&repo=mozilla-inbound
https://treeherder.mozilla.org/logviewer.html#?job_id=4242575&repo=mozilla-inbound
https://treeherder.mozilla.org/logviewer.html#?job_id=4245378&repo=mozilla-inbound
Updated•10 years ago
|
Updated•9 years ago
|
Assignee: atifrea → mrbkap
Updated•9 years ago
|
Blocks: e10s-tests
Comment 18•9 years ago
|
||
This test is now disabled entirely for all platforms. I'm not going to work on it until we figure out how to make it work reliably.
Assignee: mrbkap → nobody
Comment 19•6 years ago
|
||
Moving to p3 because no activity for at least 1 year(s).
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•