Closed Bug 1399117 Opened 7 years ago Closed 7 years ago

Intermittent LeakSanitizer | leak at nsBaseChannel::SetContentDispositionFilename, nsBaseChannel::SetContentDispositionFilename, nsHostObjectProtocolHandler::NewChannel2

Categories

(Core :: Networking, defect, P5)

defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: intermittent-bug-filer, Unassigned)

Details

(Keywords: intermittent-failure, Whiteboard: [stockwell unknown])

Filed by: archaeopteryx [at] coole-files.de

https://treeherder.mozilla.org/logviewer.html#?job_id=130319338&repo=mozilla-inbound

https://queue.taskcluster.net/v1/task/Xlc6ELf0SRSn7E3xEYjWLA/runs/0/artifacts/public/logs/live_backing.log

[task 2017-09-12T10:43:22.378057Z] 10:43:22     INFO - GECKO(2248) | -----------------------------------------------------
[task 2017-09-12T10:43:22.381147Z] 10:43:22     INFO - GECKO(2248) | Suppressions used:
[task 2017-09-12T10:43:22.385251Z] 10:43:22     INFO - GECKO(2248) |   count      bytes template
[task 2017-09-12T10:43:22.390928Z] 10:43:22     INFO - GECKO(2248) |       8        256 libc.so
[task 2017-09-12T10:43:22.395439Z] 10:43:22     INFO - GECKO(2248) |     707      24584 nsComponentManagerImpl
[task 2017-09-12T10:43:22.400320Z] 10:43:22     INFO - GECKO(2248) |       6        960 mozJSComponentLoader::LoadModule
[task 2017-09-12T10:43:22.405040Z] 10:43:22     INFO - GECKO(2248) |     304       8933 libfontconfig.so
[task 2017-09-12T10:43:22.412445Z] 10:43:22     INFO - GECKO(2248) |      12        416 style::gecko::global_style_data
[task 2017-09-12T10:43:22.415821Z] 10:43:22     INFO - GECKO(2248) |       1         72 nss_ClearErrorStack
[task 2017-09-12T10:43:22.420293Z] 10:43:22     INFO - GECKO(2248) |      16       2316 libglib-2.0.so
[task 2017-09-12T10:43:22.423907Z] 10:43:22     INFO - GECKO(2248) | -----------------------------------------------------
[task 2017-09-12T10:43:22.427104Z] 10:43:22     INFO - GECKO(2248) | SUMMARY: AddressSanitizer: 4568 byte(s) leaked in 41 allocation(s).
[task 2017-09-12T10:43:24.610691Z] 10:43:24     INFO - GECKO(2248) | -----------------------------------------------------
[task 2017-09-12T10:43:24.614841Z] 10:43:24     INFO - GECKO(2248) | Suppressions used:
[task 2017-09-12T10:43:24.619868Z] 10:43:24     INFO - GECKO(2248) |   count      bytes template
[task 2017-09-12T10:43:24.622796Z] 10:43:24     INFO - GECKO(2248) |     709      22600 nsComponentManagerImpl
[task 2017-09-12T10:43:24.627235Z] 10:43:24     INFO - GECKO(2248) |      48       7680 mozJSComponentLoader::LoadModule
[task 2017-09-12T10:43:24.631371Z] 10:43:24     INFO - GECKO(2248) |       1        384 pixman_implementation_lookup_composite
[task 2017-09-12T10:43:24.634420Z] 10:43:24     INFO - GECKO(2248) |     611      17509 libfontconfig.so
[task 2017-09-12T10:43:24.638146Z] 10:43:24     INFO - GECKO(2248) |       1         32 libdl.so
[task 2017-09-12T10:43:24.641539Z] 10:43:24     INFO - GECKO(2248) |      17       4348 libglib-2.0.so
[task 2017-09-12T10:43:24.644258Z] 10:43:24     INFO - GECKO(2248) | -----------------------------------------------------
[task 2017-09-12T10:43:24.984267Z] 10:43:24     INFO - TEST-INFO | Main app process: exit 0
[task 2017-09-12T10:43:24.986488Z] 10:43:24     INFO - TEST-INFO | LeakSanitizer | To show the addresses of leaked objects add report_objects=1 to LSAN_OPTIONS
[task 2017-09-12T10:43:24.993394Z] 10:43:24     INFO - TEST-INFO | LeakSanitizer | This can be done in testing/mozbase/mozrunner/mozrunner/utils.py
[task 2017-09-12T10:43:24.998615Z] 10:43:24    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at nsBaseChannel::SetContentDispositionFilename, nsBaseChannel::SetContentDispositionFilename, nsHostObjectProtocolHandler::NewChannel2
[task 2017-09-12T10:43:25.001682Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at nsHostObjectProtocolHandler::NewURI, mozilla::net::nsIOService::NewURI, NS_NewURI, NS_NewURI
[task 2017-09-12T10:43:25.006527Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at CreateDynamic, NS_Atomize, mozilla::BasePrincipal::FinishInit, ContentPrincipal::Init
[task 2017-09-12T10:43:25.014970Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::net::nsStandardURL::StartClone, CloneInternal, mozilla::net::nsStandardURL::Clone, NS_EnsureSafeToReturn
[task 2017-09-12T10:43:25.018416Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::dom::nsIContentChild::GetConstructedEventTarget, mozilla::dom::ContentChild::GetConstructedEventTarget, mozilla::ipc::IToplevelProtocol::GetMessageEventTarget
[task 2017-09-12T10:43:25.022559Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at Alloc, nsTSubstring, nsTSubstring, SetCapacity
[task 2017-09-12T10:43:25.030080Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at nsSupportsWeakReference::GetWeakReference, NS_GetWeakReference, do_GetWeakReference, mozilla::net::nsLoadGroup::SetGroupObserver
[task 2017-09-12T10:43:25.033202Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::ChannelMediaResource::Open, mozilla::ChannelMediaDecoder::Load, mozilla::dom::HTMLMediaElement::SetupDecoder
[task 2017-09-12T10:43:25.041836Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::net::nsAboutProtocolHandler::NewURI, mozilla::net::nsIOService::NewURI, NS_NewURI, NS_NewURI
[task 2017-09-12T10:43:25.050736Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at nsStringBuffer::Alloc, Atom::Atom, CreateDynamic, NS_Atomize
[task 2017-09-12T10:43:25.056384Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at Alloc, nsTSubstring, nsTSubstring, nsTSubstring
[task 2017-09-12T10:43:25.060543Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::BasePrincipal::CreateCodebasePrincipal, mozilla::BasePrincipal::CreateCodebasePrincipal, nsScriptSecurityManager::GetChannelURIPrincipal
[task 2017-09-12T10:43:25.064764Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::net::nsIOService::NewChannelFromURIWithProxyFlags2, mozilla::net::nsIOService::NewChannelFromURI2, NS_NewChannelInternal
[task 2017-09-12T10:43:25.071889Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at Alloc, nsTSubstring, nsTSubstring, SetLength
[task 2017-09-12T10:43:25.075504Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at PLDHashTable::ChangeTable, mozilla::net::nsLoadGroup::RemoveRequest, mozilla::net::HttpChannelChild::DoOnStopRequest, mozilla::net::HttpChannelChild::OnStopRequest
[task 2017-09-12T10:43:25.079369Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::SchedulerGroup::CreateEventTargetFor, mozilla::SchedulerGroup::CreateEventTargets, mozilla::dom::TabGroup::TabGroup
[task 2017-09-12T10:43:25.083499Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at nsSHEntryShared::Duplicate, nsSHEntry::AbandonBFCacheEntry, nsDocShell::AddToSessionHistory
[task 2017-09-12T10:43:25.086825Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::SupportsWeakPtr, mozilla::WeakPtr, nsDocShell::MaybeInitTiming
[task 2017-09-12T10:43:25.090490Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::WeakPtr, WeakPtr, emplace, ContentPrincipal::AddonPolicy
[task 2017-09-12T10:43:25.093234Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::dom::IPCBlobInputStreamChild::CreateStream, Clone, mozilla::dom::IPCBlobInputStream::Clone, NS_CloneInputStream
[task 2017-09-12T10:43:25.096419Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::net::nsStandardURL::StartClone, CloneInternal, mozilla::net::nsStandardURL::CloneIgnoringRef, mozilla::net::HttpBaseChannel::SetReferrerWithPolicy
[task 2017-09-12T10:43:25.113428Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at nsNodeSupportsWeakRefTearoff::GetWeakReference, NS_GetWeakReference, do_GetWeakReference, mozilla::net::LoadInfo::LoadInfo
[task 2017-09-12T10:43:25.117016Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at PLDHashTable::Add, PLDHashTable::Add, PutEntry, mozilla::dom::TabGroup::AddDocument
[task 2017-09-12T10:43:25.121049Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::dom::HTMLMediaElement::ChannelLoader::LoadInternal, applyImpl, apply, mozilla::detail::RunnableMethodImpl
[task 2017-09-12T10:43:25.135256Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at NS_NewLayoutHistoryState, mozilla::PresShell::CaptureHistoryState, nsCSSFrameConstructor::ConstructDocElementFrame
[task 2017-09-12T10:43:25.142589Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at nsInputStreamPump::Create, nsBaseChannel::BeginPumpingData, nsBaseChannel::AsyncOpen
[task 2017-09-12T10:43:25.146022Z] 10:43:25    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::net::RequestContextService::NewRequestContext, mozilla::net::nsLoadGroup::Init, nsLoadGroupConstructor
[task 2017-09-12T10:43:25.155099Z] 10:43:25     INFO - runtests.py | Application ran for: 0:01:25.155769
[task 2017-09-12T10:43:25.166019Z] 10:43:25     INFO - zombiecheck | Reading PID log: /tmp/tmpXpgGlmpidlog
[task 2017-09-12T10:43:25.171784Z] 10:43:25     INFO - ==> process 2248 launched child process 2295
[task 2017-09-12T10:43:25.174160Z] 10:43:25     INFO - zombiecheck | Checking for orphan process with PID: 2295
[task 2017-09-12T10:43:25.176460Z] 10:43:25     INFO - Stopping web server
I don't see nsHttpChannel anywhere in the leak log, so it's unlikely that we're causing it from nsHttpChannel code. This doesn't necessarily mean that the change in bug 1392841 couldn't cause the spike, because it could change timing of some events, but the problem is IMO somewhere else. Valentin, what do you think?
Flags: needinfo?(michal.novotny) → needinfo?(valentin.gosu)
I agree that the leak doesn't seem to be related to the RCWN implementation.
Some of the leaks mention Content/Child objects, which are not directly impacted by racing in the main process.
But it is very possible that RCWN is causing a race that reveals this leak more often.

One of the more suspicious leaked objects is MediaLoadListener. Seems like it could be affected by a change in the order of events.
This comment when allocating seems revealing:
http://searchfox.org/mozilla-central/rev/2c9a5993ac40ec1db8450e3e0a85702fa291b9e2/dom/html/HTMLMediaElement.cpp#1229-1235
The cycle should be broken either by OnStartRequest or Shutdown. Since it's leaked on shutdown, I don't think it's working properly.
Flags: needinfo?(valentin.gosu)
Leaks have continued after the backout of bug 1392841
For example:
https://treeherder.mozilla.org/logviewer.html#?repo=mozilla-inbound&job_id=131395620
It's safe to say the cause is not RCWN.
@jwwang might have some insight about this intermittent failure since he is doing OMT media loading recently. Bug 1398659 might be related, based on the first date this failure was reported.
Flags: needinfo?(jwwang)
I don't think bug 1398659 is relevant which doesn't change the call flow nor the life cycles. So which objects are we leaking?
Flags: needinfo?(jwwang)
A channel object for blob URL is leaked.

https://searchfox.org/mozilla-central/source/dom/file/tests/test_mozfiledataurl.html should be the owner of the leaked objects, since this is the only test case that loads media file.
this is approaching our disable limit of 200 failures in a month- right now this is linux64-asan all in mochitest-3, I am happy to disable all the tests that run in chunk3 for asan or a specific file(s) if there is a list available.  It sounds like dom/file/tests/test_mozfiledataurl.html  is the culprit so that would be where we start for resolving this.
No new failures reported since 2017-09-16, but I don't know how it was resolved.
Whiteboard: [stockwell unknown]
You need to log in before you can comment on or make changes to this bug.