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

Issue 639363 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
please use my google.com address
Closed: Aug 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Mojo EDK: Deserialized dispatchers may not update state if unwatched

Project Member Reported by roc...@chromium.org, Aug 19 2016

Issue description

If a message pipe or data pipe dispatcher is deserialized and its associated port has changed status since serialization, this status change may never be detected in the new dispatcher.

The ports internal state has updated, but nothing forces the dispatcher to query it until either A) the status changes again or B) user code attaches an Awakable to the dispatcher.

We haven't run into this issue in practice since most practical use cases for these APIs involve using MojoWait or MojoWatch to wait for state changes, and this means (B) above happens.

 

Comment 1 by roc...@chromium.org, Aug 19 2016

Actually we don't force an update when adding a Watch, so that's the issue yhirano@ hit in https://codereview.chromium.org/1970693002/. In any case yhirano's solution seems reasonable and I'll do something similar for other dispatchers.
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 21 2016

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

commit 7cd99cc18b960e7d59109f16c53cad49ac09e7c4
Author: rockot <rockot@chromium.org>
Date: Sun Aug 21 00:27:25 2016

Mojo EDK: Add tests to exercise races in handle transit

Data pipe producer handles may change status while in transit
and the receiving end may never be notified of this change unless
they call MojoWait on the handle.

This fixes that, and adds test coverage to verify that the problem
does not exist and does not regress for data pipe consumers (fixed by
http://crrev.com/411707) or message pipe handles (don't currently
have this problem) either.

BUG= 639363 
R=yzshen@chromium.org

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

[modify] https://crrev.com/7cd99cc18b960e7d59109f16c53cad49ac09e7c4/mojo/edk/system/data_pipe_producer_dispatcher.cc
[modify] https://crrev.com/7cd99cc18b960e7d59109f16c53cad49ac09e7c4/mojo/edk/system/data_pipe_unittest.cc
[modify] https://crrev.com/7cd99cc18b960e7d59109f16c53cad49ac09e7c4/mojo/edk/system/multiprocess_message_pipe_unittest.cc

Comment 3 by roc...@chromium.org, Aug 21 2016

Status: Fixed (was: Assigned)

Sign in to add a comment