← Back to team overview

touch-packages team mailing list archive

[Bug 1501990] Re: Daemon fails to start up when processing removable media if there are duplicate keys in media and media_attic tables

 

** Also affects: mediascanner2 (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: mediascanner2 (Ubuntu)
       Status: New => Fix Released

** Changed in: mediascanner2 (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mediascanner2 in Ubuntu.
https://bugs.launchpad.net/bugs/1501990

Title:
  Daemon fails to start up when processing removable media if there are
  duplicate keys in media and media_attic tables

Status in Canonical System Image:
  Fix Committed
Status in mediascanner2:
  Fix Released
Status in mediascanner2 package in Ubuntu:
  Fix Released

Bug description:
  From a report from Mitchell Reese on the ubuntu-phone list, it seems
  we can hit terminate on startup when processing removable media.

  The log extract was:

      Mediascanner service starting at 2015-10-02  6:31:12.

      terminate called after throwing an instance of 'std::runtime_error'
        what():  UNIQUE constraint failed: media_attic.id

  This is almost definitely from the MediaStorePrivate::archiveItems()
  method, indicating that some of the items being moved to the attic
  were assigned the same primary key ID as other items we'd previously
  moved to the attic.

  Ignoring the ID field when copying between the two tables would
  probably be the best solution.

  As a work around for anyone who encounters this before we roll out a
  fix, deleting the media index should make the problem go away:

      stop mediascanner-2.0
      rm ~/.cache/mediascanner-2.0/mediastore.db
      start mediascanner-2.0

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1501990/+subscriptions