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

Issue 668181 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

InputMethodMusTest.DispatchKeyEvent is flakey

Project Member Reported by sky@chromium.org, Nov 23 2016

Issue description

Running this test by itself more often then not deadlocks. This test connects to the test_ime_driver dispatches a key event and waits until input is received. This test is expecting the test_ime_driver to register itself as the current IMEDriver. Problem is, there is no guarantee by the time the key event is dispatched the test_ime_driver has completed registration. It should wait for that before it dispatches the key event.
 
Status: Started (was: Untriaged)
Before registering a driver we queue the requests and send them to driver once it registers itself. So I don't think connecting to IMEServer before driver registers is a problem.

The problem is we started test_ime_driver twice: Once in IMEServerImpl, and a 2nd time in InputMethodMusTest. If a client connects before the 2nd start, then the 2nd start will kill the connection between the client and the 1st driver, so the client will indefinitely wait for a response if it doesn't handle connection errors.

I'll submit a CL to fix this shortly.
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 30 2016

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

commit c2edfc8753717dee68567dbb08f04e8623f1be65
Author: moshayedi <moshayedi@chromium.org>
Date: Wed Nov 30 16:45:01 2016

IME for Mus: Fix InputMethodMusTest.DispatchKeyEvent's deadlock.

What was happening was:
 - IMEServerImpl starts test_ime_driver, which registers itself to Mus.
 - InputMethodMusTests requests to start test_ime_driver, but before it
   starts, it connects to IMEServer, which creates a connection between
   client and the first test_ime_driver.
 - test_ime_driver starts for a 2nd time, which causes IMEServerImpl to
   drop the connection to the first test_ime_driver. This causes
   clients using the first test_ime_driver to hang.

This fix:
 - Removes starting the test_ime_driver for a 2nd time.
 - Rejects drivers after first driver registers itself.

BUG= 668181 

Review-Url: https://codereview.chromium.org/2535403002
Cr-Commit-Position: refs/heads/master@{#435291}

[modify] https://crrev.com/c2edfc8753717dee68567dbb08f04e8623f1be65/services/ui/ime/ime_server_impl.cc
[modify] https://crrev.com/c2edfc8753717dee68567dbb08f04e8623f1be65/ui/views/mus/input_method_mus_unittest.cc

Status: Fixed (was: Started)

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

Labels: VerifyIn-58

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

Labels: VerifyIn-59

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

Labels: VerifyIn-60

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

Labels: VerifyIn-61

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

Status: Archived (was: Fixed)
Components: Tests>Disabled
Labels: Test-Disabled

Sign in to add a comment