Closed Bug 1499676 Opened 7 years ago Closed 6 years ago

Intermittent LeakSanitizer | leak at MakeUnique, nsThreadManager::NewNamedThread, NS_NewNamedThread, NS_NewNamedThread

Categories

(Core :: Networking, defect, P5)

defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: intermittent-bug-filer, Unassigned)

Details

(Keywords: intermittent-failure, Whiteboard: [necko-triaged])

Filed by: archaeopteryx [at] coole-files.de https://treeherder.mozilla.org/logviewer.html#?job_id=205515361&repo=autoland https://queue.taskcluster.net/v1/task/F2Dfoox9RnSVb0cBqWkBzA/runs/0/artifacts/public/logs/live_backing.log [task 2018-10-15T12:56:07.689Z] 12:56:07 INFO - PID 11644 | [Child 11755: Main Thread]: E/signaling [main|PeerConnectionImpl] PeerConnectionImpl.cpp:398: PeerConnectionCtx is already gone. Ignoring... [task 2018-10-15T12:56:07.689Z] 12:56:07 INFO - PID 11644 | [Child 11755: Main Thread]: I/signaling [main|PeerConnectionImpl] PeerConnectionImpl.cpp:402: ~PeerConnectionImpl: PeerConnectionImpl destructor invoked for 511c4cb952ab7786 [task 2018-10-15T12:56:07.746Z] 12:56:07 INFO - PID 11644 | [Child 11755: Main Thread]: D/DataChannel 0x60f000105760: Close()ing 0x60f0002a4d50 [task 2018-10-15T12:56:07.747Z] 12:56:07 INFO - PID 11644 | [Child 11755: Main Thread]: D/DataChannel 0x60f000094150: Close()ing 0x60f0000115c0 [task 2018-10-15T12:56:07.763Z] 12:56:07 INFO - PID 11644 | ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost [task 2018-10-15T12:56:07.763Z] 12:56:07 INFO - PID 11644 | ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost [task 2018-10-15T12:56:08.458Z] 12:56:08 INFO - PID 11644 | ----------------------------------------------------- [task 2018-10-15T12:56:08.458Z] 12:56:08 INFO - PID 11644 | Suppressions used: [task 2018-10-15T12:56:08.458Z] 12:56:08 INFO - PID 11644 | count bytes template [task 2018-10-15T12:56:08.459Z] 12:56:08 INFO - PID 11644 | 542 17304 nsComponentManagerImpl [task 2018-10-15T12:56:08.459Z] 12:56:08 INFO - PID 11644 | 3 624 mozJSComponentLoader::LoadModule [task 2018-10-15T12:56:08.460Z] 12:56:08 INFO - PID 11644 | 2 288 libfontconfig.so [task 2018-10-15T12:56:08.462Z] 12:56:08 INFO - PID 11644 | ----------------------------------------------------- [task 2018-10-15T12:56:08.535Z] 12:56:08 INFO - PID 11644 | ----------------------------------------------------- [task 2018-10-15T12:56:08.536Z] 12:56:08 INFO - PID 11644 | Suppressions used: [task 2018-10-15T12:56:08.537Z] 12:56:08 INFO - PID 11644 | count bytes template [task 2018-10-15T12:56:08.537Z] 12:56:08 INFO - PID 11644 | 542 17304 nsComponentManagerImpl [task 2018-10-15T12:56:08.537Z] 12:56:08 INFO - PID 11644 | 3 624 mozJSComponentLoader::LoadModule [task 2018-10-15T12:56:08.538Z] 12:56:08 INFO - PID 11644 | 611 17713 libfontconfig.so [task 2018-10-15T12:56:08.538Z] 12:56:08 INFO - PID 11644 | 1 29 libglib-2.0.so [task 2018-10-15T12:56:08.539Z] 12:56:08 INFO - PID 11644 | ----------------------------------------------------- [task 2018-10-15T12:56:09.306Z] 12:56:09 INFO - PID 11644 | ----------------------------------------------------- [task 2018-10-15T12:56:09.307Z] 12:56:09 INFO - PID 11644 | Suppressions used: [task 2018-10-15T12:56:09.308Z] 12:56:09 INFO - PID 11644 | count bytes template [task 2018-10-15T12:56:09.308Z] 12:56:09 INFO - PID 11644 | 542 17304 nsComponentManagerImpl [task 2018-10-15T12:56:09.314Z] 12:56:09 INFO - PID 11644 | 8 1664 mozJSComponentLoader::LoadModule [task 2018-10-15T12:56:09.314Z] 12:56:09 INFO - PID 11644 | 611 17713 libfontconfig.so [task 2018-10-15T12:56:09.315Z] 12:56:09 INFO - PID 11644 | 2 65568 nr_reg_local_init [task 2018-10-15T12:56:09.315Z] 12:56:09 INFO - PID 11644 | 175 17152 r_log_register [task 2018-10-15T12:56:09.315Z] 12:56:09 INFO - PID 11644 | 59 2689 nr_reg_set [task 2018-10-15T12:56:09.317Z] 12:56:09 INFO - PID 11644 | 1 29 libglib-2.0.so [task 2018-10-15T12:56:09.317Z] 12:56:09 INFO - PID 11644 | ----------------------------------------------------- [task 2018-10-15T12:56:10.495Z] 12:56:10 INFO - PID 11644 | ================================================================= [task 2018-10-15T12:56:10.499Z] 12:56:10 INFO - PID 11644 | LeakSanitizer: detected memory leaks [task 2018-10-15T12:56:10.500Z] 12:56:10 INFO - PID 11644 | Direct leak of 336 byte(s) in 2 object(s) allocated from: [task 2018-10-15T12:56:10.500Z] 12:56:10 INFO - PID 11644 | #0 0x55f5595f9263 in malloc /builds/worker/workspace/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88:3 [task 2018-10-15T12:56:10.502Z] 12:56:10 INFO - PID 11644 | #1 0x55f55962a60d in moz_xmalloc /builds/worker/workspace/build/src/memory/mozalloc/mozalloc.cpp:70:17 [task 2018-10-15T12:56:10.506Z] 12:56:10 INFO - PID 11644 | #2 0x7f9b5a50a4cd in operator new /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/mozalloc.h:139:12 [task 2018-10-15T12:56:10.509Z] 12:56:10 INFO - PID 11644 | #3 0x7f9b5a50a4cd in mozilla::net::nsUDPSocket::SendWithAddress(mozilla::net::NetAddr const*, unsigned char const*, unsigned int, unsigned int*) /builds/worker/workspace/build/src/netwerk/base/nsUDPSocket.cpp:1290 [task 2018-10-15T12:56:10.509Z] 12:56:10 INFO - PID 11644 | #4 0x7f9b615ebfdf in mozilla::dom::UDPSocketParent::Send(nsTArray<unsigned char> const&, UDPSocketAddr const&) /builds/worker/workspace/build/src/dom/network/UDPSocketParent.cpp:403:21 [task 2018-10-15T12:56:10.509Z] 12:56:10 INFO - PID 11644 | #5 0x7f9b615ebb91 in mozilla::dom::UDPSocketParent::RecvOutgoingData(UDPData const&, UDPSocketAddr const&) /builds/worker/workspace/build/src/dom/network/UDPSocketParent.cpp:375:7 [task 2018-10-15T12:56:10.509Z] 12:56:10 INFO - PID 11644 | #6 0x7f9b5b77a943 in mozilla::net::PUDPSocketParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PUDPSocketParent.cpp:346:20 [task 2018-10-15T12:56:10.509Z] 12:56:10 INFO - PID 11644 | #7 0x7f9b5b8c3380 in mozilla::ipc::PBackgroundParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PBackgroundParent.cpp:1270:28 [task 2018-10-15T12:56:10.509Z] 12:56:10 INFO - PID 11644 | #8 0x7f9b5b17f959 in mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2248:25 [task 2018-10-15T12:56:10.509Z] 12:56:10 INFO - PID 11644 | #9 0x7f9b5b17c76d in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2175:17 [task 2018-10-15T12:56:10.510Z] 12:56:10 INFO - PID 11644 | #10 0x7f9b5b17e06c in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2012:5 [task 2018-10-15T12:56:10.510Z] 12:56:10 INFO - PID 11644 | #11 0x7f9b5b17e6d8 in mozilla::ipc::MessageChannel::MessageTask::Run() /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2045:15 [task 2018-10-15T12:56:10.510Z] 12:56:10 INFO - PID 11644 | #12 0x7f9b5a221099 in nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1252:14 [task 2018-10-15T12:56:10.515Z] 12:56:10 INFO - PID 11644 | #13 0x7f9b5a228178 in NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:530:10 [task 2018-10-15T12:56:10.515Z] 12:56:10 INFO - PID 11644 | #14 0x7f9b5b187c08 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:334:20 [task 2018-10-15T12:56:10.516Z] 12:56:10 INFO - PID 11644 | #15 0x7f9b5b0da55c in RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:325:10 [task 2018-10-15T12:56:10.516Z] 12:56:10 INFO - PID 11644 | #16 0x7f9b5b0da55c in RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:318 [task 2018-10-15T12:56:10.517Z] 12:56:10 INFO - PID 11644 | #17 0x7f9b5b0da55c in MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:298 [task 2018-10-15T12:56:10.517Z] 12:56:10 INFO - PID 11644 | #18 0x7f9b5a21b0ca in nsThread::ThreadFunc(void*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:505:11 [task 2018-10-15T12:56:10.517Z] 12:56:10 INFO - PID 11644 | #19 0x7f9b76bd6008 in _pt_root /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:201:5 [task 2018-10-15T12:56:10.518Z] 12:56:10 INFO - PID 11644 | #20 0x7f9b7a0d26b9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9) [...] [task 2018-10-15T12:56:10.703Z] 12:56:10 INFO - PID 11644 | ----------------------------------------------------- [task 2018-10-15T12:56:10.704Z] 12:56:10 INFO - PID 11644 | Suppressions used: [task 2018-10-15T12:56:10.705Z] 12:56:10 INFO - PID 11644 | count bytes template [task 2018-10-15T12:56:10.705Z] 12:56:10 INFO - PID 11644 | 550 17824 nsComponentManagerImpl [task 2018-10-15T12:56:10.706Z] 12:56:10 INFO - PID 11644 | 38 7904 mozJSComponentLoader::LoadModule [task 2018-10-15T12:56:10.707Z] 12:56:10 INFO - PID 11644 | 611 17509 libfontconfig.so [task 2018-10-15T12:56:10.707Z] 12:56:10 INFO - PID 11644 | 6 264 _PR_Getfd [task 2018-10-15T12:56:10.708Z] 12:56:10 INFO - PID 11644 | 1 29 libglib-2.0.so [task 2018-10-15T12:56:10.708Z] 12:56:10 INFO - PID 11644 | 5 140 libresolv.so [task 2018-10-15T12:56:10.708Z] 12:56:10 INFO - PID 11644 | ----------------------------------------------------- [task 2018-10-15T12:56:10.749Z] 12:56:10 INFO - Browser exited with return code 0 [task 2018-10-15T12:56:10.751Z] 12:56:10 INFO - ERROR | LeakSanitizer | SUMMARY: AddressSanitizer: 2962 byte(s) leaked in 9 allocation(s). [task 2018-10-15T12:56:10.751Z] 12:56:10 INFO - LeakSanitizer | To show the addresses of leaked objects add report_objects=1 to LSAN_OPTIONS [task 2018-10-15T12:56:10.751Z] 12:56:10 INFO - This can be done in testing/mozbase/mozrunner/mozrunner/utils.py [task 2018-10-15T12:56:10.754Z] 12:56:10 INFO - Allowed depth was 4 [task 2018-10-15T12:56:10.754Z] 12:56:10 INFO - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at MakeUnique, nsThreadManager::NewNamedThread, NS_NewNamedThread, NS_NewNamedThread [task 2018-10-15T12:56:10.754Z] 12:56:10 INFO - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at nsThreadManager::NewNamedThread, NS_NewNamedThread, NS_NewNamedThread, RunOnMainThread [task 2018-10-15T12:56:10.756Z] 12:56:10 INFO - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at NewPage, Push, mozilla::EventQueue::PutEvent, mozilla::ThreadEventQueue [task 2018-10-15T12:56:10.756Z] 12:56:10 INFO - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::net::nsUDPSocket::SendWithAddress, mozilla::dom::UDPSocketParent::Send, mozilla::dom::UDPSocketParent::RecvOutgoingData, mozilla::net::PUDPSocketParent::OnMessageReceived [task 2018-10-15T12:56:10.756Z] 12:56:10 INFO - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at nsThread::nsThread, nsThreadManager::NewNamedThread, NS_NewNamedThread, NS_NewNamedThread [task 2018-10-15T12:56:10.756Z] 12:56:10 INFO - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at Malloc, nsTArray_base, nsTArray_Impl, InsertElementsAt [task 2018-10-15T12:56:10.757Z] 12:56:10 INFO - Closing logging queue [task 2018-10-15T12:56:10.757Z] 12:56:10 INFO - queue closed
In addition to the thread stuff, there's an array that was created here: FallibleTArray<uint8_t> fallibleArray; if (!fallibleArray.InsertElementsAt(0, aData, aDataLength, fallible)) { return NS_ERROR_OUT_OF_MEMORY; } nsresult rv = mSts->Dispatch( new SendRequestRunnable(this, *aAddr, std::move(fallibleArray)), NS_DISPATCH_NORMAL); I don't see any leak that corresponds to the runnable or the nsUDP object, so I'm not sure what is going on.
Tentatively moving to networking, possibly a UDP related thread not getting shutdown or dropping a mesasge?
Component: XPCOM → Networking
Whiteboard: [necko-triaged]

