DownloadFinished signal triggers when file has not yet completed writing

Bug #1031197 reported by Jono Bacon
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Status tracked in Trunk
Stable-3-0
New
Undecided
Unassigned
Stable-4-0
Fix Released
Undecided
Unassigned
Trunk
Fix Released
Undecided
Alejandro J. Cura
ubuntuone-client (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Won't Fix
Undecided
Unassigned
Quantal
Fix Released
Undecided
Unassigned

Bug Description

I am experiencing a problem where I connect a callback to DownloadFinished which then loads the file that has been downloaded. Unfortunately this is failing even though I can see the file on the disk - as such it looks like the signal triggers a short time before the file has completed writing.

From what I understand the file is copied to a temp dir and then moved and it seems this signal triggers when the file hits the temp dir. Can you fix this so that it triggers when the file is successfully written to its final path? Thanks!

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: ubuntuone-client 3.99.2-0ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-6.6-generic 3.5.0
Uname: Linux 3.5.0-6-generic i686
ApportVersion: 2.4-0ubuntu6
Architecture: i386
Date: Mon Jul 30 20:45:05 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntuone-client
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Jono Bacon (jonobacon) wrote :
Revision history for this message
James Henstridge (jamesh) wrote :

I was helping Jono look into this on IRC. It seems that AQ_DOWNLOAD_FINISHED state within the syncdaemon is used both to emit the DownloadFinished D-Bus signal to the outside world and trigger the rename from the .u1partial file to the real file name (through commit_file).

For the DownloadFinished D-Bus signal to be useful, it really should happen after the rename has completed, otherwise it is subject to the race condition Jono encountered.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in ubuntuone-client (Ubuntu):
status: New → Confirmed
Roberto Alsina (ralsina)
Changed in ubuntuone-client:
assignee: nobody → Alejandro J. Cura (alecu)
status: New → Confirmed
Changed in ubuntuone-client:
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-client - 3.99.4-0ubuntu1

---------------
ubuntuone-client (3.99.4-0ubuntu1) quantal; urgency=low

  * New upstream release.
    - Folder path verification should fail if path is a file. (LP: #1033582)
    - DownloadFinished signal should happen after file move. (LP: #1031197)
  * debian/copyright:
    - Update to be more in line with dep5.
  * debian/rules:
    - Use --fail-missing option for dh_install.
 -- Rodney Dawes <email address hidden> Thu, 23 Aug 2012 12:51:25 -0400

Changed in ubuntuone-client (Ubuntu Quantal):
status: Confirmed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in ubuntuone-client (Ubuntu Precise):
status: New → Won't Fix
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.