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

Issue 654678 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Create a separate component for DiscardableMemoryAllocator

Project Member Reported by sadrul@chromium.org, Oct 11 2016

Issue description

In mus+ash, when ash is run in a separate process from chrome, it doesn't get a DiscardableMemoryAllocator instance. This ends up causing a crash in skia land (when trying to show a notification, for example). A sample stack trace:

[17424:17599:0407/104432:672142166511:FATAL:discardable_memory_allocator.cc(30)] Check failed: g_allocator. 
#0 0x7f9ef76d6e1e base::debug::StackTrace::StackTrace()
#1 0x7f9ef772ca1c logging::LogMessage::~LogMessage()
#2 0x7f9ef772fc3d base::DiscardableMemoryAllocator::GetInstance()
#3 0x7f9ef25de2d4 SkDiscardableMemory::Create()
#4 0x7f9ef2794e1d SkResourceCache::newCachedData()
#5 0x7f9ef2795a30 SkResourceCache::NewCachedData()
#6 0x7f9ef2880172 copy_mask_to_cacheddata()
#7 0x7f9ef287d728 add_cached_rects()
#8 0x7f9ef287d3c4 SkBlurMaskFilterImpl::filterRectsToNine()
#9 0x7f9ef2700a00 SkMaskFilter::filterPath()
#10 0x7f9ef2697cb0 SkDraw::drawPath()
#11 0x7f9ef26241e3 SkDraw::drawPath()
#12 0x7f9ef2696946 SkDraw::drawRect()
#13 0x7f9ef2624181 SkDraw::drawRect()
#14 0x7f9ef2623449 SkBitmapDevice::drawRect()
#15 0x7f9ef266bba1 SkCanvas::onDrawRect()
#16 0x7f9ef266a6e5 SkCanvas::drawRect()
#17 0x7f9ef27714c9 SkRecords::Draw::draw<>()
#18 0x7f9ef271323d SkRecords::Draw::operator()<>()
#19 0x7f9ef2713aa2 SkMiniPicture<>::playback()
#20 0x7f9ef2670c10 SkCanvas::drawPicture()
#21 0x7f9ef3162d74 SkCanvas::drawPicture()
#22 0x7f9ef31665ff cc::DrawingDisplayItem::Raster()
#23 0x7f9ef3160e1c cc::DisplayItemList::Raster()
#24 0x7f9ef316a346 cc::RasterSource::RasterCommon()
#25 0x7f9ef3169a30 cc::RasterSource::PlaybackToCanvas()
#26 0x7f9ef31af017 cc::TileTaskWorkerPool::PlaybackToMemory()
#27 0x7f9ef31b0d24 cc::(anonymous namespace)::RasterBufferImpl::Playback()
#28 0x7f9ef3250f29 cc::(anonymous namespace)::RasterTaskImpl::RunOnWorkerThread()
#29 0x7f9ef318ce77 cc::SingleThreadTaskGraphRunner::RunTaskWithLockAcquired()
#30 0x7f9ef318cbe8 cc::SingleThreadTaskGraphRunner::Run()
#31 0x7f9ef78511c3 base::DelegateSimpleThread::Run()
#32 0x7f9ef7850fb1 base::SimpleThread::ThreadMain()
#33 0x7f9ef784275a base::(anonymous namespace)::ThreadFunc()
#34 0x7f9ef58c9182 start_thread
#35 0x7f9ef55f647d clone


Currently for chrome browser, there's a HostDiscardableSharedMemoryManager, and for chrome-renderers, there's a corresponding ChildDiscardableSharedMemoryManager. It should be possible to move this code into a separate components (e.g. //components/discardable_memory, or perhaps even //services/discardable_memory?), so that mus-apps can use ChildDiscardableSharedMemoryManager through the mus client-lib, and communicate to HostDiscardableSharedMemoryManager living in mus-ws.

go/discardable-memory provides a good overview of how the discardable memory system works.

 
FYI - I have seen this assertion failure in interactive_ui_tests when not running in mustash.

In particular, patchset 4 of https://codereview.chromium.org/2400553002/ fails AshNativeCursorManagerTest.CursorChangeOnEnterNotify on linux_chromium_chromeos_rel_ng with that stack.

That patchset of the CL turned on display-changed notifications for all display configuration changes in tests.

I'm not sure which process is crashing in the test, but it isn't the browser process. The pid/thread id is different.

[2549:2549:1010/105456:7408391219:WARNING:display_manager.cc(1280)] Could not find display:20
Xlib:  extension "RANDR" missing on display ":9".
[2549:2550:1010/105456:7408426472:FATAL:discardable_memory_allocator.cc(30)] Check failed: g_allocator.
#0 0x000002adba5e base::debug::StackTrace::StackTrace()
#1 0x000002af20ba logging::LogMessage::~LogMessage()
#2 0x000002af2f9e base::DiscardableMemoryAllocator::GetInstance()
#3 0x0000027cef69 SkDiscardableMemory::Create()
#4 0x0000026a2a3e SkResourceCache::newCachedData()
#5 0x0000026a341f SkResourceCache::NewCachedData()
#6 0x000002899e04 SkBlurMaskFilterImpl::filterRectsToNine()
#7 0x00000265b245 SkMaskFilter::filterPath()
#8 0x00000264cca6 SkDraw::drawDevPath()
#9 0x00000264d199 SkDraw::drawPath()
#10 0x00000264c121 SkDraw::drawRect()
#11 0x00000263739b SkCanvas::onDrawRect()
#12 0x000002829c8f SkMiniPicture<>::playback()
#13 0x00000263e04b SkCanvas::drawPicture()
#14 0x00000314ec4d cc::DrawingDisplayItem::Raster()
#15 0x00000314cb8a cc::DisplayItemList::Raster()
#16 0x00000315026f cc::RasterSource::RasterCommon()
#17 0x00000314fca3 cc::RasterSource::PlaybackToCanvas()
#18 0x000003154cff cc::RasterBufferProvider::PlaybackToMemory()
#19 0x0000031541f4 cc::OneCopyRasterBufferProvider::PlaybackToStagingBuffer()
#20 0x0000031536d5 cc::OneCopyRasterBufferProvider::PlaybackAndCopyOnWorkerThread()
#21 0x0000031533ce cc::OneCopyRasterBufferProvider::RasterBufferImpl::Playback()
#22 0x00000317f688 cc::(anonymous namespace)::RasterTaskImpl::RunOnWorkerThread()
#23 0x0000030d4045 cc::SingleThreadTaskGraphRunner::RunTaskWithLockAcquired()
#24 0x0000030d3f50 cc::SingleThreadTaskGraphRunner::Run()
#25 0x000002b4175b base::DelegateSimpleThread::Run()
#26 0x000002b4158d base::SimpleThread::ThreadMain()
#27 0x000002b3c55c base::(anonymous namespace)::ThreadFunc()
#28 0x7f6ffe449e9a start_thread
#29 0x7f6ff97ab36d clone

@#1, I guess interactive_ui_tests is not setting an allocator. base::TestDiscardableMemoryAllocator should be fine for testing purposes. Example:

https://cs.chromium.org/chromium/src/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc?rcl=1476184839&l=77
Cc: fsam...@chromium.org
Is discardable memory only used for graphics or do other subsystems use discardable memory? If it's not just graphics, then I wonder if it makes sense for it not to be in the window server.
As per an offline conversation with sadrul, I think it makes sense to keep this as a service or component, and put it in the window server for now, and once we have another persistent process (ala "Core services") maybe we can move it to there.
Last time I checked discardable system was used by skia (shaders, masks), cc (images) and blink's resource cache.
Owner: penghuang@chromium.org
Status: Assigned (was: Available)
My plan(steps) for this issue:
1. Move {Host, Child}DiscardableSharedMemoryManager into //components/discardable_memory 
2. Replace Chrome IPC with mojo IPC
3. Use it in mus+ash

WDYT?

sgtm
Overall sounds good, yeah. It may make sense to leave the IPC code out of the component for now. That way, mus/mus+ash can start using it before the chrome IPC is replaced with mojo IPC.
Project Member

Comment 11 by bugdroid1@chromium.org, Nov 2 2016

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

commit d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d
Author: penghuang <penghuang@chromium.org>
Date: Wed Nov 02 20:06:06 2016

Move discardable memory  to //components from //content

BUG= 654678 

Review-Url: https://codereview.chromium.org/2459733002
Cr-Commit-Position: refs/heads/master@{#429380}

[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/BUILD.gn
[add] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/OWNERS
[add] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/client/BUILD.gn
[rename] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/client/client_discardable_shared_memory_manager.cc
[rename] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/client/client_discardable_shared_memory_manager.h
[add] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/common/BUILD.gn
[add] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/common/discardable_memory_export.h
[rename] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/common/discardable_shared_memory_heap.cc
[rename] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/common/discardable_shared_memory_heap.h
[rename] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/common/discardable_shared_memory_heap_perftest.cc
[rename] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/common/discardable_shared_memory_heap_unittest.cc
[add] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/common/discardable_shared_memory_id.h
[add] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/service/BUILD.gn
[rename] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/service/discardable_shared_memory_manager.cc
[rename] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/service/discardable_shared_memory_manager.h
[rename] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/components/discardable_memory/service/discardable_shared_memory_manager_unittest.cc
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/browser/BUILD.gn
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/browser/DEPS
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/browser/browser_main_loop.cc
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/browser/renderer_host/render_message_filter.cc
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/browser/renderer_host/render_message_filter.h
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/child/BUILD.gn
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/child/DEPS
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/child/child_thread_impl.cc
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/child/child_thread_impl.h
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/child/child_thread_impl_browsertest.cc
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/common/BUILD.gn
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/common/DEPS
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/common/child_process_messages.h
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/ppapi_plugin/BUILD.gn
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/ppapi_plugin/DEPS
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/ppapi_plugin/ppapi_thread.cc
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/renderer/BUILD.gn
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/renderer/DEPS
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/renderer/render_thread_impl.h
[modify] https://crrev.com/d81c1a6966c6e4d1f5e49ae7b1d08a29faa1944d/content/test/BUILD.gn

Project Member

Comment 12 by bugdroid1@chromium.org, Dec 2 2016

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

commit a083f971261bcccc53b64e40c911435857ce3bfd
Author: penghuang <penghuang@chromium.org>
Date: Fri Dec 02 17:51:06 2016

discardable_memory: Using mojo IPC to replace Chrome IPC

It also moves ClientDiscardableSharedMemoryManager from ChildThreadImpl
to RenderThreadImpl and PpapiThread

BUG= 654678 

Review-Url: https://codereview.chromium.org/2485623002
Cr-Commit-Position: refs/heads/master@{#435969}

[add] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/components/discardable_memory/DEPS
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/components/discardable_memory/client/BUILD.gn
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/components/discardable_memory/client/client_discardable_shared_memory_manager.cc
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/components/discardable_memory/client/client_discardable_shared_memory_manager.h
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/components/discardable_memory/common/BUILD.gn
[delete] https://crrev.com/717c47846e109ad0f0582d1b63555246232ba450/components/discardable_memory/common/discardable_shared_memory_id.h
[add] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/components/discardable_memory/public/interfaces/BUILD.gn
[add] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/components/discardable_memory/public/interfaces/OWNERS
[add] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/components/discardable_memory/public/interfaces/discardable_shared_memory_manager.mojom
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/components/discardable_memory/service/BUILD.gn
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/components/discardable_memory/service/discardable_shared_memory_manager.cc
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/components/discardable_memory/service/discardable_shared_memory_manager.h
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/components/discardable_memory/service/discardable_shared_memory_manager_unittest.cc
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/browser/browser_main_loop.cc
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/browser/renderer_host/render_message_filter.cc
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/browser/renderer_host/render_message_filter.h
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/child/BUILD.gn
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/child/DEPS
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/child/child_thread_impl.cc
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/child/child_thread_impl.h
[delete] https://crrev.com/717c47846e109ad0f0582d1b63555246232ba450/content/child/child_thread_impl_browsertest.cc
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/common/child_process_messages.h
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/common/in_process_child_thread_params.cc
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/common/in_process_child_thread_params.h
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/ppapi_plugin/BUILD.gn
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/ppapi_plugin/DEPS
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/ppapi_plugin/ppapi_thread.cc
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/ppapi_plugin/ppapi_thread.h
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/renderer/DEPS
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/renderer/render_thread_impl.h
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/renderer/render_thread_impl_browsertest.cc
[modify] https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd/content/test/BUILD.gn

Project Member

Comment 13 by bugdroid1@chromium.org, Dec 2 2016

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

commit 23eeee43e2ba326106d915c5023335824a65d8d0
Author: rockot <rockot@chromium.org>
Date: Fri Dec 02 18:20:35 2016

Revert of discardable_memory: Using mojo IPC to replace Chrome IPC (patchset #23 id:490001 of https://codereview.chromium.org/2485623002/ )

Reason for revert:
Causing some failures. Example: https://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Mac

Original issue's description:
> discardable_memory: Using mojo IPC to replace Chrome IPC
>
> It also moves ClientDiscardableSharedMemoryManager from ChildThreadImpl
> to RenderThreadImpl and PpapiThread
>
> BUG= 654678 
>
> Committed: https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd
> Cr-Commit-Position: refs/heads/master@{#435969}

TBR=reveman@chromium.org,avi@chromium.org,dcheng@chromium.org,yzshen@chromium.org,sky@chromium.org,penghuang@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 654678 

Review-Url: https://codereview.chromium.org/2545523007
Cr-Commit-Position: refs/heads/master@{#435980}

[delete] https://crrev.com/ae0797ad640d7b8f55de130790ddc32583f059ab/components/discardable_memory/DEPS
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/components/discardable_memory/client/BUILD.gn
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/components/discardable_memory/client/client_discardable_shared_memory_manager.cc
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/components/discardable_memory/client/client_discardable_shared_memory_manager.h
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/components/discardable_memory/common/BUILD.gn
[add] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/components/discardable_memory/common/discardable_shared_memory_id.h
[delete] https://crrev.com/ae0797ad640d7b8f55de130790ddc32583f059ab/components/discardable_memory/public/interfaces/BUILD.gn
[delete] https://crrev.com/ae0797ad640d7b8f55de130790ddc32583f059ab/components/discardable_memory/public/interfaces/OWNERS
[delete] https://crrev.com/ae0797ad640d7b8f55de130790ddc32583f059ab/components/discardable_memory/public/interfaces/discardable_shared_memory_manager.mojom
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/components/discardable_memory/service/BUILD.gn
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/components/discardable_memory/service/discardable_shared_memory_manager.cc
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/components/discardable_memory/service/discardable_shared_memory_manager.h
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/components/discardable_memory/service/discardable_shared_memory_manager_unittest.cc
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/browser/browser_main_loop.cc
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/browser/renderer_host/render_message_filter.cc
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/browser/renderer_host/render_message_filter.h
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/child/BUILD.gn
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/child/DEPS
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/child/child_thread_impl.cc
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/child/child_thread_impl.h
[add] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/child/child_thread_impl_browsertest.cc
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/common/child_process_messages.h
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/common/in_process_child_thread_params.cc
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/common/in_process_child_thread_params.h
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/ppapi_plugin/BUILD.gn
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/ppapi_plugin/DEPS
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/ppapi_plugin/ppapi_thread.cc
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/ppapi_plugin/ppapi_thread.h
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/renderer/DEPS
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/renderer/render_thread_impl.h
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/renderer/render_thread_impl_browsertest.cc
[modify] https://crrev.com/23eeee43e2ba326106d915c5023335824a65d8d0/content/test/BUILD.gn

Project Member

Comment 14 by bugdroid1@chromium.org, Dec 2 2016

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

commit 342762b5a769ad9ed321ded9254bde4b44a2450b
Author: penghuang <penghuang@chromium.org>
Date: Fri Dec 02 21:04:58 2016

discardable_memory: Using mojo IPC to replace Chrome IPC

It also moves ClientDiscardableSharedMemoryManager from ChildThreadImpl
to RenderThreadImpl and PpapiThread

BUG= 654678 

Committed: https://crrev.com/a083f971261bcccc53b64e40c911435857ce3bfd
Review-Url: https://codereview.chromium.org/2485623002
Cr-Original-Commit-Position: refs/heads/master@{#435969}
Cr-Commit-Position: refs/heads/master@{#436010}

[add] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/components/discardable_memory/DEPS
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/components/discardable_memory/client/BUILD.gn
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/components/discardable_memory/client/client_discardable_shared_memory_manager.cc
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/components/discardable_memory/client/client_discardable_shared_memory_manager.h
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/components/discardable_memory/common/BUILD.gn
[delete] https://crrev.com/466e984d6f16f019055cc1154d392a5b716b696f/components/discardable_memory/common/discardable_shared_memory_id.h
[add] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/components/discardable_memory/public/interfaces/BUILD.gn
[add] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/components/discardable_memory/public/interfaces/OWNERS
[add] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/components/discardable_memory/public/interfaces/discardable_shared_memory_manager.mojom
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/components/discardable_memory/service/BUILD.gn
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/components/discardable_memory/service/discardable_shared_memory_manager.cc
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/components/discardable_memory/service/discardable_shared_memory_manager.h
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/components/discardable_memory/service/discardable_shared_memory_manager_unittest.cc
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/browser/browser_main_loop.cc
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/browser/renderer_host/render_message_filter.cc
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/browser/renderer_host/render_message_filter.h
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/child/BUILD.gn
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/child/DEPS
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/child/child_thread_impl.cc
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/child/child_thread_impl.h
[delete] https://crrev.com/466e984d6f16f019055cc1154d392a5b716b696f/content/child/child_thread_impl_browsertest.cc
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/common/child_process_messages.h
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/common/in_process_child_thread_params.cc
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/common/in_process_child_thread_params.h
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/ppapi_plugin/BUILD.gn
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/ppapi_plugin/DEPS
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/ppapi_plugin/ppapi_thread.cc
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/ppapi_plugin/ppapi_thread.h
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/renderer/DEPS
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/renderer/render_thread_impl.h
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/renderer/render_thread_impl_browsertest.cc
[modify] https://crrev.com/342762b5a769ad9ed321ded9254bde4b44a2450b/content/test/BUILD.gn

Labels: -Pri-2 Pri-1
Status: Started (was: Assigned)
Project Member

Comment 16 by bugdroid1@chromium.org, Dec 17 2016

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

commit d6843e447d292f253b427d04022c4bc562d7aaab
Author: penghuang <penghuang@chromium.org>
Date: Sat Dec 17 13:57:20 2016

Hosting the discardable memory service in the mus process.

With mus+ash, we host the discardable memory service in the mus process.
For classic chrome, we will run the discardable memory service in the
browser process.

BUG= 654678 

Review-Url: https://codereview.chromium.org/2548423002
Cr-Commit-Position: refs/heads/master@{#439342}

[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/components/discardable_memory/client/client_discardable_shared_memory_manager.cc
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/content/browser/browser_main_loop.cc
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/content/ppapi_plugin/DEPS
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/content/ppapi_plugin/ppapi_thread.cc
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/content/public/app/mojo/content_plugin_manifest.json
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/content/public/app/mojo/content_renderer_manifest.json
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/services/ui/BUILD.gn
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/services/ui/DEPS
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/services/ui/manifest.json
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/services/ui/service.cc
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/services/ui/service.h
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/ui/views/mus/BUILD.gn
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/ui/views/mus/DEPS
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/ui/views/mus/mus_client.cc
[modify] https://crrev.com/d6843e447d292f253b427d04022c4bc562d7aaab/ui/views/mus/mus_client.h

Project Member

Comment 17 by bugdroid1@chromium.org, Dec 21 2016

Status: Fixed (was: Started)
Status: Assigned (was: Fixed)
This seems broken again, at least for the ash process. It's blocking some testing I'm trying to do with networking.

Repro:
* Launch chrome --mash
* Click on system tray > Connected to eth1 to open networking submenu
* Try to scroll down
* CHECK failure below

ToT Chrome r449051, Linux desktop, with gn args:

is_component_build = true
is_debug = false
dcheck_always_on = true
use_goma = true
target_os = "chromeos"


[26777:26817:0208/131418.381376:428523999549:FATAL:discardable_memory_allocator.cc(25)] Check failed: g_allocator. 
#0 0x7f42e9556ba7 base::debug::StackTrace::StackTrace()
#1 0x7f42e9577c6a logging::LogMessage::~LogMessage()
#2 0x7f42e95796de base::DiscardableMemoryAllocator::GetInstance()
#3 0x7f42e8117299 SkDiscardableMemory::Create()
#4 0x7f42e82ad63e SkResourceCache::newCachedData()
#5 0x7f42e82ae4fc SkResourceCache::NewCachedData()
#6 0x7f42e8373f4c SkBlurMaskFilterImpl::filterRectsToNine()
#7 0x7f42e8238be5 SkMaskFilter::filterPath()
#8 0x7f42e81f2807 SkDraw::drawDevPath()
#9 0x7f42e81f2d6c SkDraw::drawPath()
#10 0x7f42e81f1b7d SkDraw::drawRect()
#11 0x7f42e816dcab SkCanvas::onDrawRect()
#12 0x7f42e829bef1 SkRecordDraw()
#13 0x7f42e8130cb9 SkBigPicture::playback()
#14 0x7f42e8174d46 SkCanvas::onDrawPicture()
#15 0x7f42e8174c35 SkCanvas::drawPicture()
#16 0x7f42e5b9982d cc::DrawingDisplayItem::Raster()
#17 0x7f42e5b9848a cc::DisplayItemList::Raster()
#18 0x7f42e5b9bdaf cc::RasterSource::PlaybackToCanvas()
#19 0x7f42e5b9ba83 cc::RasterSource::PlaybackToCanvas()
#20 0x7f42e5ba6b37 cc::RasterBufferProvider::PlaybackToMemory()
#21 0x7f42e5bb3ec5 cc::(anonymous namespace)::RasterBufferImpl::Playback()
#22 0x7f42e5bff1ce cc::(anonymous namespace)::RasterTaskImpl::RunOnWorkerThread()
#23 0x7f42e5ba8163 cc::SingleThreadTaskGraphRunner::RunTaskWithLockAcquired()
#24 0x7f42e5ba8070 cc::SingleThreadTaskGraphRunner::Run()
#25 0x7f42e95f158b base::DelegateSimpleThread::Run()
#26 0x7f42e95f12b5 base::SimpleThread::ThreadMain()
#27 0x7f42e95eb17c base::(anonymous namespace)::ThreadFunc()
#28 0x7f42e96c7184 start_thread
#29 0x7f42e07a537d clone

Maybe the new service was never hooked up to the ash process?

If something needs to be initialized WmShellMus might be the place to do it.

I'm still seeing the crash in comment 19 when trying to scroll the networking submenu. It happens on device.

Did discardable memory ever get hooked up to the ash process?

Do we use MusClient for ash process? DiscardableMemoryAllocator is initialized in MusClient[1].

[1] https://cs.chromium.org/chromium/src/ui/views/mus/mus_client.cc?type=cs&l=96

Project Member

Comment 23 by bugdroid1@chromium.org, Mar 15 2017

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

commit 23063f03278074e92ea6b70efa36280e95df05a5
Author: penghuang <penghuang@chromium.org>
Date: Wed Mar 15 15:04:07 2017

Setup DiscardableMemory for ash process

Move DiscardableMemory client side setup code from MusClient to
WIndowTreeClient, so the discardable memory will work not only
in regular mus clients but also in the window manager (ash).

BUG= 654678 

Review-Url: https://codereview.chromium.org/2741063002
Cr-Commit-Position: refs/heads/master@{#457081}

[modify] https://crrev.com/23063f03278074e92ea6b70efa36280e95df05a5/ash/mus/window_manager_unittest.cc
[modify] https://crrev.com/23063f03278074e92ea6b70efa36280e95df05a5/services/ui/ws/window_manager_client_unittest.cc
[modify] https://crrev.com/23063f03278074e92ea6b70efa36280e95df05a5/services/ui/ws/window_server_test_base.cc
[modify] https://crrev.com/23063f03278074e92ea6b70efa36280e95df05a5/ui/aura/BUILD.gn
[modify] https://crrev.com/23063f03278074e92ea6b70efa36280e95df05a5/ui/aura/mus/DEPS
[modify] https://crrev.com/23063f03278074e92ea6b70efa36280e95df05a5/ui/aura/mus/window_tree_client.cc
[modify] https://crrev.com/23063f03278074e92ea6b70efa36280e95df05a5/ui/aura/mus/window_tree_client.h
[modify] https://crrev.com/23063f03278074e92ea6b70efa36280e95df05a5/ui/views/mus/BUILD.gn
[modify] https://crrev.com/23063f03278074e92ea6b70efa36280e95df05a5/ui/views/mus/DEPS
[modify] https://crrev.com/23063f03278074e92ea6b70efa36280e95df05a5/ui/views/mus/mus_client.cc
[modify] https://crrev.com/23063f03278074e92ea6b70efa36280e95df05a5/ui/views/mus/mus_client.h

Status: Fixed (was: Assigned)
Cc: kjlubick@chromium.org kjlubick@google.com
Components: -Internals>MUS Internals>Services>WindowService

Sign in to add a comment