This looks like two different leaks muddled together, because the first thing in the list is a thread.

One leak has some UDP stuff, in the webrtc/ and /html/dom/ directories of WPT:
leak at MakeUnique, nsThreadManager::NewNamedThread, NS_NewNamedThread, NS_NewNamedThread
leak at nsThreadManager::NewNamedThread, NS_NewNamedThread, NS_NewNamedThread, RunOnMainThread
leak at NewPage, Push, mozilla::EventQueue::PutEvent, mozilla::ThreadEventQueue
leak at mozilla::net::nsUDPSocket::SendWithAddress, mozilla::dom::UDPSocketParent::Send, mozilla::dom::UDPSocketParent::RecvOutgoingData, mozilla::net::PUDPSocketParent::OnMessageReceived
leak at nsThread::nsThread, nsThreadManager::NewNamedThread, NS_NewNamedThread, NS_NewNamedThread
leak at Malloc, nsTArray_base, nsTArray_Impl, InsertElementsAt

Another one is in the /workers/semantics/structured-clone/ directory of WPT:
leak at MakeUnique, nsThreadManager::NewNamedThread, NS_NewNamedThread, NS_NewNamedThread
leak at nsThreadManager::NewNamedThread, NS_NewNamedThread, NS_NewNamedThread, mozilla::dom::IPCBlobInputStreamThread::Initialize
leak at mozilla::dom::IPCBlobInputStreamChild::ForgetStream, mozilla::dom::IPCBlobInputStream::Close, mozilla::dom::IPCBlobInputStream::~IPCBlobInputStream, mozilla::dom::IPCBlobInputStream::Release
leak at NewPage, Push, mozilla::EventQueue::PutEvent, mozilla::ThreadEventQueue
leak at nsThread::nsThread, nsThreadManager::NewNamedThread, NS_NewNamedThread, NS_NewNamedThread
leak at mozilla::ipc::BackgroundChildImpl::AllocPIPCBlobInputStreamChild, mozilla::ipc::PBackgroundChild::OnMessageReceived, mozilla::ipc::MessageChannel::DispatchAsyncMessage, mozilla::ipc::MessageChannel::DispatchMessage
leak at MakeUnique, IProtocol, mozilla::ipc::PIPCBlobInputStreamChild::PIPCBlobInputStreamChild, mozilla::dom::IPCBlobInputStreamChild::IPCBlobInputStreamChild
There's only one instance of this.

For the UDP leak, it looks like the leak is SendRequestRunnable plus some generic thread stuff, including a ThreadEventQueue. It seems curious to me that it does not leak an nsUDPSocket.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.