Closed Bug 708762 Opened 13 years ago Closed 10 years ago

high heap-unclassified at news.yahoo.com

Categories

(Firefox :: General, defect)

8 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 16

People

(Reporter: q1, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [MemShrink:P3])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.24) Gecko/20111103 Firefox/3.6.24
Build ID: 20111103063747

Steps to reproduce:

1. Create a new profile and start Firefox using it. Make sure NO extensions are installed.
2. Open about:memory.
3. Open news.yahoo.com in a different window.
4. Click on an active story.
5. Scroll to the comments section of the story by searching for "all comments".
6. Open Process Explorer & locate the Firefox process.
7. Click "minimize memory usage" in the "about:memory" window, noting the resulting values for heap-unclassified and the "private bytes" value in Process Explorer.
8. Click "shared on Facebook", then "all comments", then "shared on Facebook" again, then "all comments", etc., clicking 1500 times total. This will take awhile.
9. Measure the memory size values each 100 clicks.  Measure the "about:memory" memory size values by refreshing the "about:memory" window.
10. Click "minimize memory usage" and measure the final values again.



Actual results:

Total private bytes grows by ~200 KB/click and heap-unclassified grows by ~100 KB/click:

# clicks      heap-unclassified (MB)      private bytes (MB)

      0                  21.1                           140.2
   100                  45.4                           184.8
   200                  50.0                           215.9
   300                  67.4                           233.3
   400                  77.0                           249.3
   500                  89.6                           270.4
   600                  95.7                           283.2
   700                 100.4                           293.6
   800                 111.4                           307.5
   900                 120.4                           329.2
  1000                 125.4                           351.3
  1100                 138.3                           365.6
  1200                 152.9                           389.9
  1300                 155.2                           400.2
  1400                 171.5                           423.3
  1500                 182.1                           441.6

  1500                 172.3                           441.9
  (after clicking "minimize memory usage")

                          



Expected results:

1. heap-unclassified should not have grown significantly from its initial value.

2. It's unclear whether other contributors to private bytes should have grown significantly. Comments by Justin Lebar in https://bugzilla.mozilla.org/show_bug.cgi?id=703952 contend that the news.yahoo.com compartment (see attached verbose about:memory dump) -- which contained 141.4MB after 1500 clicks -- grew because of an unidentified bug in news.yahoo.com, not a bug in Firefox. He notes that Chrome shows indications of similar unbounded memory usage growth under testing similar to (but briefer than) the above.
See Also: → 703952
Whiteboard: [MemShrink]
Summary: heap-unclassified memory leak at news.yahoo.com → high heap-unclassified at news.yahoo.com
One of the existing dark matter blockers probably covers this (I bet CSS or DOM), so we'll make it a MemShrink:P3 for now.
Depends on: DMD
Whiteboard: [MemShrink] → [MemShrink:P3]
I'm not seeing any comments on any news.yahoo.com stories here. What am I missing?
(In reply to Johnny Stenback (:jst, jst@mozilla.com) from comment #2)
> I'm not seeing any comments on any news.yahoo.com stories here. What am I
> missing?

Yahoo has temporarily disabled the feature, saying:
<blockquote>To Yahoo! News readers: We're having problems with Reading Activity and Commenting features on our site. We're working to re-enable them as soon as possible. We apologize for any inconvenience.</blockquote>
They must have realized they're leaking :)
(In reply to Nicholas Nethercote [:njn] from comment #4)
> They must have realized they're leaking :)

Maybe. In any case, they seem to have re-enabled commenting now, though service might be spotty.
Ok, the comments are back, and with my patches for bug 704623 I'm seeing the page holding on to orphan DOM nodes. I clicked back and fourth between "shared on Facebook" and "all comments" a couple of dozen times and the orphan node memory usage for news.yahoo.com is up to 300k+, and that number keeps growing as I click more. So this looks like a site bug where they're holding orphan DOM nodes alive in their JS.

Confirming bug, but I doubt there's much we can do here other than evangelize.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Sounds like this bug should be a dupe of bug 704623 (which will fix the heap-unclassified), and bug 703952 should be moved over to evang.
> Sounds like this bug should be a dupe of bug 704623 (which will fix the
> heap-unclassified), and bug 703952 should be moved over to evang.

Given that both of those bugs have been resolved, I will resolve this.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 16
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: