Race condition between status and backup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned | ||
duplicity (Debian) |
Fix Released
|
Unknown
|
|||
duplicity (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Precise |
Fix Released
|
Medium
|
Unassigned | ||
Quantal |
Won't Fix
|
Medium
|
Unassigned | ||
Raring |
Won't Fix
|
Medium
|
Unassigned | ||
Saucy |
Fix Released
|
Medium
|
Unassigned | ||
Trusty |
Fix Released
|
Medium
|
Unassigned |
Bug Description
N.B. This should not be released until after deja-dup bug 1281066.
SRU justification : Race condition exist when two instances of duplicity run in the same
cache directory (.cache/duplicity)
Impact : Potential corruption of the local cache
Fix : Add a lockfile in the local cache & prevent execution of a second instance in the
case of the presence of the lockfile
Test Case :
1) Run one instance of duplicity :
$ sudo mkdir /tmp/backup
$ sudo duplicity --exclude=/proc --exclude=/sys --exclude=/tmp / file:///tmp/backup
While this command is running execute the following in a separate console :
$ sudo duplicity collection-status file:///tmp/backup
With the new locking mechanism you will see the following :
$ sudo duplicity collection-status file:///tmp/backup
Another instance is already running with this archive directory
If you are sure that this is the only instance running you may delete
the following lockfile and run the command again :
/home/
Regression : In the case of spurrious interruption of duplicity, the lockfile
will remain in .cache/duplicity which can prevent future use of duplicity. The cache
directory will have to be cleaned as outlined in the error message
Original description of the problem :
When runnining "duply X status" while running "duply X backup" (sorry, I don't know which duplicity commands are created by duply) due to a race-condition the code of 'sync_archive' might happend to append newly created meta-data files to 'local_spurious' and subsequently delete them. This delete seems to have been the reason that triggered bug 1216921.
The race condition is that the backup command constantly creates meta-data files while the status command queries the list of local and remote files independently over a larger time span. This means that a local file might already been remote but the status command did not see it a few seconds ago.
Changed in duplicity (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
Changed in duplicity (Ubuntu Precise): | |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
status: | New → In Progress |
Changed in duplicity: | |
assignee: | Louis Bouchard (louis-bouchard) → nobody |
importance: | Undecided → Medium |
milestone: | none → 0.6.23 |
status: | In Progress → Fix Committed |
Changed in duplicity (Ubuntu Quantal): | |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
Changed in duplicity (Ubuntu Raring): | |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
Changed in duplicity (Ubuntu Saucy): | |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
Changed in duplicity (Ubuntu Quantal): | |
status: | New → Triaged |
Changed in duplicity (Ubuntu Raring): | |
status: | New → Triaged |
Changed in duplicity (Ubuntu Saucy): | |
status: | New → Triaged |
Changed in duplicity (Ubuntu Precise): | |
importance: | Undecided → Medium |
Changed in duplicity (Ubuntu Quantal): | |
importance: | Undecided → Medium |
Changed in duplicity (Ubuntu Raring): | |
importance: | Undecided → Medium |
Changed in duplicity (Ubuntu Saucy): | |
importance: | Undecided → Medium |
Changed in duplicity (Ubuntu Trusty): | |
importance: | Undecided → Medium |
description: | updated |
Changed in duplicity (Ubuntu Quantal): | |
status: | Triaged → In Progress |
Changed in duplicity (Ubuntu Raring): | |
status: | Triaged → In Progress |
Changed in duplicity (Ubuntu Saucy): | |
status: | Triaged → In Progress |
description: | updated |
description: | updated |
Changed in duplicity: | |
status: | In Progress → Fix Committed |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
tags: |
added: verification-done-saucy removed: verification-done |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
Changed in duplicity (Ubuntu Precise): | |
assignee: | Louis Bouchard (louis-bouchard) → nobody |
Changed in duplicity (Ubuntu Saucy): | |
assignee: | Louis Bouchard (louis-bouchard) → nobody |
Changed in duplicity (Debian): | |
status: | Unknown → New |
Changed in duplicity (Debian): | |
status: | New → Fix Released |
"duply foo status" corresponds to "duplicity collection-status ..."