Closed Bug 1246529 Opened 8 years ago Closed 8 years ago

Intermittent leakcheck | tab process: 4720 bytes leaked (SharedMemory)

Categories

(Core :: Graphics: Layers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
e10s + ---
firefox47 --- affected
firefox48 --- fixed

People

(Reporter: philor, Assigned: nical)

References

(Blocks 1 open bug)

Details

(Keywords: intermittent-failure, memory-leak, Whiteboard: [MemShrink:P2])

This is the #8 leak on OrangeFactor. It's also e10s-only. All of the occurrences I've been able to find are happening in browser/base/content/test/plugins.
Blocks: e10s-tests
tracking-e10s: --- → ?
Component: General → Plug-ins
*finally* got this on Try. Milan, the stacks looks gfx-y to me? But the failures only occur during the plugin browser-chrome tests.

 13:46:16     INFO -  Serial Numbers of Leaked Objects:
 13:46:16     INFO -  314 @0xa1140820 (1 references; 0 from COMPtrs)
 13:46:16     INFO -  allocation stack:
 13:46:16     INFO -  #00: mozilla::ipc::SharedMemory::AddRef() [ipc/glue/SharedMemory.h:89]
 13:46:16     INFO -  #01: mozilla::ipc::Shmem::Alloc(mozilla::ipc::Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead, unsigned int, mozilla::ipc::SharedMemory::SharedMemoryType, bool, bool) [mfbt/RefPtr.h:36]
 13:46:16     INFO -  #02: mozilla::layers::PCompositorChild::CreateSharedMemory(unsigned int, mozilla::ipc::SharedMemory::SharedMemoryType, bool, int*) [mfbt/AlreadyAddRefed.h:116]
 13:46:16     INFO -  #03: mozilla::layers::PLayerTransactionChild::CreateSharedMemory(unsigned int, mozilla::ipc::SharedMemory::SharedMemoryType, bool, int*) [obj-firefox/ipc/ipdl/PLayerTransactionChild.cpp:846]
 13:46:16     INFO -  #04: mozilla::layers::PLayerTransactionChild::AllocUnsafeShmem(unsigned int, mozilla::ipc::SharedMemory::SharedMemoryType, mozilla::ipc::Shmem*) [obj-firefox/ipc/ipdl/PLayerTransactionChild.cpp:1094]
 13:46:16     INFO -  #05: mozilla::layers::ShmemTextureData::Create(mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits>, mozilla::gfx::SurfaceFormat, mozilla::gfx::BackendType, mozilla::layers::TextureFlags, mozilla::layers::TextureAllocationFlags, mozilla::layers::ISurfaceAllocator*) [gfx/layers/BufferTexture.cpp:511]
 13:46:16     INFO -  #06: mozilla::layers::TextureClient::CreateForRawBufferAccess(mozilla::layers::ISurfaceAllocator*, mozilla::gfx::SurfaceFormat, mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits>, mozilla::gfx::BackendType, mozilla::layers::TextureFlags, mozilla::layers::TextureAllocationFlags) [gfx/layers/client/TextureClient.cpp:847]
 13:46:16     INFO -  #07: mozilla::layers::TextureClient::CreateForDrawing(mozilla::layers::CompositableForwarder*, mozilla::gfx::SurfaceFormat, mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits>, mozilla::layers::BackendSelector, mozilla::layers::TextureFlags, mozilla::layers::TextureAllocationFlags) [gfx/layers/client/TextureClient.cpp:811]
 13:46:16     INFO -  #08: mozilla::layers::CompositableClient::CreateTextureClientForDrawing(mozilla::gfx::SurfaceFormat, mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits>, mozilla::layers::BackendSelector, mozilla::layers::TextureFlags, mozilla::layers::TextureAllocationFlags) [gfx/layers/client/CompositableClient.cpp:230]
 13:46:16     INFO -  #09: mozilla::layers::SourceSurfaceImage::GetTextureClient(mozilla::layers::CompositableClient*) [mfbt/AlreadyAddRefed.h:116]
 13:46:16     INFO -  #10: mozilla::layers::ImageClientSingle::UpdateImage(mozilla::layers::ImageContainer*, unsigned int) [gfx/layers/client/ImageClient.cpp:180]
 13:46:16     INFO -  #11: mozilla::layers::ClientImageLayer::RenderLayer() [gfx/layers/client/ClientImageLayer.cpp:149]
 13:46:16     INFO -  #12: mozilla::layers::ClientLayer::RenderLayerWithReadback(mozilla::layers::ReadbackProcessor*) [gfx/layers/client/ClientLayerManager.h:391]
 13:46:16     INFO -  #13: mozilla::layers::ClientContainerLayer::RenderLayer() [gfx/gl/ScopedGLHelpers.h:345]
 13:46:16     INFO -  #14: mozilla::layers::ClientLayerManager::EndTransactionInternal(void (*)(mozilla::layers::PaintedLayer*, gfxContext*, mozilla::gfx::IntRegionTyped<mozilla::gfx::UnknownUnits> const&, mozilla::gfx::IntRegionTyped<mozilla::gfx::UnknownUnits> const&, mozilla::layers::DrawRegionClip, mozilla::gfx::IntRegionTyped<mozilla::gfx::UnknownUnits> const&, void*), void*, mozilla::layers::LayerManager::EndTransactionFlags) [gfx/layers/client/ClientLayerManager.cpp:282]
 13:46:16     INFO -  #15: mozilla::layers::ClientLayerManager::EndTransaction(void (*)(mozilla::layers::PaintedLayer*, gfxContext*, mozilla::gfx::IntRegionTyped<mozilla::gfx::UnknownUnits> const&, mozilla::gfx::IntRegionTyped<mozilla::gfx::UnknownUnits> const&, mozilla::layers::DrawRegionClip, mozilla::gfx::IntRegionTyped<mozilla::gfx::UnknownUnits> const&, void*), void*, mozilla::layers::LayerManager::EndTransactionFlags) [gfx/layers/client/ClientLayerManager.cpp:325]
 13:46:16     INFO -  #16: nsDisplayList::PaintRoot(nsDisplayListBuilder*, nsRenderingContext*, unsigned int) [layout/base/nsDisplayList.h:454]
 13:46:16     INFO -  #17: nsLayoutUtils::PaintFrame(nsRenderingContext*, nsIFrame*, nsRegion const&, unsigned int, unsigned int) [layout/base/nsLayoutUtils.cpp:3474]
 13:46:16     INFO -  #18: PresShell::Paint(nsView*, nsRegion const&, unsigned int) [layout/base/nsPresShell.cpp:6066]
 13:46:16     INFO -  #19: nsViewManager::ProcessPendingUpdatesPaint(nsIWidget*) [view/nsViewManager.cpp:467]
 13:46:16     INFO -  #20: nsViewManager::ProcessPendingUpdatesForView(nsView*, bool) [view/nsViewManager.cpp:398]
 13:46:16     INFO -  #21: nsViewManager::ProcessPendingUpdates() [view/nsViewManager.cpp:1100]
 13:46:16     INFO -  #22: nsRefreshDriver::Tick(long long, mozilla::TimeStamp) [layout/base/nsRefreshDriver.cpp:1896]
 13:46:16     INFO -  #23: mozilla::RefreshDriverTimer::TickRefreshDrivers(long long, mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver> >&) [layout/base/nsRefreshDriver.cpp:246]
 13:46:16     INFO -  #24: mozilla::RefreshDriverTimer::Tick(long long, mozilla::TimeStamp) [layout/base/nsRefreshDriver.cpp:267]
 13:46:16     INFO -  #25: mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::TickRefreshDriver(mozilla::TimeStamp) [layout/base/nsRefreshDriver.cpp:588]
 13:46:16     INFO -  #26: mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::TimeStamp) [layout/base/nsRefreshDriver.cpp:425]
 13:46:16     INFO -  #27: mozilla::layout::VsyncChild::RecvNotify(mozilla::TimeStamp const&) [layout/ipc/VsyncChild.cpp:64]
 13:46:16     INFO -  #28: mozilla::layout::PVsyncChild::OnMessageReceived(IPC::Message const&) [obj-firefox/ipc/ipdl/PVsyncChild.cpp:233]
 13:46:16     INFO -  #29: mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) [obj-firefox/ipc/ipdl/PBackgroundChild.cpp:1721]
 13:46:16     INFO -  #30: mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) [ipc/glue/MessageChannel.cpp:1444]
 13:46:16     INFO -  #31: mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message const&) [ipc/glue/MessageChannel.cpp:1384]
 13:46:16     INFO -  #32: mozilla::ipc::MessageChannel::OnMaybeDequeueOne() [ipc/glue/MessageChannel.cpp:1353]
 13:46:16     INFO -  #33: RunnableMethod<mozilla::ipc::MessageChannel, bool (mozilla::ipc::MessageChannel::*)(), mozilla::Tuple<> >::Run() [ipc/chromium/src/base/task.h:28]
 13:46:16     INFO -  #34: mozilla::ipc::MessageChannel::DequeueTask::Run() [ipc/glue/MessageChannel.h:486]
 13:46:16     INFO -  #35: MessageLoop::RunTask(Task*) [ipc/chromium/src/base/message_loop.cc:365]
 13:46:16     INFO -  #36: MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask const&) [ipc/chromium/src/base/message_loop.cc:375]
 13:46:16     INFO -  #37: MessageLoop::DoWork() [ipc/chromium/src/base/message_loop.cc:459]
 13:46:16     INFO -  #38: mozilla::ipc::DoWorkRunnable::Run() [ipc/glue/MessagePump.cpp:221]
 13:46:16     INFO -  #39: nsThread::ProcessNextEvent(bool, bool*) [xpcom/threads/nsThread.cpp:1018]
 13:46:16     INFO -  #40: NS_ProcessNextEvent(nsIThread*, bool) [xpcom/glue/nsThreadUtils.cpp:297]
 13:46:16     INFO -  #41: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:96]
 13:46:16     INFO -  #42: MessageLoop::RunInternal() [ipc/chromium/src/base/message_loop.cc:234]
 13:46:16     INFO -  #43: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:520]
 13:46:16     INFO -  #44: nsBaseAppShell::Run() [widget/nsBaseAppShell.cpp:158]
 13:46:16     INFO -  #45: XRE_RunAppShell [toolkit/xre/nsEmbedFunctions.cpp:789]
 13:46:16     INFO -  #46: mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:259]
 13:46:16     INFO -  #47: MessageLoop::RunInternal() [ipc/chromium/src/base/message_loop.cc:234]
 13:46:16     INFO -  #48: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:520]
 13:46:16     INFO -  #49: XRE_InitChildProcess [toolkit/xre/nsEmbedFunctions.cpp:629]
 13:46:16     INFO -  #50: content_process_main(int, char**) [ipc/contentproc/plugin-container.cpp:238]
13:46:16 INFO - #51: main [ipc/app/MozillaRuntimeMain.cpp:12]
Flags: needinfo?(milan)
No longer blocks: 1252273
Nicolas, can you take a look when you get back?
Flags: needinfo?(milan) → needinfo?(nical.bugzilla)
This very much looks like a texture kept alive a bit too long after shutdown. This kind of bugs don't usually affect users the way leaks do in general, because it doesn't accumulate. I'll keep digging.
Flags: needinfo?(nical.bugzilla)
Nicolas, any luck investigating this?  It seems to have spiked in frequency today:

  https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1246529&startday=2016-03-01&endday=2016-03-22&tree=trunk
Flags: needinfo?(nical.bugzilla)
(In reply to Ben Kelly [:bkelly] from comment #11)
> Nicolas, any luck investigating this?  It seems to have spiked in frequency
> today:
> 
>  
> https://brasstacks.mozilla.com/orangefactor/
> ?display=Bug&bugid=1246529&startday=2016-03-01&endday=2016-03-22&tree=trunk

I am spending most of my time on shutdown issues at the moment, but making slow progress.
Flags: needinfo?(nical.bugzilla)
Whiteboard: [MemShrink]
Whiteboard: [MemShrink] → [MemShrink:P2]
Well, this got about 5 times worse yesterday over the day before. That's not good.
Component: Plug-ins → Graphics: Layers
Milan, do you know who might have time to look at this?  Its pretty frequent and our top orange.  Thanks.
Flags: needinfo?(milan)
We are actually actively looking at shutdown leaks.  Nicolas in particular has been on this for a few weeks.  We may have made some progress on the Windows specific ones - are the ones in this bug cross platform?
Flags: needinfo?(milan)
(In reply to Milan Sreckovic [:milan] from comment #18)
> We are actually actively looking at shutdown leaks.  Nicolas in particular
> has been on this for a few weeks.  We may have made some progress on the
> Windows specific ones - are the ones in this bug cross platform?

This seems to be triggering on Mac, Windows, and Linux.

https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1246529&startday=2016-03-18&endday=2016-03-25&tree=trunk

Sorry I misunderstood comment 13.  I thought he was saying he was working other unrelated shutdown things.
OrangeFactor shows this quite clearly being fixed by bug 1215265.
Assignee: nobody → nical.bugzilla
Blocks: 1215265
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.