Closed Bug 1520801 Opened 7 years ago Closed 7 years ago

memory leaks in updater.cpp

Categories

(Toolkit :: Application Update, defect)

66 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1168010

People

(Reporter: jasonxiale, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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

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!

Flags: needinfo?(jasonxiale)
Attached file memory-report.json.gz

memory info about the memory leak bug

Flags: needinfo?(jasonxiale)

(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.

Thanks for the memory report!

Hi erahm, can you please look into this memory report? Thanks!

Flags: needinfo?(erahm)

From a quick glance, it looks like GetManifestContents mallocs the value it returns, but DoUpdate, which calls it, doesn't ever free that result.

Component: Untriaged → Application Update
Flags: needinfo?(erahm) → needinfo?(robert.strong.bugs)
Product: Firefox → Toolkit

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

Summary: detected memory leaks → memory leaks in updater.cpp
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(robert.strong.bugs)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: