Ubuntu

MASTER: autosaves hang Simple Scan repeatedly on Ubuntu 13.10

Reported by Angelos Sfakianakis on 2013-10-28
68
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Simple Scan
Critical
Unassigned
simple-scan (Ubuntu)
Status tracked in Trusty
Saucy
Medium
Robert Ancell
Trusty
Medium
Robert Ancell

Bug Description

THIS IS ACTUALLY FIXED IN UPSTREAM SIMPLE SCAN.
BUT AS IT IS NOT FIXED IN UBUNTU 13.10 A LOT OF DUPLICATES ARE CREATED.
IF THIS BUG IS MARKED FIXED IN SIMPLE SCAN, THIS BUG WILL DISAPPEAR FROM SEARCH RESULTS.
THIS MAKES IT HARDER TO MARK DUPLICATES.
PLEASE CLOSE THIS BUG ONLY WHEN "THE SITUATION" IS RESOLVED,
EVEN IF THE ACTUAL BUG IS ALREADY SOLVED.

-----

Simple Scan becomes highly unresponsive due to how it automatically saves documents as they are being scanned. This is due to writing large files into a sqlite database and doing it more frequently than is required.

To reproduce:
1. Open Simple Scan
2. Scan a lot of pages
Expected result:
The pages scan quickly without excessive memory usage.
Observed result:
The UI is highly unresponsive and looking in ~/.cache/simple-scan/autosaves shows a very large database file that is being frequently updated.

Regression potential:
Medium. The autosave mechanism was rewritten to be more efficient. There may be new bugs exposed in its usage.

OK, I think I now have some more information on the Bug. It has to do with Hard Disk usage. For some peculiar reason, Simple Scan writes autosaves all the time. I temporarily fixed it by making the directory `~/.config/simple-scan/autosaves` read only (using `chmod 555`) after deleting the 300MB autosave file it contained inside...
In order for the Bug to be fixed, the auto-saving feature has to be disabled. In my opinion, it is of no use and causes more problems than it solves.

PS: I noticed lately that Ubuntu (and Linux in general) is falling for the same trap Microsoft did when creating Windows Vista. It is simple: "Features that exhaust the Computer's resources are not needed; they make a good Operating System look like garbage..." :D

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in simple-scan (Ubuntu):
status: New → Confirmed
tom (bizgec) wrote :

Hi,

I am also having problems using simple scan after upgrade to 13.10. It crashes when I click scan. I have tried the solution mentioned in the comment, so i have changed permissions for ~/.cache/simple-scan/autosaves but it did not help. (there is no simple-scan folder in .config on my computer)

It is actually the `.cache` folder. Simple Scan seems to save backup files there much more frequently than needed...

Delete all the files in the `~/.cache/simple-scan/autosaves` directory first, or try `chmod -R 500 ~/.cache/simple-scan/autosaves`. I hope this helps. It certainly worked as a temporary fix for me... :D

Also, simple-scan can't see my scanner without sudo after upgrade from 13.04 to 13.10.

Changed in simple-scan (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Changed in simple-scan (Ubuntu Trusty):
status: Triaged → Fix Released
Changed in simple-scan (Ubuntu Saucy):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Robert Ancell (robert-ancell)
Changed in simple-scan (Ubuntu Trusty):
assignee: nobody → Robert Ancell (robert-ancell)
description: updated
Chris Halse Rogers (raof) wrote :

Urgh. Vala code is entirely unreviewable for SRUs. We, on the SRU team, should really work out what to do about that.

This seems like a reasonably risky change - from code that's sometimes unresponsive, to code that might crash in new and interesting ways!

Also, it seems that a simpler change might be to simply delete the autosave file on clean shutdown?

I've rejected this from the queue; could you please upload again, either with just the fixes for the other two bugs or with a less invasive fix for this bug? Or, I guess, convince me or another SRU team member that this is the most appropriate fix and we'll fish it out of the rejected queue.

Michael Nagel (nailor) on 2013-11-18
summary: - Simple Scan hangs repeatedly on Ubuntu 13.10
+ autosaves hang Simple Scan repeatedly on Ubuntu 13.10
Michael Nagel (nailor) on 2013-11-20
Changed in simple-scan:
status: New → Triaged
importance: Undecided → Critical
description: updated
summary: - autosaves hang Simple Scan repeatedly on Ubuntu 13.10
+ MASTER: autosaves hang Simple Scan repeatedly on Ubuntu 13.10
Robert Ancell (robert-ancell) wrote :

After talking with Chris the Vala code he is referring to being hard to review is the .c file changes, not the .vala changes. This is due to autotools (stupidly) distributing the .c files in the releases.

To be clear, the current code is not sometimes unresponsive, but severely unresponsive in all but the most trivial cases. This is due to the constant rewriting of image binary data (that may be huge) to a sqlite database (which is slow) on many unrelated document changes (e.g. moving the crop).

Both the existing and new code deletes the autosave file on clean exit.

Smaller changes were reviewed to the existing code but I judged them to be a higher risk than the new implementation. We could have the option to disable the autosave code for a simpler SRU, but this would be a feature regression. It is a useful feature since many SANE drivers can crash during a scan causing the user to loose all data.

Note the new code is currently running in Ubuntu 14.04.

Hello Angelos, or anyone else affected,

Accepted simple-scan into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/simple-scan/3.10.2-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in simple-scan (Ubuntu Saucy):
status: In Progress → Fix Committed
tags: added: verification-needed
Jaydip Guha (guha-jaydip) wrote :

Simple scan is very very slow in Saucy. Not only it crashes on every exit effort but also takes ages once you try to crop any image. the start-up time is very slow. This is one of the most useful utility and current state is truly annoying.

As a part of the Stable Release Updates quality process a search for Launchpad bug reports using the version of simple-scan from saucy-proposed was performed and bug 1261440 was found. Please investigate this bug report to ensure that a regression will not be created by this SRU. In the event that this is not a regression remove the "verification-failed" tag from this bug report and tag 1261440 "bot-stop-nagging". Thanks!

tags: added: verification-failed
Robert Ancell (robert-ancell) wrote :

That bug is not related, removing verification-failed.

tags: removed: verification-failed
Eric Hutchinson (eric-hutch) wrote :

I tested simple-scan 3.10.2-0ubuntu1 from proposed, and can confirm this fixes the repeated hangs. I could open simple-scan, and scan multiple pages while cropping, without the slowness seen in the previous version.

tags: added: verification-done
removed: verification-needed
Robert Ancell (robert-ancell) wrote :

Thanks for confirming Eric!

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package simple-scan - 3.10.2-0ubuntu1

---------------
simple-scan (3.10.2-0ubuntu1) saucy; urgency=low

  * New upstream release:
    - Install missing help images (LP: #1211148)

simple-scan (3.10.1-0ubuntu1) saucy; urgency=low

  * New upstream release:
    - Fix page size not being applied on some drivers (LP: #550856)
    - Rewrite autosaving. Now uses files for scan data, is more efficient in
      writing to disk and drops dependency on sqlite. (LP: #1245678)
  * debian/control:
    - Drop build-depends on libsqlite3-dev
 -- Robert Ancell <email address hidden> Fri, 01 Nov 2013 12:42:30 -0700

Changed in simple-scan (Ubuntu Saucy):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for simple-scan has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers