syncdaemon deletes files when local machine errors out on creation of partial

Bug #657195 reported by John Lenton on 2010-10-09
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Critical
Facundo Batista
Stable-1-2
Undecided
Unassigned
Stable-1-4
Critical
Facundo Batista
ubuntuone-client (Ubuntu)
High
Facundo Batista
Maverick
High
dobey

Bug Description

the partial filename of a file is longer than the filename, and this can lead to some interesting problems: if the creation of the partial errors out because of this,

2010-10-09 01:30:20,369 - ubuntuone.SyncDaemon.sync - ERROR - T:LOCAL:F 6ac2ebf8-13c1-421c-9e57-d6da99c60722 ['528d2446-60b8-458a-af58-8ccfe2bd352f'::'97cbf601-062c-4d86-a918-6e048ec65585'] '"Purchased from Ubuntu One/Herbert von Karajan_Philharmonia Orchestra_Elisabeth Schwarzkopf_Marga H\xc3\xb6ffgen_Ernst Haefliger_Otto Edelmann/Beethoven: The 9 Symphonies/Symphony No. 9 in D minor 'Choral' Op. 125 (2008 Digital Remaster): III. Adagio molto e cantabile - Andante moderato.mp3"' | Executing ACTION_FUNC 'get_file' gave an exception: IOError(36, 'File name too long')
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/ubuntuone/syncdaemon/fsm/fsm.py", line 137, in on_event
    af(event_name, parameters, *args)
  File "/usr/lib/pymodules/python2.6/ubuntuone/syncdaemon/sync.py", line 464, in get_file
    share_id=self.key['share_id'])
  File "/usr/lib/pymodules/python2.6/ubuntuone/syncdaemon/filesystem_manager.py", line 907, in create_partial
    open(partial_path, "w").close()
IOError: [Errno 36] File name too long: "/home/john/.cache/ubuntuone/partials/6ac2ebf8-13c1-421c-9e57-d6da99c60722.u1partial.Symphony No. 9 in D minor 'Choral' Op. 125 (2008 Digital Remaster): III. Adagio molto e cantabile - Andante moderato.mp3"

syncdaemon then deletes the file on the server.
(ecryptfs has stronger limits on the filename length than usual; see lp:344878)

Logs attached.

------------------------------

TEST CASE:
1. Open https://one.ubuntu.com/files
2. Upload test file with name that is one character below the max supported by the filesystem (unecrypted filesystem, use something like: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.txt")
3. In terminal session run:
u1sdtool -d; u1sdtool -c

Result: Uploaded file is not in ~/Ubuntu One/ and is no longer on the server https://one.ubuntu.com/files

Expected result: Uploaded file is in ~/Ubuntu One/ and on the server https://one.ubuntu.com/files

Related branches

John Lenton (chipaca) wrote :
Changed in ubuntuone-client:
assignee: Lucio Torre (lucio.torre) → Facundo Batista (facundo)
importance: Undecided → High
status: New → Triaged
Lucio Torre (lucio.torre) wrote :

The serious part is that when make partial fails we fail to download the file and we leave stuff in a state that LR think the file was deleted. We will track this issue with this bug, we will use #662660 to track the creation of shorter partials.

Changed in ubuntuone-client:
importance: High → Critical
Changed in ubuntuone-client (Ubuntu):
status: New → Triaged
importance: Undecided → High
description: updated
tags: added: chicharra u1-maverick-sru
Changed in ubuntuone-client (Ubuntu):
assignee: nobody → Facundo Batista (facundo)
description: updated
Changed in ubuntuone-client:
status: Triaged → Fix Committed
dobey (dobey) on 2010-12-14
Changed in ubuntuone-client:
status: Fix Committed → Fix Released
Changed in ubuntuone-client (Ubuntu):
status: Triaged → Fix Released
dobey (dobey) on 2011-02-17
Changed in ubuntuone-client (Ubuntu Maverick):
assignee: nobody → Rodney Dawes (dobey)
importance: Undecided → High
status: New → In Progress
Changed in ubuntuone-client (Ubuntu Maverick):
milestone: none → maverick-updates

Accepted ubuntuone-client into maverick-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 Maverick):
status: In Progress → Fix Committed
tags: added: verification-needed
Joshua Hoover (joshuahoover) wrote :

Verified fixed on maverick with proposed update: ubuntuone-client 1.4.6-0ubuntu1

John O'Brien (jdobrien) wrote :

nice job people!

Martin Pitt (pitti) on 2011-02-25
tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-client - 1.4.6-0ubuntu2

---------------
ubuntuone-client (1.4.6-0ubuntu2) maverick-proposed; urgency=low

  * 01-get-published-race.path:
    - Fix a race condition with requesting published files (LP: #661292)

ubuntuone-client (1.4.6-0ubuntu1) maverick-proposed; urgency=low

  * New upstream release.
    - SD deletes files when local error on partial creation (LP: #657195)
    - Partials fail to be created with "filename too long" (LP: #662660)
    - New shares to me are not downloaded (LP: #664019)
    - Deleting UDF on one computer does not delete elsewhere (LP: #674092)
    - Preferences does not display info properly (LP: #657850)
    - "Out of Space" dialog is broken (LP: #650671)
    - Nautilus allows publishing files in others' shares (LP: #712674)
    - SSO help text does not appear translated (LP: #686647)
    - Nautilus is not aware of published files (LP: #661292)
    - Ubuntu One crashes in scan() (LP: #692496)
    - Volume info with None for free space causes QuotaExceeded (LP: #671023)
    - Settings daemon extension should not request credentials (LP: #702171)
 -- Rodney Dawes <email address hidden> Fri, 04 Mar 2011 12:10:05 -0500

Changed in ubuntuone-client (Ubuntu Maverick):
status: Fix Committed → Fix Released
tags: added: testcase
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

Bug attachments