New issue
Advanced search Search tips

Issue 777465 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

PDFExtensionTest.ContextMenuCoordinates failing on mojo_linux bot

Project Member Reported by qin...@chromium.org, Oct 23 2017

Issue description

Project Member

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

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

commit 6fc01b37e06767e502ad74fb108a96ea38e714fc
Author: Min Qin <qinmin@chromium.org>
Date: Mon Oct 23 16:46:57 2017

disable PDFExtensionTest.ContextMenuCoordinates

TBR=wjmaclean@chromium.org
BUG=777465

Change-Id: I4dade1391c25221c5e104be3d28e093566e9db8b
Reviewed-on: https://chromium-review.googlesource.com/733661
Reviewed-by: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510820}
[modify] https://crrev.com/6fc01b37e06767e502ad74fb108a96ea38e714fc/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter

Components: Internals>Plugins>PDF
Labels: OS-Linux
I ran this locally with --enable-features=NetworkService, and in ExtensionsGuestViewMessageFilter::OnCreateMimeHandlerViewGuest() I added some printfs to see the input parameters.

It seems like the |view_id| string is populated with the actual content of the PDF file ... is it uninitialized?

Here's the output:

$ out/Debug/browser_tests --gtest_filter=PDFExtensionTest.ContextMenuCoordinates --enable-features=NetworkService
IMPORTANT DEBUGGING NOTE: each test is run inside its own process.
For debugging a test inside a debugger, use the
--gtest_filter=<your_test_name> flag along with either
--single_process (to run the test in one launcher/browser process) or
--single-process (to do the above, and also run Chrome in single-process mode).
Using sharding settings from environment. This is shard 0/1
Using 1 parallel jobs.
Note: Google Test filter = PDFExtensionTest.ContextMenuCoordinates
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from PDFExtensionTest, where TypeParam = 
[ RUN      ] PDFExtensionTest.ContextMenuCoordinates
[37685:37685:1023/133248.058213:WARNING:password_store_factory.cc(241)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options.
[37739:37739:1023/133249.653152:ERROR:gpu_info.cc(103)] No active GPU found, returning primary GPU.
[37742:37780:1023/133250.812269:WARNING:simple_synchronous_entry.cc(1110)] Could not open platform files for entry.
wjm: size = 500 x 600
wjm: view_id = %PDF-1.3
%����������
4 0 obj
<< /Length 5 0 R /Filter /FlateDecode >>
stream
xm��0��}�9�A�-<k�I�)�$�`9��.
�$���3_fgۢD�B#3뜐�o�3^Hq
                         HwrW�P-�5H
fX�            nk\u1(��!V�0"�b� %��ӻ���&t-4���Z�e
q��t��ž���M��QB�j�R�yK��;�F>�s�̲�_p�
H8
endstream
endobj
5 0 obj
186
endobj
2 0 obj
<< /Type /Page /Parent 3 0 R /Resources 6 0 R /Contents 4 0 R /MediaBox [0 0 612 792]
>>
endobj
6 0 obj
<< /ProcSet [ /PDF /Text ] /ColorSpace << /Cs1 7 0 R >> /ExtGState << /Gs2
9 0 R /Gs1 10 0 R >> /Font << /F1.0 8 0 R >> >>
endobj
9 0 obj
<< /Type /ExtGState /AAPL:AA true >>
endobj
10 0 obj
<< /Type /ExtGState /AAPL:AA false >>
endobj
11 0 obj
<< /Length 12 0 R /N 1 /Alternate /DeviceGray /Filter /FlateDecode >>
stream
x�ROHQ��6��A�x�w
	�)����vuY�m[�Ңgߺ��3ӛ�5œ]�<u�ct�С�����K� �<u�����(�oy;����~�{Dm���;)ATsC�+��nNM��)E�NX���bq��빒����g�ز�ǵv��=��e`!�-���!�f
