mojo edk dcheck hit: "Check failed: max_handles_ <= kMaxAttachedHandles (81 vs. 64)" from ImageDecoder service |
|||
Issue descriptionOn my nautilus and eve, test images 10614.0.0, developer build #553547, just deploying the simplechrome compiled with dcheck_always_on=true, I'm always hitting this peculiar DCHECK (see below for symbolized callstack). 100% reproducible. [1:1:0501/174413.961577:FATAL:channel.cc(87)] Check failed: max_handles_ <= kMaxAttachedHandles (81 vs. 64) #0 0x59672b81935c base::debug::StackTrace::StackTrace() #1 0x59672b789360 logging::LogMessage::~LogMessage() #2 0x59672923a3fc mojo::edk::Channel::Message::Message() #3 0x59672924957e mojo::edk::NodeChannel::CreateEventMessage() #4 0x5967292599f6 mojo::edk::(anonymous namespace)::CreateOrExtendSerializedEventMessage() #5 0x59672925aa03 mojo::edk::UserMessageImpl::CommitSize() #6 0x59672923da45 mojo::edk::Core::AppendMessageData() #7 0x596729238f38 MojoAppendMessageDataImpl #8 0x59672bd9da58 mojo::internal::Buffer::Seal() #9 0x59672bd9f4cc mojo::Message::TakeMojoMessage() #10 0x59672bd89694 mojo::Connector::Accept() #11 0x59672bd944d3 mojo::internal::MultiplexRouter::InterfaceEndpoint::SendMessage() #12 0x59672bd8c49b mojo::InterfaceEndpointClient::Accept() #13 0x59672bd8d6d3 mojo::(anonymous namespace)::ResponderThunk::Accept() #14 0x596729bf4c07 data_decoder::mojom::ImageDecoder_DecodeAnimation_ProxyToResponder::Run() #15 0x596729bf5c47 _ZN4base8internal7InvokerINS0_9BindStateIMN12data_decoder5mojom45ImageDecoder_DecodeAnimation_ProxyToResponderEFvNSt3__16vectorIN4mojo9StructPtrINS4_14AnimationFrameEEENS6_9allocatorISB_EEEEEJNS6_10unique_ptrIS5_NS6_14default_deleteIS5_EEEEEEEFvSE_EE7RunOnceEPNS0_13BindStateBaseEOSE_ #16 0x59672b36e5ac data_decoder::ImageDecoderImpl::DecodeAnimation() #17 0x596729bf4f18 data_decoder::mojom::ImageDecoderStubDispatch::AcceptWithResponder() #18 0x59672b36d226 data_decoder::mojom::ImageDecoderStub<>::AcceptWithResponder() #19 0x59672bd8b6dd mojo::InterfaceEndpointClient::HandleValidatedMessage() #20 0x59672bd8b2b6 mojo::FilterChain::Accept() #21 0x59672bd8cc02 mojo::InterfaceEndpointClient::HandleIncomingMessage() #22 0x59672bd9301d mojo::internal::MultiplexRouter::ProcessIncomingMessage() #23 0x59672bd923d0 mojo::internal::MultiplexRouter::Accept() #24 0x59672bd8b2b6 mojo::FilterChain::Accept() #25 0x59672bd890ab mojo::Connector::ReadSingleMessage() #26 0x59672bd89b54 mojo::Connector::ReadAllAvailableMessages() #27 0x59672bd899b6 mojo::Connector::OnHandleReadyInternal() #28 0x596729268bb4 mojo::SimpleWatcher::DiscardReadyState() #29 0x59672bd83225 mojo::SimpleWatcher::OnHandleReady() #30 0x59672bd837ae _ZN4base8internal7InvokerINS0_9BindStateIMN4mojo13SimpleWatcherEFvijRKNS3_18HandleSignalsStateEEJNS_7WeakPtrIS4_EEijS5_EEEFvvEE7RunImplIRKS9_RKNSt3__15tupleIJSB_ijS5_EEEJLm0ELm1ELm2ELm3EEEEvOT_OT0_NSI_16integer_sequenceImJXspT1_EEEE #31 0x59672b771f7e base::debug::TaskAnnotator::RunTask() #32 0x59672b8400a6 base::internal::IncomingTaskQueue::RunTask() #33 0x59672b791b96 base::MessageLoop::RunTask() #34 0x59672b791fa7 base::MessageLoop::DeferOrRunPendingTask() #35 0x59672b792238 base::MessageLoop::DoWork() #36 0x59672b794386 base::MessagePumpDefault::Run() #37 0x59672b7914c1 base::MessageLoop::Run() #38 0x59672b7bd216 base::RunLoop::Run() #39 0x59672b369b8b content::UtilityMain() #40 0x59672b3913ad content::RunZygote() #41 0x59672b391c3d content::RunNamedProcessTypeMain() #42 0x59672b392f83 content::ContentMainRunnerImpl::Run() #43 0x59672b39f79e service_manager::Main() #44 0x59672b390801 content::ContentMain() #45 0x5967286e8a3f ChromeMain #46 0x7ad18ac52736 __libc_start_main #47 0x5967286e8879 _start Received signal 6 #0 0x59672b81935c base::debug::StackTrace::StackTrace() #1 0x59672b818e31 base::debug::(anonymous namespace)::StackDumpSignalHandler() #2 0x7ad18bba62e0 <unknown> #3 0x7ad18ac65dd2 gsignal #4 0x7ad18ac67bf6 abort #5 0x59672b817b85 base::debug::BreakDebugger() #6 0x59672b7897e9 logging::LogMessage::~LogMessage() #7 0x59672923a3fc mojo::edk::Channel::Message::Message() #8 0x59672924957e mojo::edk::NodeChannel::CreateEventMessage() #9 0x5967292599f6 mojo::edk::(anonymous namespace)::CreateOrExtendSerializedEventMessage() #10 0x59672925aa03 mojo::edk::UserMessageImpl::CommitSize() #11 0x59672923da45 mojo::edk::Core::AppendMessageData() #12 0x596729238f38 MojoAppendMessageDataImpl #13 0x59672bd9da58 mojo::internal::Buffer::Seal() #14 0x59672bd9f4cc mojo::Message::TakeMojoMessage() #15 0x59672bd89694 mojo::Connector::Accept() #16 0x59672bd944d3 mojo::internal::MultiplexRouter::InterfaceEndpoint::SendMessage() #17 0x59672bd8c49b mojo::InterfaceEndpointClient::Accept() #18 0x59672bd8d6d3 mojo::(anonymous namespace)::ResponderThunk::Accept() #19 0x596729bf4c07 data_decoder::mojom::ImageDecoder_DecodeAnimation_ProxyToResponder::Run() #20 0x596729bf5c47 _ZN4base8internal7InvokerINS0_9BindStateIMN12data_decoder5mojom45ImageDecoder_DecodeAnimation_ProxyToResponderEFvNSt3__16vectorIN4mojo9StructPtrINS4_14AnimationFrameEEENS6_9allocatorISB_EEEEEJNS6_10unique_ptrIS5_NS6_14default_deleteIS5_EEEEEEEFvSE_EE7RunOnceEPNS0_13BindStateBaseEOSE_ #21 0x59672b36e5ac data_decoder::ImageDecoderImpl::DecodeAnimation() #22 0x596729bf4f18 data_decoder::mojom::ImageDecoderStubDispatch::AcceptWithResponder() #23 0x59672b36d226 data_decoder::mojom::ImageDecoderStub<>::AcceptWithResponder() #24 0x59672bd8b6dd mojo::InterfaceEndpointClient::HandleValidatedMessage() #25 0x59672bd8b2b6 mojo::FilterChain::Accept() #26 0x59672bd8cc02 mojo::InterfaceEndpointClient::HandleIncomingMessage() #27 0x59672bd9301d mojo::internal::MultiplexRouter::ProcessIncomingMessage() #28 0x59672bd923d0 mojo::internal::MultiplexRouter::Accept() #29 0x59672bd8b2b6 mojo::FilterChain::Accept() #30 0x59672bd890ab mojo::Connector::ReadSingleMessage() #31 0x59672bd89b54 mojo::Connector::ReadAllAvailableMessages() #32 0x59672bd899b6 mojo::Connector::OnHandleReadyInternal() #33 0x596729268bb4 mojo::SimpleWatcher::DiscardReadyState() #34 0x59672bd83225 mojo::SimpleWatcher::OnHandleReady() #35 0x59672bd837ae _ZN4base8internal7InvokerINS0_9BindStateIMN4mojo13SimpleWatcherEFvijRKNS3_18HandleSignalsStateEEJNS_7WeakPtrIS4_EEijS5_EEEFvvEE7RunImplIRKS9_RKNSt3__15tupleIJSB_ijS5_EEEJLm0ELm1ELm2ELm3EEEEvOT_OT0_NSI_16integer_sequenceImJXspT1_EEEE #36 0x59672b771f7e base::debug::TaskAnnotator::RunTask() #37 0x59672b8400a6 base::internal::IncomingTaskQueue::RunTask() #38 0x59672b791b96 base::MessageLoop::RunTask() #39 0x59672b791fa7 base::MessageLoop::DeferOrRunPendingTask() #40 0x59672b792238 base::MessageLoop::DoWork() #41 0x59672b794386 base::MessagePumpDefault::Run() #42 0x59672b7914c1 base::MessageLoop::Run() #43 0x59672b7bd216 base::RunLoop::Run() #44 0x59672b369b8b content::UtilityMain() #45 0x59672b3913ad content::RunZygote() #46 0x59672b391c3d content::RunNamedProcessTypeMain() #47 0x59672b392f83 content::ContentMainRunnerImpl::Run() #48 0x59672b39f79e service_manager::Main() #49 0x59672b390801 content::ContentMain() #50 0x5967286e8a3f ChromeMain #51 0x7ad18ac52736 __libc_start_main #52 0x5967286e8879 _start r8: 0000000000000000 r9: 00007ad18a645740 r10: 0000000000000008 r11: 0000000000000202 r12: 00007fff6b536991 r13: 00007fff6b536f38 r14: 00007fff6b536ae0 r15: 00007fff6b536990 di: 0000000000000001 si: 0000000000000001 bp: 00007fff6b536950 bx: 00007fff6b536ae0 dx: 0000000000000006 ax: 0000000000000000 cx: 00007ad18ac65dd2 sp: 00007fff6b536828 ip: 00007ad18ac65dd2 efl: 0000000000000202 cgf: 0000000000000033 erf: 0000000000000000 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000 [end of stack trace] Calling _exit(1). Core file will not be generated. [10790:10790:0501/174418.390318:ERROR:login_user_view.cc(135)] Decoding user avatar failed [10790:10790:0501/174420.106557:ERROR:CONSOLE(217)] "Unexpected condition on chrome://oobe/gaia-signin: Could not find value for languageList", source: chrome://resources/js/load_time_data.js (217)
,
May 1 2018
,
May 1 2018
So I changed SkBitmap to fall back onto shared memory when the pixel data exceeds 64 kB. This means that for large animation frames, every frame will be a separate shared buffer. This is still more desirable than having a very large message inlining all the pixel data, but now we hit max handle limitations in Mojo.
We should probably just switch DecodeAnimation to use InlineSkBitmap for now since it's a simple change that reflects how things were before my SkBitmap change. We could also lift the handle limit, but it's arbitrary and 64 is pretty large already.
Sending tons of inline image data in an IPC seems undesirable in any case though, so we should consider introducing a new mojom type to carry a set of images of the same type, using a single shared buffer for all frame data, e.g.:
// Assuming all frames share the same ImageInfo and row_bytes values.
struct SkBitmapArray {
ImageInfo frames_image_info;
uint64 frames_row_bytes;
mojo_base.mojom.BigBuffer frames_pixel_data;
};
This could even be typemapped to a std::vector<SkBitmap> for caller convenience.
,
May 2 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e64312366bcee51fdcee5704c41bc091242cea1e commit e64312366bcee51fdcee5704c41bc091242cea1e Author: Ken Rockot <rockot@chromium.org> Date: Wed May 02 03:03:24 2018 data_decoder: Use inline bitmap data for animations Using a normal skia Bitmap mojom type means that large frames may be transmitted as shared memory regions, which in turn means that animations with more than 64 large frames can cause DecodeAnimation's reply to exceed Mojo's self-imposed per-message handle limitation. This is a temporary solution which restores DecodeAnimation to using inline bitmap data (which it did prior to CL:1004598). Bug: 838706 Change-Id: I53542a0070b6d554b52c6b0e3576b94af233a9f4 Reviewed-on: https://chromium-review.googlesource.com/1038760 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Ken Rockot <rockot@chromium.org> Cr-Commit-Position: refs/heads/master@{#555293} [modify] https://crrev.com/e64312366bcee51fdcee5704c41bc091242cea1e/services/data_decoder/public/mojom/image_decoder.mojom
,
May 2 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mcasas@chromium.org
, May 1 2018