Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Issue 2029743002: Check WindowTreeClient for empty inflight queue upon teardown (Closed)

Created:
4 years, 6 months ago by jonross
Modified:
4 years, 6 months ago
Reviewers:
sadrul, sky
CC:
chromium-reviews, rjkroege
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Check WindowTreeClient for empty inflight queue upon teardown This is a follow up to https://codereview.chromium.org/2023933002/ & https://codereview.chromium.org/2010083002/ Which verifies that the inflight queue is cleared upon teardown. After running views_mus_unittests 100 times no case was found. However if this occurs on bots there may be currently hidden bugs. This change will allow us to find them. TEST=views_mus_unittests BUG=577274

Patch Set 1 #

Patch Set 2 : cleanup #

Patch Set 3 : More tests #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -0 lines) Patch
M components/mus/public/cpp/lib/window_tree_client.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M components/mus/public/cpp/tests/test_window_tree_client_setup.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M components/mus/public/cpp/tests/window_tree_client_private.h View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M components/mus/public/cpp/tests/window_tree_client_private.cc View 1 2 2 chunks +13 lines, -0 lines 0 comments Download
M components/mus/public/cpp/tests/window_tree_client_unittest.cc View 1 2 2 chunks +6 lines, -0 lines 2 comments Download
M components/mus/ws/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/ws/window_manager_client_unittest.cc View 1 2 5 chunks +10 lines, -0 lines 3 comments Download

Messages

Total messages: 21 (8 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2029743002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2029743002/1
4 years, 6 months ago (2016-06-01 20:14:05 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/196690)
4 years, 6 months ago (2016-06-01 20:44:17 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2029743002/20001
4 years, 6 months ago (2016-06-13 15:58:06 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/245608)
4 years, 6 months ago (2016-06-13 17:15:48 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2029743002/40001
4 years, 6 months ago (2016-06-14 14:37:43 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-14 15:36:01 UTC) #12
jonross
Hey Sadrul, Mind taking a look at this change? I add a DCHECK to WindowTreeClient ...
4 years, 6 months ago (2016-06-14 15:42:49 UTC) #14
sadrul
I am having second thoughts is this is useful, since it looks like it adds ...
4 years, 6 months ago (2016-06-15 06:42:46 UTC) #15
jonross
On 2016/06/15 06:42:46, sadrul wrote: > I am having second thoughts is this is useful, ...
4 years, 6 months ago (2016-06-15 13:59:10 UTC) #16
jonross
https://codereview.chromium.org/2029743002/diff/40001/components/mus/public/cpp/tests/window_tree_client_unittest.cc File components/mus/public/cpp/tests/window_tree_client_unittest.cc (right): https://codereview.chromium.org/2029743002/diff/40001/components/mus/public/cpp/tests/window_tree_client_unittest.cc#newcode1042 components/mus/public/cpp/tests/window_tree_client_unittest.cc:1042: setup.window_tree_client()->OnChangeCompleted(change_id1, true); On 2016/06/15 06:42:46, sadrul wrote: > I ...
4 years, 6 months ago (2016-06-15 14:03:08 UTC) #17
jonross
+sky@ for thoughts. In this change I'm adding a DCHECK to WindowTreeClient to verify that ...
4 years, 6 months ago (2016-06-16 20:06:58 UTC) #19
sky
On Thu, Jun 16, 2016 at 1:06 PM, <jonross@chromium.org> wrote: > +sky@ for thoughts. > ...
4 years, 6 months ago (2016-06-16 22:09:14 UTC) #20
jonross
4 years, 6 months ago (2016-06-17 13:35:27 UTC) #21
On 2016/06/16 22:09:14, sky wrote:
> On Thu, Jun 16, 2016 at 1:06 PM,  <mailto:jonross@chromium.org> wrote:
> > +sky@ for thoughts.
> >
> > In this change I'm adding a DCHECK to WindowTreeClient to verify that the
> > InFlightMap is empty upon shutdown. I wanted to verify this for tests, as
> > I'd
> > seen flaky tests, where the error would have caught earlier had the
> > client/server waited for all messages to be received.
> >
> > As the review is right now this requires some extra work in the tests, which
> > sadrul@ dislikes. I agree with his concerns.
> >
> > One concern can be addressed by moving the syncing of the queue to a test
> > TearDown method. Similar to how some tests perform RunAllPendingMessages.
> >
> > The other concern involves the cleanup of capture/focus InFlightChanges.
> > Since
> > these aren't attributed to Windows they aren't cleared out of the queue upon
> > window destruction. My thought is that we could update these
> > InFlightChanges,
> > which would remove the need to edit some tests.
> >
> > Thoughts?
> 
> If you add the DCHECK it implies clients have to know to run all
> messages, and wait for messages to be received. This can lead to
> awkward shutdown behavior where a client is trying to shutdown, but
> can't because they are waiting and worse yet must run a nested message
> loop. Nested message loops lead to all sorts of problems and in
> general are very hard to get right. We should allow clients to
> shutdown at any point they want and ensure we do the right thing.
> 
>   -Scott
> 
> >
> >
> > https://codereview.chromium.org/2029743002/
> 
> -- 
> You received this message because you are subscribed to the Google Groups
> "Chromium-reviews" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email
> to mailto:chromium-reviews+unsubscribe@chromium.org.
> 

Ok, that SGTM. Closing this review. Thanks

Powered by Google App Engine
This is Rietveld 408576698