Closed
Bug 1280436
Opened 9 years ago
Closed 9 years ago
Break reference cycle that results in memory leak
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
DUPLICATE
of bug 1280762
Tracking | Status | |
---|---|---|
firefox50 | --- | affected |
People
(Reporter: kats, Unassigned)
References
Details
(Whiteboard: [gfx-noted])
Attachments
(1 file)
886 bytes,
patch
|
Details | Diff | Splinter Review |
From bug 1261166 comment 22:
I discovered that there's a cyclical reference which is probably causing the leak.
LayerTransactionParent holds a RefPtr to LayerManagerComposite
LayerManagerComposite holds a RefPtr to CompositorOGL
Compositor holds a bunch of ShmemTextureReadLock instances in mUnlockAfterComposition
The ShmemTextureReadLock instances hold RefPtrs to LayerTransactionParent
(There's a bit more context in that bug).
Reporter | ||
Comment 1•9 years ago
|
||
Reporter | ||
Comment 2•9 years ago
|
||
So bug 1176011 didn't fix the crash that's introduced by this patch. Sotaro, do you have any other ideas on what could be going on here? The exact steps to reproduce the crash:
1) Start with current mozilla-central (on OS X)
2) Apply attachment 8763604 [details] [diff] [review] (from bug 1261166)
3) Apply attachment 8763075 [details] [diff] [review] (from this bug)
4) Do a debug build
5) Run ./mach mochitest -f plain --keep-open=false --setpref gfx.use-iosurface-textures=true gfx/layers/apz/test/mochitest/
The test runs but then it crashes on shutdown. If you skip step 3, you will get leaks on shutdown instead.
Flags: needinfo?(sotaro.ikeda.g)
Updated•9 years ago
|
Whiteboard: [gfx-noted]
Comment 3•9 years ago
|
||
I am going to check it.
Updated•9 years ago
|
Flags: needinfo?(sotaro.ikeda.g)
Comment 4•9 years ago
|
||
I am still waiting the debug build complete, but I seems to understand a cause of the crash. A peer of CompositorBridgeChild could be CrossProcessCompositorBridgeParent. Compositor::Destroy() is related to only to CompositorBridgeParent. When CrossProcessCompositorBridgeParent is destroyed, related Shmem also have to be destroyed and untouched after the destroy.
Flags: needinfo?(sotaro.ikeda.g)
Comment 5•9 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2)
> So bug 1176011 didn't fix the crash that's introduced by this patch. Sotaro,
> do you have any other ideas on what could be going on here? The exact steps
> to reproduce the crash:
>
> 1) Start with current mozilla-central (on OS X)
> 2) Apply attachment 8763604 [details] [diff] [review] (from bug 1261166)
> 3) Apply attachment 8763075 [details] [diff] [review] (from this bug)
> 4) Do a debug build
> 5) Run ./mach mochitest -f plain --keep-open=false --setpref
> gfx.use-iosurface-textures=true gfx/layers/apz/test/mochitest/
>
> The test runs but then it crashes on shutdown. If you skip step 3, you will
> get leaks on shutdown instead.
I tried several times, but I failed to reproduce the crash. :kats, can you try a patch in Bug 1280762?
Flags: needinfo?(bugmail.mozilla)
Reporter | ||
Comment 6•9 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #5)
> I tried several times, but I failed to reproduce the crash.
Note that it only happens on OS X.
> :kats, can you
> try a patch in Bug 1280762?
That patch seems to fix the issue! I used that patch instead of the one on this bug, since it looks like that already incorporates the changes from this bug.
Flags: needinfo?(bugmail.mozilla)
Reporter | ||
Comment 7•9 years ago
|
||
This seems like it's effectively a dupe of bug 1280762, so I'll close it as such.
Comment 8•9 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #6)
> (In reply to Sotaro Ikeda [:sotaro] from comment #5)
> > I tried several times, but I failed to reproduce the crash.
>
> Note that it only happens on OS X.
Yes, I checked on OS X.
You need to log in
before you can comment on or make changes to this bug.
Description
•