Daemon fails to start up when processing removable media if there are duplicate keys in media and media_attic tables
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
High
|
Unassigned | ||
mediascanner2 |
Fix Released
|
High
|
Unassigned | ||
mediascanner2 (Ubuntu) |
Fix Released
|
High
|
Unassigned |
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_
what(): UNIQUE constraint failed: media_attic.id
This is almost definitely from the MediaStorePriva
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/
start mediascanner-2.0
Related branches
- Michi Henning (community): Approve
-
Diff: 98 lines (+34/-8)2 files modifiedsrc/mediascanner/MediaStore.cc (+7/-4)
test/test_mediastore.cc (+27/-4)
Changed in mediascanner2: | |
status: | New → In Progress |
importance: | Undecided → High |
Changed in canonical-devices-system-image: | |
milestone: | none → ww46-2015 |
status: | New → In Progress |
importance: | Undecided → High |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Committed |
Changed in mediascanner2: | |
status: | In Progress → Fix Released |
Changed in mediascanner2 (Ubuntu): | |
status: | New → Fix Released |
importance: | Undecided → High |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
Note, the workaround does not fix the problem. Removing the .cache content (in fact I removed all of .cache also in testing, makes no difference. On user login, the same error is presented.
I will retest in due course without any peripherals attached to see if this is a factor. Currently testing with the following:
Dell XPS15 (9530) - which worked flawlessly with 14.04LTS aside from poor support for UltraHD displays.
1. HDMI external monitor
2. USB receiver for Wireless Mouse + KB
2. USB 2.0 external HDD
I have observed the same crashes without some or all of these items.
Again, not an issue with 14.04 - this seems to be a new issue.