New issue
Advanced search Search tips

Issue 631262 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug



Sign in to add a comment

DCHECK failure due to CACHE_CHECKSUM_READ_FAILURE

Project Member Reported by pkasting@chromium.org, Jul 25 2016

Issue description

When starting my debug build, I currently fail a DCHECK with the following stack:

storage::BlobURLRequestJob::NotifyFailure() Line 270
storage::BlobURLRequestJob::DidReadMetadata() Line 232
base::internal::FunctorTraits<>::Invoke<>() Line 215
base::internal::InvokeHelper<>::MakeItSo<>() Line 306
base::internal::Invoker<>::RunImpl<>() Line 350
base::internal::Invoker<>::Run() Line 328
base::Callback<>::Run() Line 390
storage::BlobReader::DidReadDiskCacheEntrySideData() Line 145
base::internal::FunctorTraits<>::Invoke<>() Line 215
base::internal::InvokeHelper<>::MakeItSo<>() Line 306
base::internal::Invoker<>::RunImpl<>() Line 350
base::internal::Invoker<>::Run() Line 328
base::Callback<>::Run() Line 390
base::internal::FunctorTraits<>::Invoke<>() Line 264
base::internal::InvokeHelper<>::MakeItSo<>() Line 285
base::internal::Invoker<>::RunImpl<>() Line 350
base::internal::Invoker<>::Run() Line 328
base::Callback<>::Run() Line 390
base::debug::TaskAnnotator::RunTask() Line 53
base::MessageLoop::RunTask() Line 497
base::MessageLoop::DeferOrRunPendingTask() Line 508
base::MessageLoop::DoWork() Line 629
base::MessagePumpForIO::DoRunLoop() Line 727
base::MessagePumpWin::Run() Line 142
base::MessageLoop::RunHandler() Line 460
base::RunLoop::Run() Line 36
base::Thread::Run() Line 206
content::BrowserThreadImpl::IOThreadRun() Line 226
content::BrowserThreadImpl::Run() Line 260
base::Thread::ThreadMain() Line 263
base::`anonymous namespace'::ThreadFunc() Line 85

The problem is that the read resulted in error -407, CACHE_CHECKSUM_READ_FAILURE, and the code in NotifyFailure() doesn't handle that, so it hits a DCHECK(FALSE).

This isn't a correct use of DCHECK.  DCHECK means something can never happen, even in extreme cases like the disk being corrupted.  If a cache checksum failed and the data on disk is likely corrupt, we need to handle it in some way (e.g. by showing the user some sort of error dialog and throwing away the whole cache), not just crash the program (even if it's a debug-only crash).

In general, NotifyFailure() has to handle all possible return codes from the requested operation, not just the common ones.
 
Status: Untriaged (was: Available)
Owner: dmu...@chromium.org
merge with  bug 636269 ?

Comment 3 by dmu...@chromium.org, Sep 14 2016

Cc: dmu...@chromium.org jsb...@chromium.org
 Issue 636269  has been merged into this issue.

Comment 4 by dmu...@chromium.org, Sep 14 2016

Status: Started (was: Untriaged)
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 14 2016

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

commit 9f16719bc8a0db5a53c0afa4ddab23ca594befc8
Author: dmurph <dmurph@chromium.org>
Date: Wed Sep 14 23:06:28 2016

[BlobStorage] Adding error code translations for cache storage metadata.

BUG= 631262 

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

[modify] https://crrev.com/9f16719bc8a0db5a53c0afa4ddab23ca594befc8/storage/browser/blob/blob_url_request_job.cc

Comment 6 by dmu...@chromium.org, Sep 14 2016

Status: Fixed (was: Started)

Sign in to add a comment