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

Issue 666532 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Nov 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 0
Type: Bug



Sign in to add a comment

AssertIOAllowed in CupsPrintersHandler()

Project Member Reported by steve...@chromium.org, Nov 17 2016

Issue description

When building and runing with dcheck_always_on = true (or Debug):

80601:80601:1117/153236:FATAL:thread_restrictions.cc(38)] Check failed: false. Function marked as IO-only was called from a thread that disallows IO!  If this thread really should be allowed to make IO calls, adjust the call to base::ThreadRestrictions::SetIOAllowed() in this thread's startup.
#0 0x7f0cdff0399e base::debug::StackTrace::StackTrace()
#1 0x7f0cdff1aada logging::LogMessage::~LogMessage()
#2 0x7f0cdff6da14 base::ThreadRestrictions::AssertIOAllowed()
#3 0x7f0cdff12889 base::PathExists()
#4 0x7f0ce21c0d29 chromeos::settings::CupsPrintersHandler::CupsPrintersHandler()
#5 0x7f0ce2004582 settings::MdSettingsUI::MdSettingsUI()
#6 0x7f0ce1f2ee86 (anonymous namespace)::NewWebUI<>()
#7 0x7f0cdf2b22e4 content::WebUIControllerFactoryRegistry::CreateWebUIControllerForURL()
#8 0x7f0cdf294104 content::WebContentsImpl::CreateWebUI()
#9 0x7f0cdf2a12fb content::WebContentsImpl::CreateWebUIForRenderFrameHost()
#10 0x7f0cdefd4018 content::RenderFrameHostImpl::UpdatePendingWebUI()
#11 0x7f0cdefdad7d content::RenderFrameHostManager::UpdateStateForNavigate()
#12 0x7f0cdefda68b content::RenderFrameHostManager::Navigate()
#13 0x7f0cdefc062f content::NavigatorImpl::NavigateToEntry()
#14 0x7f0cdefc0f65 content::NavigatorImpl::NavigateToPendingEntry()
#15 0x7f0cdefb3f17 content::NavigationControllerImpl::NavigateToPendingEntryInternal()
#16 0x7f0cdefaf2b1 content::NavigationControllerImpl::NavigateToPendingEntry()
#17 0x7f0cdefb030e content::NavigationControllerImpl::LoadURLWithParams()
#18 0x7f0ce1fa6c29 (anonymous namespace)::LoadURLInContents()
#19 0x7f0ce1fa664c chrome::Navigate()
#20 0x7f0ce1f99bee Browser::OpenURLFromTab()
#21 0x7f0ce2220d02 BookmarkBarView::ButtonPressed()
#22 0x7f0ce1574142 views::CustomButton::OnMouseReleased()
#23 0x7f0ce15bc8b1 views::InkDropHostView::OnMouseEvent()
#24 0x7f0ce3dbf673 ui::ScopedTargetHandler::OnEvent()
#25 0x7f0ce093034d ui::EventDispatcher::ProcessEvent()
#26 0x7f0ce09301ac ui::EventDispatcherDelegate::DispatchEvent()
#27 0x7f0ce15d7acf views::internal::RootView::OnMouseReleased()
#28 0x7f0ce15adb23 views::Widget::OnMouseEvent()
#29 0x7f0ce15b79c7 views::NativeWidgetAura::OnMouseEvent()
#30 0x7f0ce093034d ui::EventDispatcher::ProcessEvent()
#31 0x7f0ce09301ac ui::EventDispatcherDelegate::DispatchEvent()
#32 0x7f0ce3dbf41e ui::EventProcessor::OnEventFromSource()
#33 0x7f0ce0930f98 ui::EventSource::SendEventToProcessor()
#34 0x7f0ce424f49b aura::WindowTreeHostX11::DispatchXI2Event()
#35 0x7f0ce424ee23 aura::WindowTreeHostX11::DispatchEvent()
#36 0x7f0ce0929d76 ui::PlatformEventSource::DispatchEvent()
#37 0x7f0ce097e731 ui::X11EventSource::ExtractCookieDataDispatchEvent()
#38 0x7f0ce097e660 ui::X11EventSource::DispatchXEvents()
#39 0x7f0ce097e109 ui::(anonymous namespace)::XSourceDispatch()
#40 0x7f0cdbecece5 g_main_context_dispatch
#41 0x7f0cdbecf048 <unknown>
#42 0x7f0cdbecf0ec g_main_context_iteration
#43 0x7f0cdff24566 base::MessagePumpGlib::Run()
#44 0x7f0cdff221e9 base::MessageLoop::RunHandler()
#45 0x7f0cdff43a90 base::RunLoop::Run()
#46 0x7f0cdfb290d9 ChromeBrowserMainParts::MainMessageLoopRun()
#47 0x7f0cdeec58c9 content::BrowserMainLoop::RunMainMessageLoopParts()
#48 0x7f0cdeec8990 content::BrowserMainRunnerImpl::Run()
#49 0x7f0cdeec122e content::BrowserMain()
#50 0x7f0cdfaba6c3 content::ContentMainRunnerImpl::Run()
#51 0x7f0cdfab9140 content::ContentMain()
#52 0x7f0cde0f87c3 ChromeMain
#53 0x7f0cd8103f45 __libc_start_main
#54 0x7f0cde0f8661 <unknown>

 
It looks like this was introduced here:
https://codereview.chromium.org/2504763002

We can'd do file IO on the UI thread.

Thanks for the report.

This is an oversight on my part.  Probably the right thing to do is lazily create the directory in PpdCache when needed (when we're already in an IO thread). 

I'll put together a patch shortly.
Thanks! Please consider a revert if you can't fix it quickly, it will
affect other cros UI devs when they update. (I'm rebasing off of a branch
with the change reverted for now...)
Status: Fixed (was: Assigned)

Comment 6 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 7 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 8 by dchan@google.com, May 30 2017

Labels: VerifyIn-60

Comment 9 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 10 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment