New issue
Advanced search Search tips

Issue 658779 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature



Sign in to add a comment

Add checksum to on-disk program cache

Project Member Reported by ericrk@chromium.org, Oct 24 2016

Issue description

Currently, the on-disk cache of GL programs does not have a checksum, making it vulnerable to data corruption. We should add some simple/cheap checksumming.
 

Comment 1 by vmi...@chromium.org, Jan 13 2017

ericrk@, were you able to look at this?

Comment 2 by ericrk@chromium.org, Jan 17 2017

Status: Started (was: Available)
Took a look, actually seems really easy to add - CL out.
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 19 2017

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

commit 5c34fe289869ccd38b3cf39add76b00e2c51cb97
Author: ericrk <ericrk@chromium.org>
Date: Thu Jan 19 18:53:10 2017

Add SHA1 data checksum to on-disk shader cache

Previously, the on-disk cache was stored with a SHA1 hash of a number
of common peices of system info, such as GL Vendor, OS version, etc...

This change adds the actual data being stored to the SHA1, which should
protect against corruption on disk.

BUG= 658779 

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

[modify] https://crrev.com/5c34fe289869ccd38b3cf39add76b00e2c51cb97/content/browser/gpu/gpu_process_host.cc
[modify] https://crrev.com/5c34fe289869ccd38b3cf39add76b00e2c51cb97/content/browser/gpu/gpu_process_host.h
[modify] https://crrev.com/5c34fe289869ccd38b3cf39add76b00e2c51cb97/tools/metrics/histograms/histograms.xml

Comment 4 by ericrk@chromium.org, Jan 19 2017

Status: Fixed (was: Started)
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 7 2017

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

commit 06d94217594da5c82a4f5c67d90fd2d81cf613fa
Author: Eric Karl <ericrk@chromium.org>
Date: Mon Aug 07 23:33:52 2017

Disable hash validation in shader disk cache

The sha1 hash leads to problems with double-caching of shaders.
The binary representation of a shader (protobuf) is not stable, as
protobuf fields are rearranged in subsequent usages of the shader.

While these rearranged protobufs have no meaningful differences,
they lead to new hashes, causing the shader to be double cached.

As the hash validation had no impact on the crash-on-upgrade issue it
was intended to fix, it's probably easiest to just remove it.

Bug:  658779 
Change-Id: Ic470e16e4ae6a0b66fd8d8f2c0aa3207455588fe
Reviewed-on: https://chromium-review.googlesource.com/604333
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492447}
[modify] https://crrev.com/06d94217594da5c82a4f5c67d90fd2d81cf613fa/content/browser/gpu/gpu_process_host.cc
[modify] https://crrev.com/06d94217594da5c82a4f5c67d90fd2d81cf613fa/content/browser/gpu/gpu_process_host.h

Sign in to add a comment