New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 775592 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
please use my google.com address
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac , Fuchsia
Pri: 1
Type: Bug



Sign in to add a comment

Mojo: Message handle attachments can leak

Project Member Reported by roc...@chromium.org, Oct 17 2017

Issue description

An internal message object (namely UserMessageImpl) will leak any attached handles if it's destroyed while in a partially serialized state.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7d450d1861e12f0555ad3311051b3217d62cf6d7

commit 7d450d1861e12f0555ad3311051b3217d62cf6d7
Author: Ken Rockot <rockot@chromium.org>
Date: Tue Oct 17 23:41:01 2017

Mojo: Ensure partially serialized message handles don't leak

For the sake of efficiency, we don't fully serialize handles in a
message until we're ready to freeze the message contents for
transmission. Unfortunately we were not properly closing these
partially serialized handles in the event that the message was
never fully serialized before destruction. This fixes that.

R=jcivelli@chromium.org

Bug:  775592 
Change-Id: Idac3b11359dc2fcec0699cef779de809575ea163
Reviewed-on: https://chromium-review.googlesource.com/723771
Reviewed-by: Jay Civelli <jcivelli@chromium.org>
Commit-Queue: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509600}
[modify] https://crrev.com/7d450d1861e12f0555ad3311051b3217d62cf6d7/mojo/edk/system/message_unittest.cc
[modify] https://crrev.com/7d450d1861e12f0555ad3311051b3217d62cf6d7/mojo/edk/system/user_message_impl.cc

Comment 2 by roc...@chromium.org, Oct 17 2017

Status: Fixed (was: Assigned)

Comment 3 by roc...@chromium.org, Oct 17 2017

Labels: Merge-Request-63
This fixes a leak which is present in M63 and M62. The change is small and should be low-risk.
Please add appropriate OSs.

Comment 5 by roc...@chromium.org, Oct 18 2017

Labels: OS-Android OS-Chrome OS-Fuchsia OS-iOS OS-Linux OS-Mac OS-Windows
This is not a platform dependent bug.
Project Member

Comment 6 by sheriffbot@chromium.org, Oct 19 2017

Labels: -Merge-Request-63 Hotlist-Merge-Approved Merge-Approved-63
Your change meets the bar and is auto-approved for M63. Please go ahead and merge the CL to branch 3239 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), gkihumba@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 19 2017

Labels: -merge-approved-63 merge-merged-3239
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b050aad7260853005fad018780aa1a8d2a756966

commit b050aad7260853005fad018780aa1a8d2a756966
Author: Ken Rockot <rockot@chromium.org>
Date: Thu Oct 19 02:17:03 2017

Mojo: Ensure partially serialized message handles don't leak

For the sake of efficiency, we don't fully serialize handles in a
message until we're ready to freeze the message contents for
transmission. Unfortunately we were not properly closing these
partially serialized handles in the event that the message was
never fully serialized before destruction. This fixes that.

R=jcivelli@chromium.org
TBR=rockot@chromium.org

(cherry picked from commit 7d450d1861e12f0555ad3311051b3217d62cf6d7)

Bug:  775592 
Change-Id: Idac3b11359dc2fcec0699cef779de809575ea163
Reviewed-on: https://chromium-review.googlesource.com/723771
Reviewed-by: Jay Civelli <jcivelli@chromium.org>
Commit-Queue: Ken Rockot <rockot@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#509600}
Reviewed-on: https://chromium-review.googlesource.com/727403
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/branch-heads/3239@{#60}
Cr-Branched-From: adb61db19020ed8ecee5e91b1a0ea4c924ae2988-refs/heads/master@{#508578}
[modify] https://crrev.com/b050aad7260853005fad018780aa1a8d2a756966/mojo/edk/system/message_unittest.cc
[modify] https://crrev.com/b050aad7260853005fad018780aa1a8d2a756966/mojo/edk/system/user_message_impl.cc

Comment 8 by roc...@chromium.org, Oct 19 2017

Labels: Merge-Request-62
Project Member

Comment 9 by sheriffbot@chromium.org, Oct 19 2017

Labels: -Merge-Request-62 Merge-Review-62 Hotlist-Merge-Review
This bug requires manual review: Request affecting a post-stable build
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Hi rockot@ thanks for the fix. Can you please confirm why this is needed for M62? Since we are already doing stable ramp-up, merge requirements are higher for M62. Can you confirm if this is absolutely critical for 62?
It's a memory leak (potentially large) that will likely impact all users to
some degree. The fix is small. I think it's reasonable to want to fix
memory leaks in stable.
Thanks, seems like a fairly small 3 line change. Have you tested and verified this in Canary and Dev? Is the merge overall safe, meaning no new regressions or impact to stability?
It's been on Canary a few days, but dev only today. I do not foresee any
complications given the simplicity of the fix, but I think it's reasonable
if we want to give it a few more days before merging to stable.
Cc: cma...@chromium.org bhthompson@chromium.org
+cmasso@ for ios/android and bhthompson@ for cros - Since this is affecting all platforms, want to include other release managers as well. 
Just to confirm, still no indication of problems in the wild on Canary. I think we should be OK to merge.
Is this severe enough that it warrants an M62 respin?
Labels: -Hotlist-Merge-Review -Merge-Review-62
Doubtful unless we're seeing huge spikes in memory usage or OOM crashes.

It sounds like memory leaks generally don't meet the bar for stable merge urgency, so I'm removing the merge request for M62.

Thanks for the feedback!

Sign in to add a comment