New issue
Advanced search Search tips

Issue 894982 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 18
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 923138
issue 885347



Sign in to add a comment

if the simple disk_cache fake index file write fails, delete any partial file left on disk

Project Member Reported by wanderview@chromium.org, Oct 12

Issue description

In  bug 889976  we added a histogram to measure why the simple disk_cache fails to pass its consistency check.  After a week or so we have some initial numbers and they are mostly related to the fake index file.

From most frequent to least:

kBadInitialMagicNumber
kBadFakeIndexFile
kCreateDirectoryFailed
kWriteFakeIndexFileFailed
kReplaceFileFailed

Looking at the fake file index code it seems we may leave a partially written file here:

https://cs.chromium.org/chromium/src/net/disk_cache/simple/simple_version_upgrade.cc?l=145&rcl=c7542cefcc5c4dc18e14e4b10bcfe84396d4819a

That would then trigger a non-recoverable kBadInitialMagicNumber on later opens. (Because that error also means the fake index file is the wrong size...)
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 15

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

commit c00fa4683c3ef1a51cd5ce21ca024f2173283710
Author: Ben Kelly <wanderview@chromium.org>
Date: Mon Oct 15 19:41:07 2018

Delete any partially written file after failing to create simple disk_cache fake index.

R=morlovich@chromium.org

Bug:  894982 
Change-Id: Ic3c5ee9923bbd3ade6c0a269416684094d25dc43
Reviewed-on: https://chromium-review.googlesource.com/c/1278906
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599714}
[modify] https://crrev.com/c00fa4683c3ef1a51cd5ce21ca024f2173283710/net/disk_cache/simple/simple_version_upgrade.cc
[modify] https://crrev.com/c00fa4683c3ef1a51cd5ce21ca024f2173283710/net/disk_cache/simple/simple_version_upgrade.h
[modify] https://crrev.com/c00fa4683c3ef1a51cd5ce21ca024f2173283710/tools/metrics/histograms/enums.xml

Status: Fixed (was: Started)

Comment 3 by falken@chromium.org, Jan 17 (6 days ago)

Labels: M-72
Looks like this landed in 72.

Comment 4 by wanderview@chromium.org, Jan 17 (5 days ago)

Blocking: 923138

Sign in to add a comment