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

Issue 617226 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
ex-Googler
Closed: Jun 2016
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Sqlite diagnostics using wrong db in integrity test.

Project Member Reported by sh...@chromium.org, Jun 3 2016

Issue description

Recently on chromium-dev, a corrupt profile report included:

> I ran --diagnostics (while Chrome is open) and ...
>
> [FAIL] Thumbnails database
>       Cannot open DB. Possibly corrupted

I thought "I've got this one!", but the file was not corrupted.  In fact, the file being tested is not a SQLite database.  At some point the Thumbnails SQLite database moved to "Top Sites".  These days Thumbnails is a leveldb directory, I have no idea what it is used for, but opening it as a SQLite database won't work.

I'll change it to hit "Top Sites" instead.
 

Comment 1 by sh...@chromium.org, Jun 3 2016

The error SQLite sees is:
[0603/113023:ERROR:connection.cc(1912)]  sqlite error 14, errno -2: unable to open database file, sql: -- sqlite3_open()
SQLITE_CANTOPEN==14, it's what you get when opening a directory.

Comment 2 by sh...@chromium.org, Jun 3 2016

Err, sorry, Favicons, not Top Sites.  My bad.

I should probably add Top Sites in there, though :-).

Comment 3 by sh...@chromium.org, Jun 3 2016

Thumbnails -> Favicons migration started in like 2010.  It's been done for a long time, AFAICT the last substantive changes were in 2013 where I deprecated some version support that was years out of date at the time.
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 5 2016

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

commit d31f1808e5bd040d54aca2b7a2a6c9767b5860ec
Author: shess <shess@chromium.org>
Date: Sun Jun 05 20:11:56 2016

Drop diagnostics reference to out-dated database.

In 2010, the Thumbnails database was migrated to Favicons.  The
diagnostics code still refers to Thumbnails.  At some point, Thumbnails
has become a directory containing a leveldb.  Attempting to open a
directory as a SQLite database fails with SQLITE_CANTOPEN, causing the
diagnostics code to generate red herrings.

Rename the "thumbnails" cases to "favicons".  Also add in "Top Sites",
which was missing from the diagnostics code.

BUG= 617226 

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

[modify] https://crrev.com/d31f1808e5bd040d54aca2b7a2a6c9767b5860ec/chrome/browser/diagnostics/diagnostics_metrics.cc
[modify] https://crrev.com/d31f1808e5bd040d54aca2b7a2a6c9767b5860ec/chrome/browser/diagnostics/diagnostics_metrics.h
[modify] https://crrev.com/d31f1808e5bd040d54aca2b7a2a6c9767b5860ec/chrome/browser/diagnostics/diagnostics_model.cc
[modify] https://crrev.com/d31f1808e5bd040d54aca2b7a2a6c9767b5860ec/chrome/browser/diagnostics/sqlite_diagnostics.cc
[modify] https://crrev.com/d31f1808e5bd040d54aca2b7a2a6c9767b5860ec/chrome/browser/diagnostics/sqlite_diagnostics.h
[modify] https://crrev.com/d31f1808e5bd040d54aca2b7a2a6c9767b5860ec/tools/metrics/histograms/histograms.xml

Comment 6 by sh...@chromium.org, Jun 7 2016

Status: Fixed (was: Started)

Sign in to add a comment