DatabaseError on loggerhead trying to view a revision on staging

Bug #718566 reported by Ursula Junque
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Данило Шеган
loggerhead
Fix Released
Critical
Данило Шеган

Bug Description

As seen on OOPS-1870SCB260:

    Traceback (most recent call last):
  Module launchpad_loggerhead.app, line 341, in wrapped_app
    app_iter = iter(app(environ, wrapped.start_response))
  Module launchpad_loggerhead.debug, line 106, in wrapped_application
    result = application(environ, response_hook)
  Module __main__, line 165, in wrapped
  Module launchpad_loggerhead.debug, line 45, in wrapped
    return app(environ, start_response)
  Module paste.translogger, line 68, in __call__
    return self.application(environ, replacement_start_response)
  Module paste.deploy.config, line 285, in __call__
    return self.app(environ, start_response)
  Module __main__, line 149, in wrapped
  Module paste.wsgilib, line 179, in catch_errors
    app_iter = application(environ, start_response)
  Module launchpad_loggerhead.session, line 53, in __call__
    return self.cookie_handler(environ, start_response)
  Module paste.auth.cookie, line 305, in __call__
    return self.application(environ, response_hook)
  Module launchpad_loggerhead.session, line 80, in _process
    return self.application(environ, response_hook)
  Module paste.httpexceptions, line 636, in __call__
    return self.application(environ, start_response)
  Module launchpad_loggerhead.app, line 229, in __call__
    return view.app(environ, start_response)
  Module loggerhead.apps.branch, line 174, in app
    return c(environ, start_response)
  Module loggerhead.controllers, line 93, in __call__
    vals.update(self.get_values(path, kwargs, headers))
  Module loggerhead.controllers.revision_ui, line 73, in get_values
    file_changes = h.get_file_changes(change)
  Module loggerhead.history, line 716, in get_file_changes
    return self._file_change_cache.get_file_changes(entry)
  Module loggerhead.changecache, line 113, in get_file_changes
    changes = cache.get(entry.revid)
  Module loggerhead.changecache, line 83, in get
    "select data from revisiondata where revid = ?", (revid, ))
DatabaseError: file is encrypted or is not a database

To reproduce, go to https://code.staging.launchpad.net/~abentley/bzrtools/bzrtools.dev and click on any revision.

Tags: oops qa-ok

Related branches

Ursula Junque (ursinha)
summary: - DatabaseError trying to view a revision on staging
+ DatabaseError on loggerhead trying to view a revision on staging
Ursula Junque (ursinha)
affects: launchpad → loggerhead
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 718566] [NEW] DatabaseError on loggerhead trying to view a revision on staging

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/14/2011 1:39 AM, Launchpad Bug Tracker wrote:
> You have been subscribed to a public bug:
>
> As seen on OOPS-1870SCB260:
...

> Module loggerhead.changecache, line 113, in get_file_changes
> changes = cache.get(entry.revid)
> Module loggerhead.changecache, line 83, in get
> "select data from revisiondata where revid = ?", (revid, ))
> DatabaseError: file is encrypted or is not a database
>
> To reproduce, go to
> https://code.staging.launchpad.net/~abentley/bzrtools/bzrtools.dev and
> click on any revision.

That indicates a corrupt sql file. I don't have any idea how it was
corrupted. The file in question is probably filechanges.sql.

Note that this is a cache of what contents changed in a given revision.

In discussing this with Michael Hudson quite some time ago, this only
exists because pre-2a format it was slow to answer the query of "what is
different between rev X and its parent". Since 2a makes that a fast
query, we can get rid of this cache.

I don't remember if I explicitly did all of that work in the
'experimental' code base, but I certainly pushed on it a little bit.

To finish it off, look for "FileChangeCache" and just remove places that
reference it. We don't need it any more.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1ZpJwACgkQJdeBCYSNAAO46wCeL/jqvxtX9pkNl74G+5h0lHr0
FLsAnijfQaJKW1wN0ixrGieN33crUEUv
=z9+v
-----END PGP SIGNATURE-----

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>
> To reproduce, go to
> https://code.staging.launchpad.net/~abentley/bzrtools/bzrtools.dev and
> click on any revision.
>
> ** Affects: loggerhead
> Importance: Critical
> Status: Triaged
>
>
> ** Tags: oops

The very immediate fix is that likely we need to delete
~abentley/bzrtools/bzrtools.dev/filechanges.sql

so that it will be repopulated.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1ZpMcACgkQJdeBCYSNAAM3ewCgl7IPbD7IVZKgSIVGYx/Y1881
9GUAmgIOTzWiWxQ++XkqeuFC1zoTEgjq
=9HWf
-----END PGP SIGNATURE-----

Revision history for this message
Данило Шеган (danilo) wrote :

I'm doing what John suggested in comment #1.

Changed in loggerhead:
status: Triaged → In Progress
assignee: nobody → Данило Шеган (danilo)
Changed in loggerhead:
status: In Progress → Fix Committed
tags: added: qa-needstesting
Changed in loggerhead:
status: Fix Committed → In Progress
Revision history for this message
Robert Collins (lifeless) wrote :

I've tweaked the bug status here: its committed in loggerhead, but the deploy-to-LP step requires a separate change to launchpad (the versions.cfg / sourcecode.conf update) and so its in-progress in LP.

Changed in loggerhead:
status: In Progress → Fix Committed
Changed in launchpad:
status: New → In Progress
importance: Undecided → Critical
Changed in launchpad:
assignee: nobody → Данило Шеган (danilo)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
William Grant (wgrant)
tags: added: qa-ok
removed: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Changed in launchpad:
status: Fix Committed → Fix Released
Changed in loggerhead:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.