ActionQueue does not reset tempfile

Bug #884959 reported by Facundo Batista
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Status tracked in Trunk
Stable-2-0
Fix Released
Critical
Natalia Bidart
Trunk
Fix Released
Critical
Facundo Batista
ubuntuone-client (Ubuntu)
Fix Released
Critical
Ubuntu One Client Engineering team
Oneiric
Fix Released
Critical
Ubuntu One Client Engineering team
Precise
Fix Released
Critical
Ubuntu One Client Engineering team

Bug Description

The tempfile, now that it's not closed, it must be reset to 0 on every _run(), as the storageprotocol's client only seeks into the tempfile if it's a resumable one.

So, if we don't reset it to the start, on normal files, in the case of retries, we'll start the upload from the middle of the file, which will fail because of "corrupt data" (which will generate a retry... yes, a loop).

TEST CASE:
1. Grab a file of substantial size (100Mb is ok) which is not yet on Ubuntu One
2. Put it to ~/Ubuntu One folder
3. Wait until upload starts by looking at u1sdtool --current-transfers
4. Simulate server disconnect/network issue by shutting down network.
5. SD will enter READY state, upload is still queued
6. Connect to network again

Expected results:
SD starts to upload the remaining part of the file

Actual results:
Upload fails completely - AQ_UPLOAD_ERROR, syncdaemon returns to IDLE state. File is not uploaded to personal storage.

Related branches

tags: added: support
Changed in ubuntuone-client (Ubuntu):
status: New → Confirmed
milestone: none → oneiric-updates
importance: Undecided → Critical
assignee: nobody → Ubuntu One Desktop+ team (ubuntuone-desktop+)
tags: added: u1-oneiric-sru
Changed in ubuntuone-client (Ubuntu Oneiric):
milestone: none → oneiric-updates
Changed in ubuntuone-client (Ubuntu Precise):
milestone: oneiric-updates → precise-alpha-1
Changed in ubuntuone-client (Ubuntu Oneiric):
assignee: nobody → Ubuntu One Desktop+ team (ubuntuone-desktop+)
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-client - 2.0.0-0ubuntu3

---------------
ubuntuone-client (2.0.0-0ubuntu3) precise; urgency=low

  * debian/patches/02_value_io_error_fix.patch:
      - Make the Upload process do not close the tempfile until is finished
        (LP: #872924).
      - Reset the tempfile on every Upload _run() (LP: #884959).
 -- Natalia Bidart (nessita) <email address hidden> Mon, 14 Nov 2011 11:16:03 -0300

Changed in ubuntuone-client (Ubuntu Precise):
status: Confirmed → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Hello Facundo, or anyone else affected,

Accepted ubuntuone-client into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in ubuntuone-client (Ubuntu Oneiric):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Joshua Hoover (joshuahoover) wrote :

Verified test case passed using proposed ubuntuone-client 2.0.0-0ubuntu2.1

description: updated
Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Hello Facundo, or anyone else affected,

Accepted ubuntuone-client into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: removed: verification-done
tags: added: verification-needed
Revision history for this message
Joshua Hoover (joshuahoover) wrote :

Verified test case passed using proposed ubuntuone-client 2.0.0-0ubuntu2.2. The same test also passed for bug #872924

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-client - 2.0.0-0ubuntu2.2

---------------
ubuntuone-client (2.0.0-0ubuntu2.2) oneiric-proposed; urgency=low

  * debian/patches/02_value_io_error_fix.patch:
      - Make the Upload process do not close the tempfile until is finished
        (LP: #872924).
      - Reset the tempfile on every Upload _run() (LP: #884959).
 -- Natalia Bidart (nessita) <email address hidden> Mon, 14 Nov 2011 11:16:03 -0300

Changed in ubuntuone-client (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Changed in ubuntuone-client:
status: Fix Committed → Fix Released
tags: removed: u1-oneiric-sru
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.