Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Issue 1491253004: Release Oilpan heap singletons prior to LSan leak detection. (Closed)

Created:
5 years ago by sof
Modified:
5 years ago
Reviewers:
oilpan-reviews, haraken
CC:
chromium-reviews, eae+blinkwatch, apavlov+blink_chromium.org, blink-reviews-wtf_chromium.org, rwlbuis, blink-reviews-style_chromium.org, blink-reviews-css, blink-reviews-html_chromium.org, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews-bindings_chromium.org, gavinp+loader_chromium.org, blink-reviews, Mads Ager (chromium), darktears, loading-reviews+fetch_chromium.org, Nate Chapin, tyoshino+watch_chromium.org, oilpan-reviews, kouhei+heap_chromium.org, Mikhail
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Release Oilpan heap singletons prior to LSan leak detection. Make Oilpan and LSan cooperate better. As Persistent<> references created via DEFINE_STATIC_LOCAL() and similar will be reachable to LSan's leak detection pass, the objects they refer to outside of the Oilpan heap will be reported as leaking. (This is in contrast to what happens in the non-Oilpan setting, where the (leaked) pointer created via DEFINE_STATIC_LOCAL() is stored in a local "static"; such non-global references are not considered roots to LSan and hence the objects reachable from those will not be reported as leaking.) Address the problem on the Oilpan side by having such "static" Persistent<>ly-held singletons be registered and tracked such that we're able to release them all just before shutting down and performing an extra round of GCs. Leaving a cleaner heap for LSan to work over. And to report no leaks over, ideally. As part of the changes needed to support this for Oilpan, wtf/LeakAnnotations.h offerings has been renamed and changed a bit: * WTF_ANNOTATE_MEMORY_LEAK_SCOPE => LEAK_SANITIZER_DISABLED_SCOPE. (but see LeakAnnotations.h for macro to use local to wtf/.) * WTF_ANNOTATE_IGNORE_OBJECT_PTR => LEAK_SANITIZER_IGNORE_OBJECT. * LEAK_SANITIZER_REGISTER_STATIC_LOCAL(). (Reland of r363780.) R=haraken BUG=567257 Committed: https://crrev.com/6918d00fae1ab739f89393378fa4adddabacafd2 Cr-Commit-Position: refs/heads/master@{#363780} Committed: https://crrev.com/2e088a7ecaf6c26f44c309b7bab507aeddb41365 Cr-Commit-Position: refs/heads/master@{#363994}

Patch Set 1 #

Patch Set 2 : minor code tidy #

Patch Set 3 : add comment to motivate DEFINE_STATIC_LOCAL_NO_REGISTER() #

Total comments: 2

Patch Set 4 : retire DEFINE_STATIC_LOCAL_NO_REGISTER() #

Patch Set 5 : remove unnecessary ifdef protections #

Patch Set 6 : move static-local ref registration to wtf/LeakAnnotations.h #

Total comments: 10

Patch Set 7 : renamings + switch to using LEAK_SANITIZER_DISABLED_SCOPE #

Total comments: 12

Patch Set 8 : add some asserts #

Patch Set 9 : address non-LSan Oilpan compilation failure #

Unified diffs Side-by-side diffs Delta from patch set Stats (+257 lines, -47 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/RejectedPromises.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp View 1 1 chunk +25 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.cpp View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/forms/EmailInputType.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Handle.h View 1 2 3 4 5 6 7 8 5 chunks +63 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/ThreadState.h View 1 2 3 4 5 6 3 chunks +18 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/ThreadState.cpp View 1 2 3 4 5 6 2 chunks +33 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebKit.cpp View 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/BitVector.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/LeakAnnotations.h View 1 2 3 4 5 6 2 chunks +73 lines, -26 lines 0 comments Download
M third_party/WebKit/Source/wtf/StdLibExtras.h View 1 2 3 4 5 6 2 chunks +12 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 74 (29 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1491253004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1491253004/1
5 years ago (2015-12-03 16:10:27 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1491253004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1491253004/20001
5 years ago (2015-12-03 16:22:05 UTC) #5
sof
please take a look. Changes split out from https://codereview.chromium.org/1482683002/ -- see it for full (Oilpan ...
5 years ago (2015-12-03 16:23:33 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-03 18:28:12 UTC) #10
haraken
https://codereview.chromium.org/1491253004/diff/40001/third_party/WebKit/Source/web/WebKit.cpp File third_party/WebKit/Source/web/WebKit.cpp (right): https://codereview.chromium.org/1491253004/diff/40001/third_party/WebKit/Source/web/WebKit.cpp#newcode209 third_party/WebKit/Source/web/WebKit.cpp:209: Heap::collectAllGarbage(); Help me understand: Why do we need to ...
5 years ago (2015-12-04 02:19:51 UTC) #12
sof
https://codereview.chromium.org/1491253004/diff/40001/third_party/WebKit/Source/web/WebKit.cpp File third_party/WebKit/Source/web/WebKit.cpp (right): https://codereview.chromium.org/1491253004/diff/40001/third_party/WebKit/Source/web/WebKit.cpp#newcode209 third_party/WebKit/Source/web/WebKit.cpp:209: Heap::collectAllGarbage(); On 2015/12/04 02:19:51, haraken wrote: > > Help ...
5 years ago (2015-12-04 07:04:08 UTC) #13
haraken
On 2015/12/04 07:04:08, sof wrote: > https://codereview.chromium.org/1491253004/diff/40001/third_party/WebKit/Source/web/WebKit.cpp > File third_party/WebKit/Source/web/WebKit.cpp (right): > > https://codereview.chromium.org/1491253004/diff/40001/third_party/WebKit/Source/web/WebKit.cpp#newcode209 > ...
5 years ago (2015-12-04 08:20:27 UTC) #14
sof
On 2015/12/04 08:20:27, haraken wrote: > On 2015/12/04 07:04:08, sof wrote: > > > https://codereview.chromium.org/1491253004/diff/40001/third_party/WebKit/Source/web/WebKit.cpp ...
5 years ago (2015-12-04 08:51:01 UTC) #15
haraken
On 2015/12/04 08:51:01, sof wrote: > On 2015/12/04 08:20:27, haraken wrote: > > On 2015/12/04 ...
5 years ago (2015-12-04 15:18:28 UTC) #16
sof
On 2015/12/04 15:18:28, haraken wrote: > On 2015/12/04 08:51:01, sof wrote: > > On 2015/12/04 ...
5 years ago (2015-12-04 15:47:51 UTC) #17
sof
I realized that a full V8GCController::collectAllGarbageForTesting() was being used on https://codereview.chromium.org/1482683002/ when identifying the need ...
5 years ago (2015-12-04 22:07:25 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1491253004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1491253004/100001
5 years ago (2015-12-05 16:48:52 UTC) #20
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_TIMED_OUT, no build URL) ...
5 years ago (2015-12-05 18:50:47 UTC) #22
haraken
Thanks for a lot of work on this! I think the CL now has a ...
5 years ago (2015-12-06 23:56:21 UTC) #23
sof
https://codereview.chromium.org/1491253004/diff/100001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp File third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp (right): https://codereview.chromium.org/1491253004/diff/100001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp#newcode187 third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp:187: AtomicallyInitializedStaticReference(ThreadSpecific<CSSTextCacheWrapper>, cache, new ThreadSpecific<CSSTextCacheWrapper>); On 2015/12/06 23:56:21, haraken wrote: ...
5 years ago (2015-12-07 06:04:58 UTC) #24
haraken
https://codereview.chromium.org/1491253004/diff/100001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp File third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp (right): https://codereview.chromium.org/1491253004/diff/100001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp#newcode187 third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp:187: AtomicallyInitializedStaticReference(ThreadSpecific<CSSTextCacheWrapper>, cache, new ThreadSpecific<CSSTextCacheWrapper>); On 2015/12/07 06:04:58, sof wrote: ...
5 years ago (2015-12-07 06:09:24 UTC) #25
sof
On 2015/12/07 06:09:24, haraken wrote: > https://codereview.chromium.org/1491253004/diff/100001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp > File third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp (right): > > https://codereview.chromium.org/1491253004/diff/100001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp#newcode187 > ...
5 years ago (2015-12-07 06:21:48 UTC) #26
haraken
On 2015/12/07 06:21:48, sof wrote: > On 2015/12/07 06:09:24, haraken wrote: > > > https://codereview.chromium.org/1491253004/diff/100001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp ...
5 years ago (2015-12-07 06:23:51 UTC) #27
sof
On 2015/12/07 06:23:51, haraken wrote: > On 2015/12/07 06:21:48, sof wrote: > > On 2015/12/07 ...
5 years ago (2015-12-07 06:36:09 UTC) #28
haraken
On 2015/12/07 06:36:09, sof wrote: > On 2015/12/07 06:23:51, haraken wrote: > > On 2015/12/07 ...
5 years ago (2015-12-07 06:40:19 UTC) #29
sof
https://codereview.chromium.org/1491253004/diff/100001/third_party/WebKit/Source/platform/heap/Handle.h File third_party/WebKit/Source/platform/heap/Handle.h (right): https://codereview.chromium.org/1491253004/diff/100001/third_party/WebKit/Source/platform/heap/Handle.h#newcode1300 third_party/WebKit/Source/platform/heap/Handle.h:1300: ThreadState::current()->enterDisabledStaticReferenceRegistrationScope(); On 2015/12/06 23:56:21, haraken wrote: > > Can ...
5 years ago (2015-12-07 07:18:20 UTC) #30
haraken
https://codereview.chromium.org/1491253004/diff/100001/third_party/WebKit/Source/platform/heap/Handle.h File third_party/WebKit/Source/platform/heap/Handle.h (right): https://codereview.chromium.org/1491253004/diff/100001/third_party/WebKit/Source/platform/heap/Handle.h#newcode1300 third_party/WebKit/Source/platform/heap/Handle.h:1300: ThreadState::current()->enterDisabledStaticReferenceRegistrationScope(); On 2015/12/07 07:18:19, sof wrote: > On 2015/12/06 ...
5 years ago (2015-12-07 07:23:36 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1491253004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1491253004/120001
5 years ago (2015-12-07 10:37:56 UTC) #33
sof
On 2015/12/07 07:23:36, haraken wrote: > https://codereview.chromium.org/1491253004/diff/100001/third_party/WebKit/Source/platform/heap/Handle.h > File third_party/WebKit/Source/platform/heap/Handle.h (right): > > https://codereview.chromium.org/1491253004/diff/100001/third_party/WebKit/Source/platform/heap/Handle.h#newcode1300 > ...
5 years ago (2015-12-07 10:51:42 UTC) #34
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/106068)
5 years ago (2015-12-07 11:53:23 UTC) #36
haraken
LGTM! https://codereview.chromium.org/1491253004/diff/120001/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp File third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp (right): https://codereview.chromium.org/1491253004/diff/120001/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp#newcode71 third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp:71: LEAK_SANITIZER_IGNORE_OBJECT(sheet.get()); This is the only use case of ...
5 years ago (2015-12-07 14:46:10 UTC) #37
sof
https://codereview.chromium.org/1491253004/diff/120001/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp File third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp (right): https://codereview.chromium.org/1491253004/diff/120001/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp#newcode71 third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp:71: LEAK_SANITIZER_IGNORE_OBJECT(sheet.get()); On 2015/12/07 14:46:10, haraken wrote: > > This ...
5 years ago (2015-12-07 15:09:28 UTC) #38
sof
https://codereview.chromium.org/1491253004/diff/120001/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp File third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp (right): https://codereview.chromium.org/1491253004/diff/120001/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp#newcode71 third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp:71: LEAK_SANITIZER_IGNORE_OBJECT(sheet.get()); On 2015/12/07 15:09:28, sof wrote: > On 2015/12/07 ...
5 years ago (2015-12-07 16:59:17 UTC) #39
sof
Going ahead with this one in its current shape.
5 years ago (2015-12-07 18:51:24 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1491253004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1491253004/140001
5 years ago (2015-12-07 18:52:59 UTC) #45
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years ago (2015-12-07 21:45:54 UTC) #47
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/5699ffefdcb17f5150f0d9342d21f73b3e8958b7 Cr-Commit-Position: refs/heads/master@{#363591}
5 years ago (2015-12-07 21:46:56 UTC) #49
haraken
A revert of this CL (patchset #8 id:140001) has been created in https://codereview.chromium.org/1505003003/ by haraken@chromium.org. ...
5 years ago (2015-12-08 01:53:08 UTC) #50
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1491253004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1491253004/160001
5 years ago (2015-12-08 06:43:39 UTC) #53
sof
mea culpa; non-LSan compilation issue addressed.
5 years ago (2015-12-08 07:41:08 UTC) #54
haraken
LGTM
5 years ago (2015-12-08 07:49:08 UTC) #55
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-08 09:10:00 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1491253004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1491253004/160001
5 years ago (2015-12-08 10:05:44 UTC) #60
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years ago (2015-12-08 10:13:53 UTC) #62
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/6918d00fae1ab739f89393378fa4adddabacafd2 Cr-Commit-Position: refs/heads/master@{#363780}
5 years ago (2015-12-08 10:14:59 UTC) #64
Lambros
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/1502153005/ by lambroslambrou@chromium.org. ...
5 years ago (2015-12-08 22:38:51 UTC) #65
sof
relanding; i have no access to the build logs of the revert, but that branch ...
5 years ago (2015-12-09 06:22:59 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1491253004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1491253004/160001
5 years ago (2015-12-09 06:23:27 UTC) #70
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years ago (2015-12-09 06:27:44 UTC) #72
commit-bot: I haz the power
5 years ago (2015-12-09 06:28:25 UTC) #74
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/2e088a7ecaf6c26f44c309b7bab507aeddb41365
Cr-Commit-Position: refs/heads/master@{#363994}

Powered by Google App Engine
This is Rietveld 408576698