The browser/base/content/test/general directory permaleaks on Windows 8 debug e10s

RESOLVED FIXED in Firefox 48

Status

()

RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: RyanVM, Assigned: RyanVM)

Tracking

(Blocks: 2 bugs, {memory-leak})

Trunk
mozilla50
Unspecified
Windows
memory-leak
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(e10s+, firefox47 wontfix, firefox48 fixed, firefox49 fixed, firefox50 fixed)

Details

(Whiteboard: [e10s-orangeblockers] btpp-followup-2016-05-10)

(Assignee)

Description

3 years ago
(In reply to Ryan VanderMeulen [:RyanVM] from bug 1253956 comment #32)
> Things are indeed much better than they were before. Maybe bug 1215265
> helped with the crashes. However, there's still a Win8 permaleak :\
> 
> https://treeherder.mozilla.org/logviewer.html#?job_id=20113688&repo=try
> TEST-INFO | leakcheck | default process: leaked 1 nsBaseDragService
> TEST-INFO | leakcheck | default process: leaked 2 nsNativeDragTarget
> TEST-INFO | leakcheck | default process: leaked 1 nsTArray_base
> TEST-UNEXPECTED-FAIL | leakcheck | default process: 280 bytes leaked
> (nsBaseDragService, nsNativeDragTarget, nsTArray_base)
> 
> INFO -  Serial Numbers of Leaked Objects:
> INFO -  1 @0000004E52B651A0 (1 references)
> INFO -  allocation stack:
> INFO -  #00: nsDragServiceConstructor
> [widget/windows/nsWidgetFactory.cpp:120]
> INFO -  #01: nsComponentManagerImpl::CreateInstance(nsID const &,nsISupports
> *,nsID const &,void * *) [xpcom/components/nsComponentManager.cpp:1121]
> INFO -  #02: nsComponentManagerImpl::GetService(nsID const &,nsID const
> &,void * *) [xpcom/components/nsComponentManager.cpp:1363]
> INFO -  #03: nsNativeDragTarget::nsNativeDragTarget(nsIWidget *)
> [widget/windows/nsNativeDragTarget.cpp:48]
> INFO -  #04: nsWindow::EnableDragDrop(bool)
> [widget/windows/nsWindow.cpp:3466]
> INFO -  #05: nsView::AttachToTopLevelWidget(nsIWidget *)
> [view/nsView.cpp:721]
> INFO -  #06: nsDocumentViewer::MakeWindow(nsSize const &,nsView *)
> [layout/base/nsDocumentViewer.cpp:2413]
> INFO -  #07: nsDocumentViewer::InitInternal(nsIWidget *,nsISupports
> *,mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const
> &,bool,bool,bool) [layout/base/nsDocumentViewer.cpp:825]
> INFO -  #08: nsDocumentViewer::Init(nsIWidget
> *,mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const &)
> [layout/base/nsDocumentViewer.cpp:619]
> INFO -  #09: nsDocShell::SetupNewViewer(nsIContentViewer *)
> [docshell/base/nsDocShell.cpp:9261]
> INFO -  #10: nsDocShell::Embed(nsIContentViewer *,char const *,nsISupports
> *) [docshell/base/nsDocShell.cpp:7152]
> INFO -  #11: nsDocShell::CreateAboutBlankContentViewer(nsIPrincipal *,nsIURI
> *,bool) [docshell/base/nsDocShell.cpp:7981]
> INFO -  #12: nsWebShellWindow::Initialize(nsIXULWindow *,nsIXULWindow
> *,nsIURI *,int,int,bool,nsITabParent *,nsWidgetInitData &)
> [xpfe/appshell/nsWebShellWindow.cpp:219]
> INFO -  #13: nsAppShellService::JustCreateTopWindow(nsIXULWindow *,nsIURI
> *,unsigned int,int,int,bool,nsITabParent *,nsWebShellWindow * *)
> [xpfe/appshell/nsAppShellService.cpp:746]
> INFO -  #14: nsAppShellService::CreateTopLevelWindow(nsIXULWindow *,nsIURI
> *,unsigned int,int,int,nsITabParent *,nsIXULWindow * *)
> [xpfe/appshell/nsAppShellService.cpp:209]
> INFO -  #15: nsAppStartup::CreateChromeWindow2(nsIWebBrowserChrome
> *,unsigned int,unsigned int,nsIURI *,nsITabParent *,bool
> *,nsIWebBrowserChrome * *) [toolkit/components/startup/nsAppStartup.cpp:669]
> INFO -  #16: nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy *,char
> const *,char const *,char const *,bool,bool,bool,nsITabParent *,nsIArray
> *,float *,mozIDOMWindowProxy * *)
> [embedding/components/windowwatcher/nsWindowWatcher.cpp:834]
> INFO -  #17: nsWindowWatcher::OpenWindow(mozIDOMWindowProxy *,char const
> *,char const *,char const *,nsISupports *,mozIDOMWindowProxy * *)
> [embedding/components/windowwatcher/nsWindowWatcher.cpp:369]
> INFO -  #18: XPTC__InvokebyIndex
> INFO -  #19: CallMethodHelper::Call()
> [js/xpconnect/src/XPCWrappedNative.cpp:1402]
> INFO -  #20: XPCWrappedNative::CallMethod(XPCCallContext
> &,XPCWrappedNative::CallMode) [js/xpconnect/src/XPCWrappedNative.cpp:1367]
> INFO -  #21: XPC_WN_CallMethod(JSContext *,unsigned int,JS::Value *)
> [js/xpconnect/src/XPCWrappedNativeJSOps.cpp:1128]
> INFO -  #22: js::CallJSNative(JSContext *,bool (*)(JSContext *,unsigned
> int,JS::Value *),JS::CallArgs const &) [js/src/jscntxtinlines.h:235]
> INFO -  #23: js::InternalCallOrConstruct(JSContext *,JS::CallArgs const
> &,js::MaybeConstruct) [js/src/vm/Interpreter.cpp:480]
> INFO -  #24: Interpret [js/src/vm/Interpreter.cpp:2831]
> INFO -  #25: js::RunScript(JSContext *,js::RunState &)
> [js/src/vm/Interpreter.cpp:426]
> INFO -  #26: js::InternalCallOrConstruct(JSContext *,JS::CallArgs const
> &,js::MaybeConstruct) [js/src/vm/Interpreter.cpp:498]
> INFO -  #27: js::Call(JSContext
> *,JS::Handle<JS::Value>,JS::Handle<JS::Value>,js::AnyInvokeArgs const
> &,JS::MutableHandle<JS::Value>) [js/src/vm/Interpreter.cpp:544]
> INFO -  #28: JS_CallFunctionValue(JSContext *,JS::Handle<JSObject
> *>,JS::Handle<JS::Value>,JS::HandleValueArray const
> &,JS::MutableHandle<JS::Value>) [js/src/jsapi.cpp:2864]
> INFO -  #29: nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS *,unsigned
> short,XPTMethodDescriptor const *,nsXPTCMiniVariant *)
> [js/xpconnect/src/XPCWrappedJSClass.cpp:1238]
> INFO -  #30: nsXPCWrappedJS::CallMethod(unsigned short,XPTMethodDescriptor
> const *,nsXPTCMiniVariant *) [js/xpconnect/src/XPCWrappedJS.cpp:603]
> INFO -  #31: PrepareAndDispatch
> [xpcom/reflect/xptcall/md/win32/xptcstubs_x86_64.cpp:174]
> INFO -  #32: SharedStub
> INFO -  #33: NS_CreateServicesFromCategory(char const *,nsISupports *,char
> const *,char16_t const *) [xpcom/components/nsCategoryManager.cpp:818]
> INFO -  #34: nsXREDirProvider::DoStartup()
> [toolkit/xre/nsXREDirProvider.cpp:958]
> INFO -  #35: XREMain::XRE_mainRun() [toolkit/xre/nsAppRunner.cpp:4217]
> INFO -  #36: XREMain::XRE_main(int,char * * const,nsXREAppData const *)
> [toolkit/xre/nsAppRunner.cpp:4451]
> INFO -  #37: XRE_main [toolkit/xre/nsAppRunner.cpp:4559]
> INFO -  #38: do_main [browser/app/nsBrowserApp.cpp:220]
> INFO -  #39: NS_internal_main(int,char * *,char * *)
> [browser/app/nsBrowserApp.cpp:360]
> INFO -  #40: wmain [toolkit/xre/nsWindowsWMain.cpp:138]
> INFO -  #41: __scrt_common_main_seh
> [f:/dd/vctools/crt/vcstartup/src/startup/exe_common.inl:255]
> INFO -  #42: KERNEL32.DLL + 0x167e
> INFO -  #43: ntdll.dll + 0x1c3f1
> 
> If we could isolate the test(s) causing the leaks, we could re-enable the
> rest of the directory. I'd also be OK with closing this bug as WFM at this
> point and opening a new bug for the leak in question if it makes it easier
> from a tracking standpoint.
(Assignee)

Updated

3 years ago
status-firefox47: --- → wontfix
status-firefox48: --- → affected
tracking-e10s: --- → ?
Neil, is this something you could take a look at?
Flags: needinfo?(enndeakin)
Whiteboard: [e10s-orangeblockers][tests disabled on windows debug e10s] → [e10s-orangeblockers][tests disabled on windows debug e10s] btpp-followup-2016-05-10

Updated

3 years ago
tracking-e10s: ? → +

Comment 2

2 years ago
Where is the log there from comment 0 coming from? I don't see that info in the linked test run. It shows the callstack for the creation of nsBaseDragService (nothing unusual though).

Could be that we quit while a drag is occurring? Might be wroth isolating the tests that appear to do dragging or emulated mousemove events. I can't really do this myself on Windows.
Flags: needinfo?(enndeakin)
(Assignee)

Comment 4

2 years ago
I'm going to fire off a new Try push soon to see if bug 1277358 had any affect on this leak.
(Assignee)

Comment 5

2 years ago
(In reply to Ryan VanderMeulen [:RyanVM] (Away June 4-20) from comment #4)
> I'm going to fire off a new Try push soon to see if bug 1277358 had any
> affect on this leak.

It did not :(
(Assignee)

Comment 6

2 years ago
Still no luck disabling my way to victory. Here's the latest attempt:
https://hg.mozilla.org/try/rev/17784e89622edda4273969e04fe4293c22fd2bb9

I think that covers all tests that use drag and drop AFAICT. I guess I'll look at synthesized mousemove events next :\

Comment 7

2 years ago
I submitted a try run with some logging:

https://treeherder.mozilla.org/#/jobs?repo=tryrevision=8e1376f3138b10fa9c870aa443d3fcd06e82186b


It shows that 6 nsBaseDragServices are created, and only three destructors are called. One of these is the initial parent process one created at the beginning. The other two are from the tests:

browser_aboutHome.js
browser_domFullscreen_fullscreenMode.js


The leak of an nsNativeDragTarget is from the test:
  browser_save_link-perwindowpb.js
Also notable, is that this test asserts many times, 

I can't find the other one.

I am going to try a build with these tests disabled.

Comment 8

2 years ago
OK so disabling those three tests stopped the leak:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=9efbc7d789f128b2b2c67b3a23793bd00e98879f

I can't reproduce locally however and browser_save_link-perwindowpb.js won't run properly for me.

Comment 9

2 years ago
So a build
https://treeherder.mozilla.org/#/jobs?repo=try&author=neil@mozilla.com&selectedJob=22505748

with just browser_save_link-perwindowpb.js disabled seems to succeed as well.

Ryan, want to try disabling just this one test?
Flags: needinfo?(ryanvm)

Updated

2 years ago
Blocks: 1280505

Comment 10

2 years ago
I filed bug 1280505 on investigating this test.

Comment 11

2 years ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d10d80b85d7a
Disable browser_save_link-perwindowpb.js on Windows debug e10s and re-enable all the other tests in browser/base/content/test/general. r=Enn
(Assignee)

Comment 12

2 years ago
My hero <3
Flags: needinfo?(ryanvm)
Whiteboard: [e10s-orangeblockers][tests disabled on windows debug e10s] btpp-followup-2016-05-10 → [e10s-orangeblockers] btpp-followup-2016-05-10
(Assignee)

Comment 13

2 years ago
Try pushes for Aurora and Beta look good too. Looks like this can be safely uplifted once it hits m-c!
status-firefox50: --- → affected

Comment 14

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/d10d80b85d7a
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox50: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
(Assignee)

Comment 15

2 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-aurora/rev/5d0e51438528
status-firefox49: affected → fixed
(Assignee)

Comment 16

2 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/b02e272a3c32
status-firefox48: affected → fixed
(Assignee)

Updated

2 years ago
Assignee: nobody → ryanvm
You need to log in before you can comment on or make changes to this bug.