memory leaks in updater.cpp
Categories
(Toolkit :: Application Update, defect)
Tracking
()
People
(Reporter: jasonxiale, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
41.09 KB,
application/gzip
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Steps to reproduce:
I used firefox night version( 66.0a1 (2019-01-16) (64-bit))
When I started the firefox from command line, then switch to private mode. Then I browser as usually, but from the command line, it seems that there are memory leak.
Actual results:
./firefox
*** You are running in chaos test mode. See ChaosMode.h. ***
###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
[Child 7569, Chrome_ChildThread] WARNING: pipe error: Broken pipe: file /builds/worker/workspace/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 728
[Child 7569, Chrome_ChildThread] WARNING: pipe error: Broken pipe: file /builds/worker/workspace/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 728
[Child 7569, Chrome_ChildThread] WARNING: pipe error: Broken pipe: file /builds/worker/workspace/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 728
[Child 7569, Chrome_ChildThread] WARNING: pipe error: Broken pipe: file /builds/worker/workspace/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 728
###!!! [Child][MessageChannel] Error: (msgtype=0x5F0029,name=PNecko::Msg_RemoveRequestContext) Channel closing: too late to send/recv, messages will be lost
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
###!!! [Child][MessageChannel] Error: (msgtype=0x5F0029,name=PNecko::Msg_RemoveRequestContext) Closed channel: cannot send/recv
###!!! [Child][MessageChannel] Error: (msgtype=0x35010F,name=PContent::Msg_StoreUserInteractionAsPermission) Closed channel: cannot send/recv
###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
###!!! [Child][MessageChannel] Error: (msgtype=0x35010F,name=PContent::Msg_StoreUserInteractionAsPermission) Closed channel: cannot send/recv
###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
=================================================================
==7736==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 864 byte(s) in 1 object(s) allocated from:
#0 0x563503f835f3 in __interceptor_malloc /builds/worker/workspace/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
#1 0x563503fc2898 in GetManifestContents(char const*) /builds/worker/workspace/build/src/toolkit/mozapps/update/updater/updater.cpp:4025:24
#2 0x563503fbf585 in DoUpdate /builds/worker/workspace/build/src/toolkit/mozapps/update/updater/updater.cpp:4145:18
#3 0x563503fbf585 in UpdateThreadFunc(void*) /builds/worker/workspace/build/src/toolkit/mozapps/update/updater/updater.cpp:2471
#4 0x7f154531c6da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
SUMMARY: AddressSanitizer: 864 byte(s) leaked in 1 allocation(s).
Expected results:
no memory leaks
Comment 1•7 years ago
|
||
Hello, could you please provide memory report (https://developer.mozilla.org/en-US/docs/Mozilla/Performance/about:memory) when you encounter this issue? This will help dev to look into the root cause of the issue. Thanks!
Reporter | ||
Comment 3•7 years ago
|
||
(In reply to Kanchan Kumari QA from comment #1)
Hello, could you please provide memory report (https://developer.mozilla.org/en-US/docs/Mozilla/Performance/about:memory) when you encounter this issue? This will help dev to look into the root cause of the issue. Thanks!
Hi, I just uploaded the memory report as attachment, please let me know if you need more info.
Comment 4•7 years ago
|
||
Thanks for the memory report!
Hi erahm, can you please look into this memory report? Thanks!
Updated•7 years ago
|
Comment 5•7 years ago
|
||
From a quick glance, it looks like GetManifestContents
mallocs the value it returns, but DoUpdate
, which calls it, doesn't ever free that result.
Comment 6•7 years ago
•
|
||
Looking at coverity results, it looks like a dupe of bug 1168010
It says:
leaked_storage: Variable rb going out of scope leaks the storage it points to.
here
https://searchfox.org/mozilla-central/source/toolkit/mozapps/update/updater/updater.cpp#4262
Updated•7 years ago
|
![]() |
||
Updated•7 years ago
|
Description
•