Issue metadata
Sign in to add a comment
|
Check hit while trying to print preview an embedded PDF file with a PDF viewer extension. |
||||||||||||||||||||||||
Issue description
Version: 56.0.2924.0 (Developer Build) (64-bit) refs/heads/master@{#432914}
OS: Linux
URL: https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm/related?hl=en
What steps will reproduce the problem?
(1) Launch chrome, navigate to above url and click on 'ADD TO CHROME' button to install the extension.
(2) Then navigate to https://msu.edu/~urban/sme865/resources/embedded_pdf.html, choose a real printer and click on 'Print' option.
(3) Observe.
What is the expected result?
The actual PDF document prints on a real printer.
What happens instead?
It isn't always reproducible, but loading the document in the print preview window fails. It is due to a check with the following stack:
[99617:99617:1117/112004:FATAL:out_of_process_instance.cc(1289)] Check failed: document_load_state_ == LOAD_STATE_LOADING.
#0 0x7f2aa98ee951 __interceptor_backtrace
#1 0x7f2aa7bfe2b3 base::debug::StackTrace::StackTrace()
#2 0x7f2aa7c712da logging::LogMessage::~LogMessage()
#3 0x7f2aaa7044b0 chrome_pdf::OutOfProcessInstance::DocumentLoadComplete()
#4 0x7f2aaa6bc398 chrome_pdf::PDFiumEngine::FinishLoadingDocument()
#5 0x7f2aaa6d2d6f chrome_pdf::PDFiumEngine::ContinueLoadingDocument()
#6 0x7f2aaa6bb04c chrome_pdf::PDFiumEngine::LoadDocument()
#7 0x7f2aaa6bbc10 chrome_pdf::PDFiumEngine::OnDocumentComplete()
#8 0x7f2aaa6ed331 chrome_pdf::DocumentLoader::ReadComplete()
#9 0x7f2aaa6ed97d chrome_pdf::DocumentLoader::DidRead()
#10 0x7f2aaa6ee67a pp::CompletionCallbackFactory<>::CallbackData<>::Thunk()
#11 0x7f2aaa71d48b chrome_pdf::URLLoaderWrapperImpl::DidRead()
#12 0x7f2aaa72b00a pp::CompletionCallbackFactory<>::CallbackData<>::Thunk()
#13 0x7f2a97a854c6 ppapi::TrackedCallback::Run()
#14 0x7f2a97a87a9c _ZN4base8internal7InvokerINS0_9BindStateIMN5ppapi15TrackedCallbackEFviEJ13scoped_refptrIS4_EiEEEFvvEE3RunEPNS0_13BindStateBaseE
#15 0x7f2a97a83db4 ppapi::internal::RunWhileLockedHelper<>::CallWhileLocked()
#16 0x7f2a97a8400f _ZN4base8internal7InvokerINS0_9BindStateIPFvNSt3__110unique_ptrIN5ppapi8internal20RunWhileLockedHelperIFvvEEENS3_14default_deleteIS9_EEEEEJNS0_13PassedWrapperISC_EEEEES8_E3RunEPNS0_13BindStateBaseE
#17 0x7f2aa7c00992 base::debug::TaskAnnotator::RunTask()
#18 0x7f2aa7c96e75 base::MessageLoop::RunTask()
#19 0x7f2aa7c97c06 base::MessageLoop::DeferOrRunPendingTask()
#20 0x7f2aa7c98d9f base::MessageLoop::DoWork()
#21 0x7f2aa7ca0942 base::MessagePumpDefault::Run()
#22 0x7f2aa7c96361 base::MessageLoop::RunHandler()
#23 0x7f2aa7d2d3fc base::RunLoop::Run()
#24 0x7f2a9ec81ac1 content::PpapiPluginMain()
#25 0x7f2aa1306332 content::RunZygote()
#26 0x7f2aa1307952 content::RunNamedProcessTypeMain()
#27 0x7f2aa13094cd content::ContentMainRunnerImpl::Run()
#28 0x7f2aa130555b content::ContentMain()
#29 0x7f2aa9975ea6 ChromeMain
#30 0x7f2a8ae63f45 __libc_start_main
#31 0x7f2aa98a3275 <unknown>
,
Nov 18 2016
Where you trying to print to a cloud printer by any chance? I also hit bug 666595 recently, and I wonder if that's the same problem blowing past the DCHECK and manifesting in release mode.
,
Nov 18 2016
In debug mode earlier today, I hit this DCHECK, but I can't consistently repro: [1:1:1117/141050:FATAL:out_of_process_instance.cc(1384)] Check failed: document_load_state_ == LOAD_STATE_LOADING. #0 0x7f9894992771 __interceptor_backtrace #1 0x7f989a527aa3 base::debug::StackTrace::StackTrace() #2 0x7f989a5778fa logging::LogMessage::~LogMessage() #3 0x7f98998d1c63 chrome_pdf::OutOfProcessInstance::DocumentLoadFailed() #4 0x7f98998d54da pp::CompletionCallbackFactory<>::CallbackData<>::Thunk() #5 0x7f989de3c7f6 ppapi::TrackedCallback::Run()
,
Nov 18 2016
... and I hit nasko's stack trace by simply print previewing.
,
Nov 18 2016
I think it was indeed a cloud printer, basically the physical printer in our building. It reproed easily on the print preview right after the crash due to skia ref counting. I don't know how the two might be related.
,
Nov 18 2016
I looked into this a bit and it's a race due to 2 print preview requests being incorrectly issued at once. Two will enter... only one leaves... successfully. So depending on who wins, we may either get nasko's DCHECK or mine in comment 3. Let's wait for bug 666595 to get fixed and then we can see if this goes away. It's likely the same bug but I'm not 100% sure.
,
Nov 19 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b12aba73d3525867511b315a45d2dbc65acd2647 commit b12aba73d3525867511b315a45d2dbc65acd2647 Author: rbpotter <rbpotter@chromium.org> Date: Sat Nov 19 07:09:57 2016 Fix CrOS reverting to Save as PDF and random PDF preview fail Increasing number of saved destinations caused a bug on Chrome OS - destination always reverted to Save as PDF. Also caused random "PDF failed to load" preview errors. This occurred since the destinations were modified one after the other too quickly, which caused a race condition that crashed PDF preview. This error occurred ~1 in 10 times. BUG= 665455 , 666426 , 666595 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2516523002 Cr-Commit-Position: refs/heads/master@{#433408} [modify] https://crrev.com/b12aba73d3525867511b315a45d2dbc65acd2647/chrome/browser/resources/print_preview/data/app_state.js [modify] https://crrev.com/b12aba73d3525867511b315a45d2dbc65acd2647/chrome/browser/resources/print_preview/data/destination_store.js
,
Nov 21 2016
,
Nov 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/889ca692836950b471a5bdc08608e2edcdf4696a commit 889ca692836950b471a5bdc08608e2edcdf4696a Author: Lei Zhang <thestig@chromium.org> Date: Mon Nov 21 06:58:39 2016 M56: Fix CrOS reverting to Save as PDF and random PDF preview fail Increasing number of saved destinations caused a bug on Chrome OS - destination always reverted to Save as PDF. Also caused random "PDF failed to load" preview errors. This occurred since the destinations were modified one after the other too quickly, which caused a race condition that crashed PDF preview. This error occurred ~1 in 10 times. BUG= 665455 , 666426 , 666595 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2516523002 Cr-Commit-Position: refs/heads/master@{#433408} (cherry picked from commit b12aba73d3525867511b315a45d2dbc65acd2647) Review URL: https://codereview.chromium.org/2514303002 . Cr-Commit-Position: refs/branch-heads/2924@{#19} Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059} [modify] https://crrev.com/889ca692836950b471a5bdc08608e2edcdf4696a/chrome/browser/resources/print_preview/data/app_state.js [modify] https://crrev.com/889ca692836950b471a5bdc08608e2edcdf4696a/chrome/browser/resources/print_preview/data/destination_store.js
,
Nov 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/03dfb68a8d7f607a19a3a5f53319c02b899f7d3f commit 03dfb68a8d7f607a19a3a5f53319c02b899f7d3f Author: Lei Zhang <thestig@chromium.org> Date: Tue Nov 22 10:06:34 2016 M55: Fix CrOS reverting to Save as PDF and random PDF preview fail Increasing number of saved destinations caused a bug on Chrome OS - destination always reverted to Save as PDF. Also caused random "PDF failed to load" preview errors. This occurred since the destinations were modified one after the other too quickly, which caused a race condition that crashed PDF preview. This error occurred ~1 in 10 times. BUG= 665455 , 666426 , 666595 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2516523002 Cr-Commit-Position: refs/heads/master@{#433408} (cherry picked from commit b12aba73d3525867511b315a45d2dbc65acd2647) Review URL: https://codereview.chromium.org/2518303002 . Cr-Commit-Position: refs/branch-heads/2883@{#646} Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768} [modify] https://crrev.com/03dfb68a8d7f607a19a3a5f53319c02b899f7d3f/chrome/browser/resources/print_preview/data/app_state.js [modify] https://crrev.com/03dfb68a8d7f607a19a3a5f53319c02b899f7d3f/chrome/browser/resources/print_preview/data/destination_store.js
,
Nov 29 2016
Rechecked this on chrome version 55.0.2883.70 on Ubuntu 14.04 as per the steps provided. Attached is a screenshot of the output generated: The embedded PDF is not displayed in the Print Preview. Request to please confirm the output generated.
,
Nov 29 2016
It looks like there were actually 2 problems here. One was the error that was causing the stack trace reported in the initial report (bad document_loading_state). This error had the same cause as bug 666595 , and has been fixed as I cannot reproduce that stack trace on 55.0.2883.70. However, the embedded PDF still does not display as it does in Chrome 54. This appears to be a separate issue. Marking non-duplicate in order to resolve this problem. Will bisect.
,
Nov 29 2016
Bisect points to https://chromium.googlesource.com/chromium/src/+log/5d6411a1a10652b1a3d9ced8d744f7e427918805..9738e8297d39ff71bc772514066b5d7eadd4c4da Guessing it is r414879 --> https://chromium.googlesource.com/chromium/src/+/d8f0aefde00132b06bd97cb17555f2ec89a0c203 since that deals with extensions and this relies on a PDF viewer extension. nasko@, any thoughts on what might have happened?
,
Nov 29 2016
Since this is P3 and an edge case (install an extension and then try to print an embedded PDF), it does not block M55 stable.
,
Nov 29 2016
The CLs in comment 16 are about changing --isolate-extensions behavior. Is it the case that this bug repros with --isolate-extensions and not without it?
,
Nov 29 2016
RE: comment 17 - checked on 57.0.2936.0 with and without the flag. Bug repros when I run with --isolate-extensions, does not repro otherwise.
,
Nov 29 2016
Oh! I read comments 11-12 in more detail, and I'm not concerned about this. We know that printing a page won't include the out-of-process iframes, like this embedded PDF case. We have other work in progress to fix that in issue 455764 . For now, we only expect printing *just* the OOPIF to work, not the full page with OOPIFs in it (i.e., issue 631513 ). For comment 12, this bug was about the crash when trying to click the "Print" option within the extension itself, not printing the full page via Chrome's print feature. As long as we don't crash there, this bug can be considered fixed. Can someone verify that the "Print" option in the extension works on Canary?
,
Nov 29 2016
I've verified that the latest canary (57.0.2936.0) does behave as expected, shows the print preview and successfully prints to a file. However, this is a DCHECK in code, so I don't expect it to hit in a release build. I'm going to try and verify with a local build.
,
Nov 29 2016
I've also verified that local ASan build with DCHECKs enabled didn't hit this. I think this can be considered fixed, so marking it as such. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by thestig@chromium.org
, Nov 17 2016