[37685:37685:1023/133250.984878:FATAL:values.cc(137)] Check failed: IsStringUTF8(string_value_). 
#0 0x7ff2b9e31dbd base::debug::StackTrace::StackTrace()
#1 0x7ff2b9e301ec base::debug::StackTrace::StackTrace()
#2 0x7ff2b9eb6f7a logging::LogMessage::~LogMessage()
#3 0x7ff2ba0fc1f1 base::Value::Value()
#4 0x7ff2ba0fc25c base::Value::Value()
#5 0x7ff2ba103c81 base::DictionaryValue::SetString()
#6 0x00000475df33 extensions::ExtensionsGuestViewMessageFilter::OnCreateMimeHandlerViewGuest()
#7 0x00000475f9da _ZN4base20DispatchToMethodImplIPN10extensions32ExtensionsGuestViewMessageFilterEMS2_FviRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEiRKN3gfx4SizeEENS4_5tupleIJiSA_iSE_EEEJLm0ELm1ELm2ELm3EEEEvRKT_T0_OT1_NS4_16integer_sequenceImJXspT2_EEEE
#8 0x00000475f898 _ZN4base16DispatchToMethodIPN10extensions32ExtensionsGuestViewMessageFilterEMS2_FviRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEiRKN3gfx4SizeEENS4_5tupleIJiSA_iSE_EEEEEvRKT_T0_OT1_
#9 0x00000475f827 _ZN3IPC16DispatchToMethodIN10extensions32ExtensionsGuestViewMessageFilterEMS2_FviRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEiRKN3gfx4SizeEEvNS3_5tupleIJiS9_iSD_EEEEEvPT_T0_PT1_OT2_
#10 0x00000475f0b5 _ZN3IPC8MessageTI58ExtensionsGuestViewHostMsg_CreateMimeHandlerViewGuest_MetaNSt3__15tupleIJiNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEiN3gfx4SizeEEEEvE8DispatchIN10extensions32ExtensionsGuestViewMessageFilterESG_vMSG_FviRKS9_iRKSB_EEEbPKNS_7MessageEPT_PT0_PT1_T2_
#11 0x00000475d8ef extensions::ExtensionsGuestViewMessageFilter::OnMessageReceived()
#12 0x7ff2b17ad17b content::BrowserMessageFilter::Internal::DispatchMessage()
#13 0x7ff2b17ad4ef _ZN4base8internal13FunctorTraitsIMN7content20BrowserMessageFilter8InternalEFbRKN3IPC7MessageEEvE6InvokeI13scoped_refptrIS4_EJS6_EEEbSA_OT_DpOT0_
#14 0x7ff2b17ad44f _ZN4base8internal13FunctorTraitsINS0_18IgnoreResultHelperIMN7content20BrowserMessageFilter8InternalEFbRKN3IPC7MessageEEEEvE6InvokeISC_J13scoped_refptrIS5_ES7_EEEvOT_DpOT0_
#15 0x7ff2b17ad3dd _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoINS0_18IgnoreResultHelperIMN7content20BrowserMessageFilter8InternalEFbRKN3IPC7MessageEEEEJ13scoped_refptrIS7_ES9_EEEvOT_DpOT0_
#16 0x7ff2b17ad38d _ZN4base8internal7InvokerINS0_9BindStateINS0_18IgnoreResultHelperIMN7content20BrowserMessageFilter8InternalEFbRKN3IPC7MessageEEEEJ13scoped_refptrIS6_ES8_EEEFvvEE7RunImplISD_NSt3__15tupleIJSF_S8_EEEJLm0ELm1EEEEvOT_OT0_NSK_16integer_sequenceImJXspT1_EEEE
#17 0x7ff2b17ad2a9 _ZN4base8internal7InvokerINS0_9BindStateINS0_18IgnoreResultHelperIMN7content20BrowserMessageFilter8InternalEFbRKN3IPC7MessageEEEEJ13scoped_refptrIS6_ES8_EEEFvvEE7RunOnceEPNS0_13BindStateBaseE
#18 0x7ff2b9de0fb1 _ZNO4base12OnceCallbackIFvvEE3RunEv
#19 0x7ff2b9e360ba base::debug::TaskAnnotator::RunTask()
#20 0x7ff2b9ed58c5 base::internal::IncomingTaskQueue::RunTask()
#21 0x7ff2b9ede6e4 base::MessageLoop::RunTask()
#22 0x7ff2b9ede986 base::MessageLoop::DeferOrRunPendingTask()
#23 0x7ff2b9edecd3 base::MessageLoop::DoWork()
#24 0x7ff2b9ee23ac base::MessagePumpGlib::HandleDispatch()
#25 0x7ff2b9ee2b51 base::(anonymous namespace)::WorkSourceDispatch()
#26 0x7ff2a239fe04 g_main_context_dispatch
#27 0x7ff2a23a0048 <unknown>
#28 0x7ff2a23a00ec g_main_context_iteration
#29 0x7ff2b9ee24af base::MessagePumpGlib::Run()
#30 0x7ff2b9edde84 base::MessageLoop::Run()
#31 0x7ff2b9f879f5 base::RunLoop::Run()
#32 0x000006c30bc7 content::RunThisRunLoop()
#33 0x000006c323a7 content::MessageLoopRunner::Run()
#34 0x000006c23204 content::TestNavigationObserver::Wait()
#35 0x000005bf54d6 ui_test_utils::NavigateToURLWithDispositionBlockUntilNavigationsComplete()
#36 0x000005bf4941 ui_test_utils::NavigateToURLWithDisposition()
#37 0x000005bf4907 ui_test_utils::NavigateToURL()
#38 0x000002dcc279 PDFExtensionTest::LoadPdf()
#39 0x000002dc3a6e PDFExtensionTest_ContextMenuCoordinates_Test::RunTestOnMainThread()
#40 0x000006ba097a content::BrowserTestBase::ProxyRunTestOnMainThreadLoop()
#41 0x0000027d311d _ZN4base8internal13FunctorTraitsIM25RenderViewContextMenuBaseFvvEvE6InvokeIP21RenderViewContextMenuJEEEvS4_OT_DpOT0_
#42 0x0000027d3064 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIM25RenderViewContextMenuBaseFvvEJP21RenderViewContextMenuEEEvOT_DpOT0_
#43 0x0000027d3015 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt3__15tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE
#44 0x00000289f08c _ZN4base8internal7InvokerINS0_9BindStateIMN13browsing_data19BrowsingDataCounterEFvvEJNS0_17UnretainedWrapperI12CacheCounterEEEEEFvvEE3RunEPNS0_13BindStateBaseE
#45 0x0000027b90cd _ZNKR4base17RepeatingCallbackIFvvEE3RunEv
#46 0x000005d1b041 ChromeBrowserMainParts::PreMainMessageLoopRunImpl()
#47 0x000005d191fc ChromeBrowserMainParts::PreMainMessageLoopRun()
#48 0x7ff2b279a5b4 content::BrowserMainLoop::PreMainMessageLoopRun()
#49 0x7ff2b1771c5d _ZN4base8internal13FunctorTraitsIMN7content14NetworkContext11DiskCheckerEFvvEvE6InvokeIPS4_JEEEvS6_OT_DpOT0_
#50 0x7ff2b1771bd4 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIMN7content14NetworkContextEFvvEJPS5_EEEvOT_DpOT0_
#51 0x7ff2b1771b85 _ZN4base8internal7InvokerINS0_9BindStateIMN7content14NetworkContext11DiskCheckerEFvvEJNS0_17UnretainedWrapperIS5_EEEEEFvvEE7RunImplIRKS7_RKNSt3__15tupleIJS9_EEEJLm0EEEEvOT_OT0_NSG_16integer_sequenceImJXspT1_EEEE
#52 0x7ff2b177792c _ZN4base8internal7InvokerINS0_9BindStateIMN7content14NetworkContext11DiskCheckerEFvvEJNS0_17UnretainedWrapperIS5_EEEEEFvvEE3RunEPNS0_13BindStateBaseE
#53 0x7ff2b17323ad _ZNKR4base17RepeatingCallbackIFvvEE3RunEv
#54 0x7ff2b33bf05d content::StartupTaskRunner::RunAllTasksNow()
#55 0x7ff2b279611f content::BrowserMainLoop::CreateStartupTasks()
#56 0x7ff2b27a33dd content::BrowserMainRunnerImpl::Initialize()
#57 0x7ff2b278efb4 content::BrowserMain()
#58 0x7ff2b4276ca4 content::RunNamedProcessTypeMain()
#59 0x7ff2b4279862 content::ContentMainRunnerImpl::Run()
#60 0x7ff2b427447d content::ContentServiceManagerMainDelegate::RunEmbedderProcess()
#61 0x7ff2ad6f17f5 service_manager::Main()

[1/1] PDFExtensionTest.ContextMenuCoordinates (CRASHED)
1 test crashed:
    PDFExtensionTest.ContextMenuCoordinates (../../chrome/browser/pdf/pdf_extension_test.cc:1354)

Cc: ekaramad@chromium.org sky@chromium.org
Labels: -Pri-3 Pri-2
When I run this locally, I get the same crash on other tests that use embedded PDFs, e.g. 

out/Debug/browser_tests --gtest_filter=PDFExtensionTest.EnsureCrossOriginRepliesBlocked --enable-features=NetworkService

+ekaramad@

Increasing pri since this affects other tests.
After investigating this with wjmaclean@ the issues seems to be with the way load requests for PDF files work in Chrome. Apparently in the given bot the response for a request for a PDF file is not being intercepted as a steam; which is needed for MimeHandlerViewGuest/Container to properly load the PDF extension. Instead the PDF resource itself is being sent to the 'embedder' renderer.

In the case of wjmaclean@'s test, the pdf is added using <embed> tag which will make MimeHandlerViewContainer send a request for PDF resource. Instead of the GUID we receive the actual contents of PDF file in MHVC::DidReceiveData.

In some other tests the tab itself is navigated to PDF. Those would expect the first response to contain a mime-type of PDF and create a PluginDocument. The consequent parts of responses should (or maybe the very same) should contain GUID. But this part never hits so other tests are timing out.

Sign in to add a comment