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

Issue 783492 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

mash: Check failed: event_dispatcher_.mouse_cursor_source_window in extensions browser_tests --mash

Project Member Reported by jamescook@chromium.org, Nov 10 2017

Issue description

Run browser_tests --mash for these tests:
 DeclarativeApiTest.*
 ExecuteScriptApiTest.*
 ExtensionWebRequestApiTest.*

Often you'll hit this DCHECK:

[148978:148978:1109/154509.520344:FATAL:window_manager_state.cc(527)] Check failed: event_dispatcher_.mouse_cursor_source_window(). 
#0 0x7f1959d3bdfc base::debug::StackTrace::StackTrace()
#1 0x7f1959d6285c logging::LogMessage::~LogMessage()
#2 0x000003dfe898 ui::ws::WindowManagerState::DispatchInputEventToWindowImpl()
#3 0x000003dffaf5 ui::ws::WindowManagerState::DispatchInputEventToWindow()
#4 0x000003e1e6a2 ui::ws::EventDispatcher::DispatchToClient()
#5 0x000003e1eb07 ui::ws::EventDispatcher::UpdateTargetForPointer()
#6 0x000003e1dea4 ui::ws::EventDispatcher::ProcessPointerEventOnFoundTargetImpl()
#7 0x000003e1d9c1 ui::ws::EventDispatcher::ProcessPointerEventOnFoundTarget()
#8 0x000003e1ff0b ui::ws::EventTargeter::FindTargetForLocationNow()
#9 0x000003e1fd7c ui::ws::EventTargeter::FindTargetForLocation()
#10 0x000003e1d5f9 ui::ws::EventDispatcher::ProcessEvent()
#11 0x000003dfe213 ui::ws::WindowManagerState::ProcessEventImpl()
#12 0x000003dfdafc ui::ws::WindowManagerState::ProcessEvent()
#13 0x000003e1b58d ui::ws::Display::OnEventFromSource()
#14 0x7f1954c94ae8 ui::EventSource::SendEventToSink()
#15 0x000003e235f2 ui::ws::PlatformDisplayDefault::DispatchEvent()
#16 0x7f1954c96724 ui::DispatchEventFromNativeUiEvent()
#17 0x7f194c7efc11 ui::X11WindowOzone::DispatchEvent()
#18 0x7f19576e8476 ui::PlatformEventSource::DispatchEvent()
#19 0x7f194c825ca4 ui::X11EventSourceLibevent::ProcessXEvent()
#20 0x7f194c821530 ui::X11EventSource::ExtractCookieDataDispatchEvent()
#21 0x7f194c82149d ui::X11EventSource::DispatchXEvents()
#22 0x7f1959d73f63 base::MessagePumpLibevent::OnLibeventNotification()
#23 0x7f1959e3a38d event_base_loop
#24 0x7f1959d742c2 base::MessagePumpLibevent::Run()
#25 0x7f1959d71149 base::MessageLoop::Run()
#26 0x7f1959da5828 base::RunLoop::Run()
#27 0x7f19568efcb3 content::UtilityMain()
#28 0x7f19568fb581 content::ContentMainRunnerImpl::Run()
#29 0x7f19544edf0b service_manager::Main()
#30 0x7f19568f9f64 content::ContentMain()
#31 0x000002927095 content::LaunchTests()
#32 0x00000237e735 LaunchChromeTests()
#33 0x00000237e186 RunMashBrowserTests()
#34 0x00000237e037 main
#35 0x7f194d9a8f45 __libc_start_main
#36 0x000000781faa _start

https://cs.chromium.org/chromium/src/services/ui/ws/window_manager_state.cc?q=window_manager_state.cc&sq=package:chromium&l=527

Looks like something is wrong with the cursor window for pointer events.

 

Comment 1 by sky@chromium.org, Nov 10 2017

Owner: sky@chromium.org
Status: Started (was: Untriaged)

Comment 2 by sky@chromium.org, Nov 11 2017

I'm pretty sure the DCHECK is unnecessary and can be removed, but I would like to understand what code path is triggering it (there are a couple of possibilities). I haven't been able to repro locally. What args do you use and are running this specially (say to a virtual window manager)?
build release with dchecks
run as ./testing/xvfb.py out/Release/browser_tests --mash --test-launcher-filter-file=<path to mash filter> --test-launcher-jobs=32

and keep those above tests in the filter file

I use testing/xvfb.py because that's what the bots use.

Project Member

Comment 4 by bugdroid1@chromium.org, Nov 15 2017

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

commit efd84b3ecbc03d720f9a1dad14f20e1d474b4931
Author: Scott Violet <sky@chromium.org>
Date: Wed Nov 15 17:08:34 2017

Changes EventDispatcher to reset mouse_cursor_source_window correctly

There were cases where EventDispatcher (and WindowServer) were not
resetting mouse_cursor_source_window() correctly, leading to resetting
at the wrong time (when the window was destroyed, vs when removed).

This patch specifically makes EventDispatcher forcefully reset the
mouse_cursor_source_window when the window is moved to an invalid
display. This typically means the window is about to be destroyed.

Additionally this makes WindowServer call to update the mouse cursor
source window when the hierarchy changes on the old and new
hierarchy. This is important as both displays may need to be updated.

Lastly, this removes a DCHECK in WindowManagerState that the
mouse_cursor_source_window is non-null. There are reasons it may be
null during dispatch (for example, the target window was destroyed
with the mouse down).

BUG= 783492 , 613646 
TEST=covered by tests

Change-Id: Ifb03d5f334bc61256d796f18a8c197abb4baca11
Reviewed-on: https://chromium-review.googlesource.com/769157
Reviewed-by: Ria Jiang <riajiang@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516726}
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/event_dispatcher.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/event_dispatcher.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/event_dispatcher_delegate.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/event_dispatcher_unittest.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/server_window_drawn_tracker.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/server_window_drawn_tracker_observer.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/server_window_drawn_tracker_unittest.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/test_server_window_delegate.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/test_server_window_delegate.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/test_utils.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/test_utils.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/window_manager_state.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/window_manager_state.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/window_server.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/window_server.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/window_tree_unittest.cc

Comment 5 by sky@chromium.org, Nov 15 2017

Status: Fixed (was: Started)
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 15 2017

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

commit 727ce5e20c73c2a486e8ec398db17913ce53baca
Author: James Cook <jamescook@chromium.org>
Date: Wed Nov 15 22:38:03 2017

chromeos: Enable settings and extensions mash_browser_tests on FYI bot

Now that the flaky mouse_cursor_source_window DCHECK is fixed (see bug)
we can enable a bunch more tests.

Bug:  783492 
Test: browser_tests --mash with all these tests enabled
Change-Id: I0d8a4f121a5dacf0784fd195ec50bd448471cd43
Reviewed-on: https://chromium-review.googlesource.com/773203
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516868}
[modify] https://crrev.com/727ce5e20c73c2a486e8ec398db17913ce53baca/testing/buildbot/filters/mojo.fyi.mash.browser_tests.filter

Comment 7 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 8 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)
Components: -Internals>MUS Internals>Services>WindowService

Sign in to add a comment