Better support for Fission content processes in about:memory
Categories
(Toolkit :: about:memory, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox80 | --- | fixed |
People
(Reporter: mccr8, Assigned: Yoric)
References
Details
Attachments
(1 file, 1 obsolete file)
kmag suggested the support for Fission could be improved in about:memory. Specifically, we could indicate more specific than "Web Content" for Fission processes. It sounded like maybe he was thinking of putting the URL in there? (Which would need to be anonymized if that was enabled.) I'm not sure how well that will work with the index, given how there's not much room.
Comment 1•6 years ago
|
||
Tentatively assigning to the M5 dogfooding milestone because this about:memory information would be helpful for dogfood testers.
Comment 3•6 years ago
|
||
Moving to Fission Nightly (M6)
TBD: How might we redesign about:memory to scale to many iframe processes?
Comment 4•5 years ago
|
||
Yoric, perhaps you can work on this bug to improve about:memory for Fission after about:processes?
This bug is a Fission Nightly blocker (milestone M6c).
| Assignee | ||
Comment 5•5 years ago
|
||
Works for me.
mccr8, why do we need to anonymize?
| Reporter | ||
Comment 6•5 years ago
|
||
Memory reports get included in crash reports.
| Assignee | ||
Comment 7•5 years ago
•
|
||
(In reply to Andrew McCreight [:mccr8] from comment #6)
Memory reports get included in crash reports.
But we can patch just the output of about:memory without patching the memory reports, right? Or are there some hardcoded shenanigans involved?
kmag, to clarify, is the objective to expand the data made available in the actual about:memory page or in the memory crash reports?
| Assignee | ||
Updated•5 years ago
|
| Reporter | ||
Comment 8•5 years ago
|
||
(In reply to David Teller [:Yoric] (please use "needinfo") from comment #7)
But we can patch just the output of
about:memorywithout patching the memory reports, right? Or are there some hardcoded shenanigans involved?
Anonymity is a property of an individual memory report. You have to check the aAnonymize flag when generating the report. Here's an example.
| Assignee | ||
Comment 9•5 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #8)
(In reply to David Teller [:Yoric] (please use "needinfo") from comment #7)
But we can patch just the output of
about:memorywithout patching the memory reports, right? Or are there some hardcoded shenanigans involved?Anonymity is a property of an individual memory report. You have to check the aAnonymize flag when generating the report. Here's an example.
So you suggest I patch CollectReports rather than patching about:memory itself, right?
| Reporter | ||
Comment 10•5 years ago
|
||
(In reply to David Teller [:Yoric] (please use "needinfo") from comment #9)
So you suggest I patch
CollectReportsrather than patchingabout:memoryitself, right?
I'm not sure what you mean. This extra information should be added to the memory reports. about:memory itself just loads a memory report. I don't think it adds extra information.
| Assignee | ||
Comment 11•5 years ago
|
||
Well, that's my entire question :) It should be fairly easy to patch about:memory (the page) to add data only in the UX. If this data is never meant to be added to other kinds of memory reports, it might (or might not) be simpler/better.
| Assignee | ||
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
Comment 15•5 years ago
|
||
Backed out changeset 4311c3df8803 for causing failures in aboutmemory.
Backout link: https://hg.mozilla.org/integration/autoland/rev/010cfd3c3b562bad64d115d5fe7ba09522d22e65
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=304384299&repo=autoland&lineNumber=110076
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 16•5 years ago
|
||
Andrew, my code seems to add one instance of vsize, heap-allocated, resident... which cause all the tests to fail. Do you have an idea what could be going on?
| Reporter | ||
Comment 17•5 years ago
|
||
I don't know anything about these tests. Maybe they are doing some kind of canonicalization that combines together reports from the same process type, and your patch is breaking that?
njn might have some guesses.
Comment 18•5 years ago
|
||
Several of the tests collate all the vsize/resident/whatever measurements and check if there are the expected number, which corresponds to the number of processes. If you have changed the number of processes that are alive, or you have somehow broken memory reporting of those measurements for some processes, then you will see failures along those lines.
Having said all that, I see failures like "typeError: can't access property "length", endOfBrowsers is null" which suggests something a bit deeper is going on. I don't know why the very simple patch could cause any of the above, though.
| Assignee | ||
Comment 19•5 years ago
|
||
What do you mean collate? Could it somehow end merging two reports from processes that have the same name (minus pid)? So far, it's the only hypothesis that seems to make sense.
Having said all that, I see failures like "typeError: can't access property "length", endOfBrowsers is null" which suggests something a bit deeper is going on. I don't know why the very simple patch could cause any of the above, though.
Apparently, there's code in the tests that turns one-element arrays into their first/single value. I'm fairly sure that this is what causes the error messages because we end up with two items instead of one.
| Assignee | ||
Comment 20•5 years ago
|
||
Ok, about:memory does seem to merge information from processes that have the exact same name.
Is this a behavior I need to preserve? If so, I'll need to rework my patch a bit.
| Reporter | ||
Comment 21•5 years ago
|
||
(In reply to David Teller [:Yoric] (please use "needinfo") from comment #20)
Is this a behavior I need to preserve? If so, I'll need to rework my patch a bit.
about:memory includes the pid in the process name right now, so it isn't actually combining anything. I'm guessing the merging only happens in some kind of testing mode? Presumably it is doing something in testing mode that excludes the pid, so presumably when you exclude the pid you could also exclude the URL from the process name.
Comment 23•5 years ago
|
||
There is code in some of the tests to filter out the PIDs, e.g. here.
| Assignee | ||
Comment 25•5 years ago
|
||
The changes in ContentChild.cpp seem to accidentally undo some of the changes that required Bug 1634987. This patch attempts to update the tests to the new reality.
| Assignee | ||
Comment 26•5 years ago
|
||
Things are odd. Several about:memory tests fail on my machine from mozilla-central.
Maybe it's because I'm on macOS Catalina?
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 27•5 years ago
|
||
Comment 28•5 years ago
|
||
Backed out changeset 09ce524559da (bug 1597562) for failures in awsy/test_base_memory_usage.py. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=305916862&repo=autoland&lineNumber=1238
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedTaskRun=HOLAl5FvRJi6nOOxLORywQ-0&revision=09ce524559daedac82944e7e71ea2dfc6c27aa3a
Backout:
https://hg.mozilla.org/integration/autoland/rev/32e2e5441bf670337149667d658945e873fdfcdf
| Assignee | ||
Comment 29•5 years ago
|
||
That's... interesting.
jmaher, do you know how I can launch that test?
Comment 30•5 years ago
|
||
I assume ./mach awsy-test --help will point you in the right direction
| Assignee | ||
Comment 31•5 years ago
|
||
Thanks.
Well, as expected, the tests fail on my machine even pre-patch. I'll wait until I have received my Linux desktop to resume work on this bug.
Comment 32•5 years ago
•
|
||
David, for this test you can run the follow for a quick sanity check: ./mach awsy-test --per-tab-pause 1 --settle-wait-time 1 testing/awsy/awsy/test_base_memory_usage.py
The failure points to process_perf_data:
[task 2020-06-11T11:16:48.593Z] 11:16:48 INFO - TEST-UNEXPECTED-ERROR | awsy/test_base_memory_usage.py TestMemoryUsage.test_open_tabs | IndexError: list index out of range
...
[task 2020-06-11T11:16:48.594Z] 11:16:48 INFO - File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/awsy/process_perf_data.py", line 52, in median
[task 2020-06-11T11:16:48.594Z] 11:16:48 INFO - return (sorted_[med - 1] + sorted_[med]) / 2
My guess is the list of values is empty leading ot an out of bounds acesss. We limit this value to only process that have the name Web Content. Did you change the name to not contain that string?
Comment 33•5 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:Yoric, could you have a look please?
For more information, please visit auto_nag documentation.
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 34•5 years ago
•
|
||
(In reply to Eric Rahm [:erahm] from comment #32)
My guess is the list of values is empty leading ot an out of bounds acesss. We limit this value to only process that have the name
Web Content. Did you change the name to not contain that string?
Yes, under Fission, we're using a more detailed list of types. So, under Fission, Web Content => web, but without Fission, it remains Web Content. Trying to find out where we're using that string.
Comment 35•5 years ago
|
||
Comment 36•5 years ago
|
||
| bugherder | ||
Description
•