DownloadFinished signal triggers when file has not yet completed writing

Bug #1031197 reported by Jono Bacon on 2012-07-31
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Status tracked in Trunk
Stable-3-0
Undecided
Unassigned
Stable-4-0
Undecided
Unassigned
Trunk
Undecided
Alejandro J. Cura
ubuntuone-client (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned
Quantal
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

Jono Bacon (jonobacon) wrote :
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.

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) on 2012-07-31
Changed in ubuntuone-client:
assignee: nobody → Alejandro J. Cura (alecu)
status: New → Confirmed
Changed in ubuntuone-client:
status: Confirmed → Fix Committed
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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers