New issue
Advanced search Search tips

Issue 686922 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Mac
Pri: 1
Type: Bug



Sign in to add a comment

SecurityKeyIpcServerTest fails the first attempt when running remoting_unittests.

Project Member Reported by nicho...@chromium.org, Jan 30 2017

Issue description

Something has changed with IPC and Mac. The remoting unit tests pass but only because the process retries. Unit tests are taking about 10-15 minutes to run on mac, normally this would be just several seconds.

This is the error I am seeing:

[16753:13827:0130/153123.817855:201551211254577:ERROR:kill_posix.cc(84)] Unable to terminate process group 16823: No such process
[731/787] SecurityKeyIpcClientTest.UnexpectedInvalidSessionMessagesReceived (5 ms)
[ RUN      ] SecurityKeyIpcServerTest.HandleSingleSecurityKeyRequest
../../remoting/host/security_key/security_key_ipc_server_unittest.cc:139: Failure
Value of: fake_ipc_client.connection_ready()
  Actual: false
Expected: true
[  FAILED  ] SecurityKeyIpcServerTest.HandleSingleSecurityKeyRequest (255 ms)
[732/787] SecurityKeyIpcServerTest.HandleSingleSecurityKeyRequest (255 ms)
[ RUN      ] SecurityKeyIpcServerTest.HandleLargeSecurityKeyRequest
../../remoting/host/security_key/security_key_ipc_server_unittest.cc:176: Failure
Value of: fake_ipc_client.connection_ready()
  Actual: false
Expected: true
[  FAILED  ] SecurityKeyIpcServerTest.HandleLargeSecurityKeyRequest (254 ms)
[733/787] SecurityKeyIpcServerTest.HandleLargeSecurityKeyRequest (254 ms)
[ RUN      ] SecurityKeyIpcServerTest.HandleReallyLargeSecurityKeyRequest
../../remoting/host/security_key/security_key_ipc_server_unittest.cc:213: Failure
Value of: fake_ipc_client.connection_ready()
  Actual: false
Expected: true
[  FAILED  ] SecurityKeyIpcServerTest.HandleReallyLargeSecurityKeyRequest (256 ms)
[734/787] SecurityKeyIpcServerTest.HandleReallyLargeSecurityKeyRequest (256 ms)
[ RUN      ] SecurityKeyIpcServerTest.HandleMultipleSecurityKeyRequests
../../remoting/host/security_key/security_key_ipc_server_unittest.cc:250: Failure
Value of: fake_ipc_client.connection_ready()
  Actual: false
Expected: true
[  FAILED  ] SecurityKeyIpcServerTest.HandleMultipleSecurityKeyRequests (255 ms)
[735/787] SecurityKeyIpcServerTest.HandleMultipleSecurityKeyRequests (255 ms)
[736/787] SecurityKeyIpcServerTest.InitialIpcConnectionTimeout_ConnectOnly (256 ms)
[737/787] SecurityKeyIpcServerTest.InitialIpcConnectionTimeout_ConnectAndEstablishMojoConnection (254 ms)
[ RUN      ] SecurityKeyIpcServerTest.NoSecurityKeyRequestTimeout
../../remoting/host/security_key/security_key_ipc_server_unittest.cc:346: Failure
Value of: fake_ipc_client.connection_ready()
  Actual: false
Expected: true
[  FAILED  ] SecurityKeyIpcServerTest.NoSecurityKeyRequestTimeout (255 ms)
[738/787] SecurityKeyIpcServerTest.NoSecurityKeyRequestTimeout (255 ms)
[ RUN      ] SecurityKeyIpcServerTest.SecurityKeyResponseTimeout
../../remoting/host/security_key/security_key_ipc_server_unittest.cc:373: Failure
Value of: fake_ipc_client.connection_ready()
  Actual: false
Expected: true
[  FAILED  ] SecurityKeyIpcServerTest.SecurityKeyResponseTimeout (255 ms)
[739/787] SecurityKeyIpcServerTest.SecurityKeyResponseTimeout (255 ms)
[ RUN      ] SecurityKeyIpcServerTest.SendResponseTimeout
../../remoting/host/security_key/security_key_ipc_server_unittest.cc:407: Failure
Value of: fake_ipc_client.connection_ready()
  Actual: false
Expected: true
[  FAILED  ] SecurityKeyIpcServerTest.SendResponseTimeout (255 ms)
[740/787] SecurityKeyIpcServerTest.SendResponseTimeout (255 ms)
[741/787] Webrtc/ConnectionTest.FirstCaptureFailed/0 (1974 ms)
[742/787] Webrtc/ConnectionTest.SecondCaptureFailed/0 (163 ms)

 
Labels: -Pri-3 OS-Linux Pri-1
Owner: joedow@chromium.org
Status: Assigned (was: Untriaged)
I saw the same issue on Linux.

Joe, do you know what may cause it?

Comment 2 by joedow@chromium.org, Jan 31 2017

Status: Started (was: Assigned)
It looks like it is caused by setting up and tearing down the IPC Support object for each test case.
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 7 2017

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

commit a7c4f961c4f1e8724dc7cb05552aa30b2c58fa9a
Author: joedow <joedow@chromium.org>
Date: Tue Feb 07 17:13:17 2017

Fixing Intermittent SecurityKey Unittest Failures

This issue was introduced with the move from IPC to Mojo.  The problem
occurs when tests requiring IPC Support run back to back, running them
individually is fine.  In the error scenario, the IPC Server class fails
to create a Mojo channel.  This appears to be a result of initializing a
new IPC Support object before every test is executed and cleaning it up
afterwards.  The cleanup is asynchronous and can cause problems with the
subsequent test run.

My solution is to initialize the IPC Support object before the call to
execute tests, that way the setup and cleanup only occurs once per test
suite run and we don't hit these race conditions.  This looks like a
common pattern in other unit tests in Chromium.

BUG= 686922 

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

[modify] https://crrev.com/a7c4f961c4f1e8724dc7cb05552aa30b2c58fa9a/remoting/base/run_all_unittests.cc
[modify] https://crrev.com/a7c4f961c4f1e8724dc7cb05552aa30b2c58fa9a/remoting/host/security_key/fake_security_key_ipc_client.cc
[modify] https://crrev.com/a7c4f961c4f1e8724dc7cb05552aa30b2c58fa9a/remoting/host/security_key/fake_security_key_ipc_client.h
[modify] https://crrev.com/a7c4f961c4f1e8724dc7cb05552aa30b2c58fa9a/remoting/host/security_key/security_key_auth_handler_win_unittest.cc
[modify] https://crrev.com/a7c4f961c4f1e8724dc7cb05552aa30b2c58fa9a/remoting/host/security_key/security_key_ipc_client_unittest.cc
[modify] https://crrev.com/a7c4f961c4f1e8724dc7cb05552aa30b2c58fa9a/remoting/host/security_key/security_key_ipc_server_unittest.cc

Status: Verified (was: Started)

Sign in to add a comment