Leaking Shmem with NoSwap canvas update

RESOLVED FIXED in Firefox 23

Status

()

Core
Graphics: Layers
--
major
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mattwoodrow, Assigned: snorp)

Tracking

(Blocks: 2 bugs, {regression, reproducible})

23 Branch
mozilla24
regression, reproducible
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox22 unaffected, firefox23+ fixed, firefox24 fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
Created attachment 748629 [details] [diff] [review]
Simple fix

This is a regression from bug 863223.

When we send the transaction, we add the Shmem to the changeset and clear our local reference to it.

On the compositor side, we give the Shmem to the ImageHost, which uploads to the texture from it and then creates a reply to send it back.

Since this is a no-reply transaction, we don't bother to send the reply and we leak instead.

What was the intended behaviour here? To create a new shmem every frame (and have the compositor free it), or to keep re-using it (and require that the compositor finish copying from it during the transaction).

We should also probably send this intention over IPC so that the compositor knows that it shouldn't be writing a reply. And assert that no reply changesets are generated.

Attached is a simple fix that just makes sure we hang onto a copy of the Shmem so we can release it.
Duplicate of this bug: 870165
Created attachment 749313 [details] [diff] [review]
Sends 2d transactions synchronously and webgl ones async

This bug is a regression from my patch for 863223. I accidentally made 2d canvas transaction async instead of webgl ones.
Assignee: nobody → snorp
Attachment #749313 - Flags: review?(matt.woodrow)

Updated

5 years ago
Severity: normal → major
status-firefox22: --- → unaffected
status-firefox23: --- → affected
status-firefox24: --- → affected
tracking-firefox23: --- → ?
Keywords: regression
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → 23 Branch

Updated

5 years ago
Attachment #749313 - Attachment is patch: true
Attachment #749313 - Attachment mime type: text/x-patch → text/plain

Updated

5 years ago
Attachment #749313 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/d63027c3baa8
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24

Updated

5 years ago
status-firefox24: affected → fixed

Updated

5 years ago
Blocks: 872208
Duplicate of this bug: 873333
Aurora?
tracking-firefox23: ? → +

Comment 7

5 years ago
It makes bug 760394 spike in 23.0a2.
Blocks: 760394

Updated

5 years ago
Blocks: 817965
^
Flags: needinfo?(snorp)

Updated

5 years ago
Keywords: reproducible
Comment on attachment 749313 [details] [diff] [review]
Sends 2d transactions synchronously and webgl ones async

[Approval Request Comment]
Low risk, fixes gigantic memory leak when using 2d canvas. Been on m-c for a couple weeks without issues.
Attachment #749313 - Flags: approval-mozilla-aurora?
Flags: needinfo?(snorp)
Attachment #749313 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.