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

Issue 735353 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Browser crash is seen on hitting Enter key on USB permission overlay at 'permission.site'

Reported by sans...@etouch.net, Jun 21 2017

Issue description

Chrome Version:60.0.3112.40(Official Build) 6de35395b27b983b671c777caa9a273017e80d62-refs/branch-heads/3112@{#412}-32/64 bit
OS : Windows(7,8,10)

Precondition: Enable #enable-experimental-web-platform-features from chrome://flags.

Steps:
1. Freshly launch Chrome and remove person from switch person overlay (a default profile will open).
2. Now add a person from from switch person overlay and navigate to https://permission.site/ on newly added person
3. Click on 'USB' (Permission overlay opens and make sure focus ring is in Get help link)
4. Hit Enter key and observe

Actual: Browser crash is seen

Expected: Browser should not crash

This is non-regression issue seen from M-55, since USB permission overlay was introduced in 55.0.2841.0

Crash ID: 1a6ef09808000000 (Local Crash ID: 56d7a5e1-1bfc-4333-ac51-f4878621f7ca)

Note: Above issue is not seen on Mac and Linux OS.

 
Actual_video.mp4
1.8 MB View Download
Cc: bauerb@chromium.org anthonyvd@chromium.org msarda@chromium.org
Labels: Needs-triage OS-Android OS-Chrome
Status: Untriaged (was: Unconfirmed)
Stack trace for the crash ID provided:

Thread 0 (id: 3612) CRASHED [EXCEPTION_ACCESS_VIOLATION_READ @ 0x00000084 ] MAGIC SIGNATURE THREAD
Stack Quality83%Show frame trust levels
0x0fa40abb	(chrome.dll -profile_attributes_entry.cc:26 )	ProfileAttributesEntry::GetName()
0x0fb5683a	(chrome.dll -profile_shortcut_manager_win.cc:856 )	ProfileShortcutManagerWin::GetShortcutProperties(base::FilePath const &,base::CommandLine *,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > *,base::FilePath *)
0x1172fed8	(chrome.dll -browser_window_property_manager_win.cc:87 )	BrowserWindowPropertyManager::UpdateWindowProperties()
0x1172ff89	(chrome.dll -browser_window_property_manager_win.cc:102 )	BrowserWindowPropertyManager::CreateBrowserWindowPropertyManager(BrowserView *,HWND__ *)
0x0fb55c69	(chrome.dll -browser_desktop_window_tree_host_win.cc:116 )	BrowserDesktopWindowTreeHostWin::HandleCreate()
0x0fb54ddf	(chrome.dll -hwnd_message_handler.cc:1377 )	views::HWNDMessageHandler::OnCreate(tagCREATESTRUCTW *)
0x0fb54140	(chrome.dll -hwnd_message_handler.h:412 )	views::HWNDMessageHandler::_ProcessWindowMessage(HWND__ *,unsigned int,unsigned int,long,long &,unsigned long)
0x0fb57fc5	(chrome.dll -hwnd_message_handler.cc:915 )	views::HWNDMessageHandler::OnWndProc(unsigned int,unsigned int,long)
0x0f9a3f9e	(chrome.dll -window_impl.cc:303 )	gfx::WindowImpl::WndProc(HWND__ *,unsigned int,unsigned int,long)
0x0f9a3ece	(chrome.dll -wrapped_window_proc.h:80 )	base::win::WrappedWindowProc<&gfx::WindowImpl::WndProc(HWND__ *,unsigned int,unsigned int,long)>(HWND__ *,unsigned int,unsigned int,long)
0x775d84f2	(USER32.dll + 0x000384f2 )	_InternalCallWinProc
0x775b6c3f	(USER32.dll + 0x00016c3f )	UserCallWinProcCheckWow
0x775b681f	(USER32.dll + 0x0001681f )	DispatchClientMessage
0x775beb2f	(USER32.dll + 0x0001eb2f )	__fnINLPCREATESTRUCT
0x77b98e55	(ntdll.dll + 0x00078e55 )	KiUserCallbackDispatcher
0x77b98d9f	(ntdll.dll + 0x00078d9f )	KiUserApcDispatcher
0x775b9a08	(USER32.dll + 0x00019a08 )	CreateWindowInternal
0x775b98a7	(USER32.dll + 0x000198a7 )	CreateWindowExW
0x0f9a384e	(chrome.dll -window_impl.cc:212 )	gfx::WindowImpl::Init(HWND__ *,gfx::Rect const &)
0x0fb53e57	(chrome.dll -hwnd_message_handler.cc:367 )	views::HWNDMessageHandler::Init(HWND__ *,gfx::Rect const &)
0x0fb5364f	(chrome.dll -desktop_window_tree_host_win.cc:132 )	views::DesktopWindowTreeHostWin::Init(aura::Window *,views::Widget::InitParams const &)
0x0fb514ca	(chrome.dll -desktop_native_widget_aura.cc:441 )	views::DesktopNativeWidgetAura::InitNativeWidget(views::Widget::InitParams const &)
0x0fb50dd9	(chrome.dll -desktop_browser_frame_aura.cc:62 )	DesktopBrowserFrameAura::InitNativeWidget(views::Widget::InitParams const &)
0x0fb504d5	(chrome.dll -widget.cc:336 )	views::Widget::Init(views::Widget::InitParams const &)
0x0fb4e9fd	(chrome.dll -browser_frame.cc:93 )	BrowserFrame::InitBrowserFrame()
0x1114ac47	(chrome.dll -browser_window_factory.cc:23 )	BrowserWindow::CreateBrowserWindow(Browser *,bool)
0x0fb48bac	(chrome.dll -browser.cc:442 )	Browser::Browser(Browser::CreateParams const &)
0x110fbe16	(chrome.dll -scoped_tabbed_browser_displayer.cc:16 )	chrome::ScopedTabbedBrowserDisplayer::ScopedTabbedBrowserDisplayer(Profile *)
0x11355584	(chrome.dll -usb_chooser_controller.cc:176 )	UsbChooserController::OpenHelpCenterUrl()
0x1171bfae	(chrome.dll -device_chooser_content_view.cc:259 )	DeviceChooserContentView::StyledLabelLinkClicked(views::StyledLabel *,gfx::Range const &,int)
0x11395974	(chrome.dll -styled_label.cc:238 )	views::StyledLabel::LinkClicked(views::Link *,int)
0x113960ec	(chrome.dll -link.cc:136 )	views::Link::OnKeyPressed(ui::KeyEvent const &)
0x0fec9e89	(chrome.dll -view.cc:1064 )	views::View::OnKeyEvent(ui::KeyEvent *)
0x0fd26514	(chrome.dll -event_handler.cc:27 )	ui::EventHandler::OnEvent(ui::Event *)
0x0fd26492	(chrome.dll -event_dispatcher.cc:191 )	ui::EventDispatcher::DispatchEvent(ui::EventHandler *,ui::Event *)
0x0fd26207	(chrome.dll -event_dispatcher.cc:139 )	ui::EventDispatcher::ProcessEvent(ui::EventTarget *,ui::Event *)
0x0fd26109	(chrome.dll -event_dispatcher.cc:86 )	ui::EventDispatcherDelegate::DispatchEventToTarget(ui::EventTarget *,ui::Event *)
0x0fd25657	(chrome.dll -event_dispatcher.cc:58 )	ui::EventDispatcherDelegate::DispatchEvent(ui::EventTarget *,ui::Event *)
0x0fd249ff	(chrome.dll -event_processor.cc:46 )	ui::EventProcessor::OnEventFromSource(ui::Event *)
0x0fd24845	(chrome.dll -event_source.cc:51 )	ui::EventSource::SendEventToSink(ui::Event *)
0x0fec9aed	(chrome.dll -widget.cc:1166 )	views::Widget::OnKeyEvent(ui::KeyEvent *)
0x0fd26514	(chrome.dll -event_handler.cc:27 )	ui::EventHandler::OnEvent(ui::Event *)
0x0fd26492	(chrome.dll -event_dispatcher.cc:191 )	ui::EventDispatcher::DispatchEvent(ui::EventHandler *,ui::Event *)
0x0fd26207	(chrome.dll -event_dispatcher.cc:139 )	ui::EventDispatcher::ProcessEvent(ui::EventTarget *,ui::Event *)
0x0fd26109	(chrome.dll -event_dispatcher.cc:86 )	ui::EventDispatcherDelegate::DispatchEventToTarget(ui::EventTarget *,ui::Event *)
0x0fd25657	(chrome.dll -event_dispatcher.cc:58 )	ui::EventDispatcherDelegate::DispatchEvent(ui::EventTarget *,ui::Event *)
0x0fd249ff	(chrome.dll -event_processor.cc:46 )	ui::EventProcessor::OnEventFromSource(ui::Event *)
0x0fec9530	(chrome.dll -window_tree_host.cc:204 )	aura::WindowTreeHost::DispatchKeyEventPostIME(ui::KeyEvent *)
0x0fec94ee	(chrome.dll -input_method_base.cc:136 )	ui::InputMethodBase::DispatchKeyEventPostIME(ui::KeyEvent *)
0x0fec9477	(chrome.dll -input_method_win.cc:207 )	ui::InputMethodWin::ProcessKeyEventDone(ui::KeyEvent *,std::vector<tagMSG,std::allocator<tagMSG> > const *,bool)
0x0fec9109	(chrome.dll -input_method_win.cc:196 )	ui::InputMethodWin::DispatchKeyEvent(ui::KeyEvent *)
0x0fec8dd8	(chrome.dll -window_event_dispatcher.cc:941 )	aura::WindowEventDispatcher::PreDispatchKeyEvent(ui::KeyEvent *)
0x0fd257ac	(chrome.dll -window_event_dispatcher.cc:525 )	aura::WindowEventDispatcher::PreDispatchEvent(ui::EventTarget *,ui::Event *)
0x0fd255dc	(chrome.dll -event_dispatcher.cc:54 )	ui::EventDispatcherDelegate::DispatchEvent(ui::EventTarget *,ui::Event *)
0x0fd249ff	(chrome.dll -event_processor.cc:46 )	ui::EventProcessor::OnEventFromSource(ui::Event *)
0x0fd24845	(chrome.dll -event_source.cc:51 )	ui::EventSource::SendEventToSink(ui::Event *)
0x0fec8d1a	(chrome.dll -desktop_window_tree_host_win.cc:840 )	views::DesktopWindowTreeHostWin::HandleKeyEvent(ui::KeyEvent *)
0x0fec81b2	(chrome.dll -hwnd_message_handler.cc:1581 )	views::HWNDMessageHandler::OnKeyEvent(unsigned int,unsigned int,long)
0x0fb54507	(chrome.dll -hwnd_message_handler.h:379 )	views::HWNDMessageHandler::_ProcessWindowMessage(HWND__ *,unsigned int,unsigned int,long,long &,unsigned long)
0x0fb57fc5	(chrome.dll -hwnd_message_handler.cc:915 )	views::HWNDMessageHandler::OnWndProc(unsigned int,unsigned int,long)
0x0f9a3f9e	(chrome.dll -window_impl.cc:303 )	gfx::WindowImpl::WndProc(HWND__ *,unsigned int,unsigned int,long)
0x0f9a3ece	(chrome.dll -wrapped_window_proc.h:80 )	base::win::WrappedWindowProc<&gfx::WindowImpl::WndProc(HWND__ *,unsigned int,unsigned int,long)>(HWND__ *,unsigned int,unsigned int,long)
0x775d84f2	(USER32.dll + 0x000384f2 )	_InternalCallWinProc
0x775b6c3f	(USER32.dll + 0x00016c3f )	UserCallWinProcCheckWow
0x775b6540	(USER32.dll + 0x00016540 )	DispatchMessageWorker
0x775b62ff	(USER32.dll + 0x000162ff )	DispatchMessageW
0x0fc3299e	(chrome.dll -message_pump_win.cc:363 )	base::MessagePumpForUI::ProcessMessageHelper(tagMSG const &)
0x0fc327ae	(chrome.dll -message_pump_win.cc:198 )	base::MessagePumpForUI::DoRunLoop()
0x0f95b30b	(chrome.dll -message_pump_win.cc:56 )	base::MessagePumpWin::Run(base::MessagePump::Delegate *)
0x0f95b290	(chrome.dll -message_loop.cc:369 )	base::MessageLoop::Run()
0x0f95b0a4	(chrome.dll -run_loop.cc:111 )	base::RunLoop::Run()
0x0fc2fd23	(chrome.dll -chrome_browser_main.cc:1950 )	ChromeBrowserMainParts::MainMessageLoopRun(int *)
0x100d659a	(chrome.dll -browser_main_loop.cc:1126 )	content::BrowserMainLoop::RunMainMessageLoopParts()
0x0fc2fc4b	(chrome.dll -browser_main_runner.cc:142 )	content::BrowserMainRunnerImpl::Run()
0x0f948e1b	(chrome.dll -browser_main.cc:46 )	content::BrowserMain(content::MainFunctionParams const &)
0x0f948cfe	(chrome.dll -content_main_runner.cc:411 )	content::RunNamedProcessTypeMain(std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,content::MainFunctionParams const &,content::ContentMainDelegate *)
0x0f9467d9	(chrome.dll -content_main_runner.cc:704 )	content::ContentMainRunnerImpl::Run()
0x0f937806	(chrome.dll -main.cc:469 )	service_manager::Main(service_manager::MainParams const &)
0x0f9374ed	(chrome.dll -content_main.cc:19 )	content::ContentMain(content::ContentMainParams const &)
0x0f932bb4	(chrome.dll -chrome_main.cc:119 )	ChromeMain
0x00d335d2	(chrome.exe -main_dll_loader_win.cc:199 )	MainDllLoader::Launch(HINSTANCE__ *,base::TimeTicks)
0x00d314fc	(chrome.exe -chrome_exe_main_win.cc:268 )	wWinMain
0x00de3387	(chrome.exe -exe_common.inl:253 )	__scrt_common_main_seh
0x766838f3	(KERNEL32.DLL + 0x000138f3 )	BaseThreadInitThunk
0x77b85de2	(ntdll.dll + 0x00065de2 )	__RtlUserThreadStart
0x77b85dad	(ntdll.dll + 0x00065dad )	_RtlUserThreadStart

Instances for this crash is observed from M54 builds in crash server, below link gives in detail about the same:

Crash Link: https://goto.google.com/srvii

Untriaging it so that it gets addressed. Also CC'ing the owners of the crashing file, kindly take a look into it. Instances are also observed on Android and Chrome OS.

Comment 2 by bauerb@chromium.org, Jun 21 2017

Cc: skuhne@chromium.org
Components: Platform>Apps>API>USB
Labels: -OS-Android -OS-Chrome
Owner: juncai@chromium.org
Status: Assigned (was: Untriaged)
Android and Chrome OS have way fewer crashes, and the stack trace is completely different, so that seems like a different issue. The majority of Windows crashes reported on crash/ also have a slightly different stack trace as well, namely one that happens when trying to open Chrome while it's already running (eg. crash/656d744758000000). I don't have a fully reproduction for those though, so I'm going to look at the one for the USB chooser.

GetBrowser() in usb_chooser_controller.cc calls ProfileManager::GetActiveUserProfile(), which is supposed to return "the" profile for the current user, but "the" profile is not a well-defined concept on multi-profile platforms, as there can be multiple profiles. What's more, the method returns the default profile, which might not even exist anymore on disk (but could still be around in memory if it has been removed in this browser session, because complicated reason). So, what seems to happen here is that this tries to open a new browser for the non-existing default profile, which then crashes when it's trying to look up profile metadata from the ProfileAttributesStorage.

Assigning to juncai@, who added that code in r396492. The UsbChooserController is created with a RenderFrameHost, so it should be able to get the corresponding profile via GetProcess()->GetBrowserContext().

(And yes, ProfileManager::GetActiveUserProfile() should probably be Chrome-OS-only -- the concepts of "active user" and "primary user" seem pretty Chrome-OS-specific. Ash on other platforms isn't really a thing anymore, right?)

Comment 3 by bauerb@chromium.org, Jun 21 2017

Filed issue 735531 for the ProfileManager::GetPrimaryUserProfile() and GetActiveUserProfile() cleanup.
Is ProfileManager::GetLastUsedProfileAllowedByPolicy() more appropriate? 

Intuitively we should be able to keep a pointer to the Profile associated with the RenderFrameHost we are processing a request for but anecdotally any long-lived raw pointer to objects like Profile is dangerous. Is there any effort underway to use WeakPtr more widely for this?

Comment 5 by bauerb@chromium.org, Jun 26 2017

In this particular case, holding a pointer to the Profile object is totally fine. The Profile owns every WebContents and anything underneath that, and all of that is going to be destroyed before the Profile.

Comment 6 by scheib@chromium.org, Jun 27 2017

Labels: -Needs-triage
Hard to get to crash, but still a crash. I've moved this to top of device team's backlog.

Comment 7 by juncai@chromium.org, Jun 27 2017

Status: Started (was: Assigned)
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 29 2017

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

commit ed23c1c3b4a0bd7346088e790917daf31bbe2180
Author: Jun Cai <juncai@chromium.org>
Date: Thu Jun 29 17:04:56 2017

Fix opening WebUSB chooser when user profile changes

The "Get help" link uses ProfileManager::GetActiveUserProfile() to open a new tab
for help page, and it causes the issue when the active user profile is removed or
another user profile is created. This CL fixes it by using
ProfileManager::GetLastUsedProfileAllowedByPolicy().

Bug:  735353 ,  735360 
Change-Id: I2b1989152cac8e698c7258920a2a401159eb6c50
Reviewed-on: https://chromium-review.googlesource.com/553725
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Jun Cai <juncai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483399}
[modify] https://crrev.com/ed23c1c3b4a0bd7346088e790917daf31bbe2180/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.cc
[modify] https://crrev.com/ed23c1c3b4a0bd7346088e790917daf31bbe2180/chrome/browser/usb/usb_chooser_controller.cc

Comment 9 by juncai@chromium.org, Jun 30 2017

Status: Fixed (was: Started)
I encountered same crash signature: ID d8dde741063384e7

What I did was creating a profile, removing it and almost instantly running Chrome from the "profile shortcut". Normally this creates a new profile but this once it crashed.
Would you mind filing a new bug for that? Handling profile shortcuts should probably be treated differently.

Sign in to add a comment