Looking at the way that httplib2 catches exceptions, if there's for example a socket.timeout the conn object is not closed (https://code.google.com/p/httplib2/source/browse/python2/httplib2/__init__.py#1257) I suspect that might leave the conn object in a semi-broken state.
Since duplicity instantiates an httplib2 Http object and keeps it around (http://bazaar.launchpad.net/~duplicity- team/duplicity/0.6-series/view/head:/duplicity/backends/u1backend.py#L51), not creating a new one in the case of exceptions (http://bazaar.launchpad.net/~duplicity- team/duplicity/0.6-series/view/head:/duplicity/backends/u1backend.py#L80) I suspect that means a broken connection will be used on timeouts. A simple fix might be to throw away the Http object and create a new one. I'm going to give that a try (since I can reproduce the issue) and report back. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to deja-dup in Ubuntu. https://bugs.launchpad.net/bugs/1161599 Title: Backup to Ubuntu one failed, after 5 attempts status 400 bad request Status in “deja-dup” package in Ubuntu: Invalid Status in “duplicity” package in Ubuntu: Confirmed Bug description: On Raring using deja-dup to backup to Ubuntu one, when I add a particular git repository to the folders to backup and then start the backup, the process sits for some minutes at the start of the upload operation and then fails with a popup "Backup Failed. Giving up on request after 5 attempts last status 400 bad request". The progress bar does not get started as far as I can see. While it is saying that it is uploading I can see in System Monitor that data is being continuously sent, but after the failure there are no new files on U1. By a process of elimination I determined that it is the objects directory (which itself contains a large number of subdirectories each containing a number of small files) that is causing the problem. I attempted to determine whether it was a particular file or folder that was causing the problem but it seems not to be consistent. I thought that I had found a particular subfolder causing the problem, I cleared .cache/deja_dup, and then it accepted that folder. However when I then put back the rest of the subfolders it failed again. I copied the complete git repository to another machine (running up to date Ubuntu 12.04) and backing up from there (to a different U1 account) deja_dup has no problems. I also notice that on Raring it always takes a long time in the verification phase even when only a trivial change has been made. It is as if it is downloading the whole repository, but whether that is a related problem I do not know. ProblemType: Bug DistroRelease: Ubuntu 13.04 Package: deja-dup 25.5-0ubuntu1 ProcVersionSignature: Ubuntu 3.8.0-15.25-generic 3.8.4 Uname: Linux 3.8.0-15-generic i686 ApportVersion: 2.9.2-0ubuntu5 Architecture: i386 Date: Thu Mar 28 20:28:06 2013 InstallationDate: Installed on 2012-08-01 (239 days ago) InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha i386 (20120730.1) MarkForUpload: True SourcePackage: deja-dup UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/deja-dup/+bug/1161599/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp