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

Issue 1870503002: Making CSSValue Pool thread local (Closed)

Created:
4 years, 8 months ago by xlai (Olivia)
Modified:
4 years, 8 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, chromium-reviews, dglazkov+blink, rwlbuis, jbroman, Ian Vollick, Justin Novosad
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Making CSSValue Pool thread local CSSValuePool was used to be static instance on main thread only. But OffscreenCanvas in a worker requires to access the CSS value caches in a non-main thread. This patch uses the ThreadSpecific persistent handles to create static CSSValuePool instances per thread when needed, and the cleanup code is handled in ThreadState::cleanup() added by patch https://codereview.chromium.org/1881933005. As a result, WebKit unit tests (which does not use the ThreadState::cleanup() as the worker thread) need to be modified so that false positive leak errors will not be reported. In addition, an indirect memory leak "__strdup /build/eglibc-3GlaMS/eglibc-2.19/string/strdup.c" is generated in webkit unit tests; but after printing out the full error stack trace, we observe that it eventually originates from libfontconfig, a third_party library that has leaks and has already been suppressed in leak_suppression.cc. But the default stack trace is too short on suppress this indirect memory leak; so we added one more leak suppression underneath the libfontconfig. BUG=599659 Committed: https://crrev.com/1174eb6ddb160985b51d1d45321e24c493aa7f83 Cr-Commit-Position: refs/heads/master@{#388815}

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : Fixing ASAN memory leaks in 2 unit tests #

Total comments: 2

Patch Set 4 : Change based on eugenis's feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -17 lines) Patch
M build/sanitizers/lsan_suppressions.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSValuePool.cpp View 1 2 chunks +8 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/ThreadState.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/ThreadState.cpp View 1 2 2 chunks +10 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/tests/RunAllTests.cpp View 1 2 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 43 (17 generated)
esprehn
haraken@ This seems like it should work. I also think we should change DEFINE_STATIC_LOCAL to ...
4 years, 8 months ago (2016-04-06 23:23:59 UTC) #3
haraken
On 2016/04/06 23:23:59, esprehn wrote: > haraken@ This seems like it should work. I also ...
4 years, 8 months ago (2016-04-07 02:37:35 UTC) #5
esprehn
What's the timeline on fixing oilpan to support thread local statics? I'm worried we're going ...
4 years, 8 months ago (2016-04-07 03:05:52 UTC) #6
haraken
On 2016/04/07 03:05:52, esprehn wrote: > What's the timeline on fixing oilpan to support thread ...
4 years, 8 months ago (2016-04-07 04:27:55 UTC) #7
esprehn
On 2016/04/07 at 04:27:55, haraken wrote: > On 2016/04/07 03:05:52, esprehn wrote: > > What's ...
4 years, 8 months ago (2016-04-07 04:34:42 UTC) #8
haraken
On 2016/04/07 04:34:42, esprehn wrote: > On 2016/04/07 at 04:27:55, haraken wrote: > > On ...
4 years, 8 months ago (2016-04-07 04:41:55 UTC) #9
xlai (Olivia)
On 2016/04/07 04:41:55, haraken wrote: > On 2016/04/07 04:34:42, esprehn wrote: > > On 2016/04/07 ...
4 years, 8 months ago (2016-04-07 15:19:40 UTC) #10
sof
On 2016/04/07 04:41:55, haraken wrote: > On 2016/04/07 04:34:42, esprehn wrote: > > On 2016/04/07 ...
4 years, 8 months ago (2016-04-07 15:38:05 UTC) #11
haraken
On 2016/04/07 15:19:40, xlai (Olivia) wrote: > On 2016/04/07 04:41:55, haraken wrote: > > On ...
4 years, 8 months ago (2016-04-08 01:29:14 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870503002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870503002/40001
4 years, 8 months ago (2016-04-18 15:09:49 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/147525)
4 years, 8 months ago (2016-04-18 16:47:23 UTC) #16
xlai (Olivia)
After jbroman@'s patch (https://codereview.chromium.org/1881933005/) that cleans up static thread-specific persistent has been landed, I continue ...
4 years, 8 months ago (2016-04-18 18:42:37 UTC) #17
xlai (Olivia)
Alright, this has something to do with the webkit unit tests: the ThreadState is not ...
4 years, 8 months ago (2016-04-18 22:17:44 UTC) #18
haraken
The change LGTM, once you fix the unit tests (before landing this CL).
4 years, 8 months ago (2016-04-19 01:00:48 UTC) #19
xlai (Olivia)
Adding eugenis@ to review the sanitizers/ eugenis@: Right now, the webkit unit tests generate false ...
4 years, 8 months ago (2016-04-20 13:53:11 UTC) #23
Evgeniy Stepanov
https://codereview.chromium.org/1870503002/diff/60001/build/sanitizers/lsan_suppressions.cc File build/sanitizers/lsan_suppressions.cc (right): https://codereview.chromium.org/1870503002/diff/60001/build/sanitizers/lsan_suppressions.cc#newcode28 build/sanitizers/lsan_suppressions.cc:28: "leak:eglibc-2.19/string\n" This would break on any different version of ...
4 years, 8 months ago (2016-04-20 20:53:26 UTC) #25
Evgeniy Stepanov
https://codereview.chromium.org/1870503002/diff/60001/build/sanitizers/lsan_suppressions.cc File build/sanitizers/lsan_suppressions.cc (right): https://codereview.chromium.org/1870503002/diff/60001/build/sanitizers/lsan_suppressions.cc#newcode28 build/sanitizers/lsan_suppressions.cc:28: "leak:eglibc-2.19/string\n" On 2016/04/20 20:53:26, Evgeniy Stepanov wrote: > This ...
4 years, 8 months ago (2016-04-20 21:13:07 UTC) #26
xlai (Olivia)
On 2016/04/20 21:13:07, Evgeniy Stepanov wrote: > https://codereview.chromium.org/1870503002/diff/60001/build/sanitizers/lsan_suppressions.cc > File build/sanitizers/lsan_suppressions.cc (right): > > https://codereview.chromium.org/1870503002/diff/60001/build/sanitizers/lsan_suppressions.cc#newcode28 ...
4 years, 8 months ago (2016-04-20 21:41:53 UTC) #27
Evgeniy Stepanov
On 2016/04/20 21:41:53, xlai (Olivia) wrote: > On 2016/04/20 21:13:07, Evgeniy Stepanov wrote: > > ...
4 years, 8 months ago (2016-04-20 21:42:51 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870503002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870503002/80001
4 years, 8 months ago (2016-04-21 14:27:15 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/54184) linux_chromium_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 8 months ago (2016-04-21 14:45:42 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870503002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870503002/80001
4 years, 8 months ago (2016-04-21 14:53:00 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/209014)
4 years, 8 months ago (2016-04-21 15:13:27 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870503002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870503002/80001
4 years, 8 months ago (2016-04-21 16:48:47 UTC) #39
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 8 months ago (2016-04-21 18:16:26 UTC) #41
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:36:12 UTC) #43
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/1174eb6ddb160985b51d1d45321e24c493aa7f83
Cr-Commit-Position: refs/heads/master@{#388815}

Powered by Google App Engine
This is Rietveld 408576698