New issue
Advanced search Search tips

Issue 767991 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

Data race between SignalSyncToken callback and IsSyncTokenSignaled

Project Member Reported by sunn...@chromium.org, Sep 22 2017

Issue description

SignalSyncToken uses IPC whereas IsSyncTokenSignaled reads from command buffer shared memory state. There's no guarantee that when SignalSyncToken's callback is called, the shared memory state on the client would've updated.

piman@ suggested returning the versioned state in SignalSyncToken's IPC reply (similar to WaitForToken/GetOffset) and update the client's state if it's older.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 23 2017

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

commit 249fd030830af1663dc6c8fd5aa15088dae8f779
Author: Sunny Sachanandani <sunnyps@chromium.org>
Date: Sat Sep 23 02:30:11 2017

gpu: Update client command buffer state on SignalSyncToken ack.

This avoids a data race between the result of IsSyncTokenSignaled, which
reads from the shared memory state copy, and the SignalSyncToken
callback which uses IPC.

BUG= 767991 
R=piman

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ideb4c20e9b8eaa5b9f0756783c45a5d3606a442b
Reviewed-on: https://chromium-review.googlesource.com/679438
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503933}
[modify] https://crrev.com/249fd030830af1663dc6c8fd5aa15088dae8f779/gpu/ipc/client/command_buffer_proxy_impl.cc
[modify] https://crrev.com/249fd030830af1663dc6c8fd5aa15088dae8f779/gpu/ipc/client/command_buffer_proxy_impl.h
[modify] https://crrev.com/249fd030830af1663dc6c8fd5aa15088dae8f779/gpu/ipc/common/gpu_messages.h
[modify] https://crrev.com/249fd030830af1663dc6c8fd5aa15088dae8f779/gpu/ipc/service/gpu_command_buffer_stub.cc

Status: Fixed (was: Assigned)

Sign in to add a comment