Comment 3 for bug 922101

Revision history for this message
Matt Giuca (mgiuca) wrote :

I'm having this too on duplicity 0.7.06. I don't think this is a duplicate of #710198 (or if it is, that bug is mis-diagnosed). This doesn't seem to have anything to do with gpg (as shown by Comment #2 having no gpg in the stack trace).

My latest incident of this:

Cleanup of temporary directory /tmp/duplicity-c7h3vY-tempdir failed - this is probably a bug.
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1532, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1526, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1380, in main
    do_backup(action)
  File "/usr/bin/duplicity", line 1508, in do_backup
    incremental_backup(sig_chain)
  File "/usr/bin/duplicity", line 662, in incremental_backup
    globals.backend)
  File "/usr/bin/duplicity", line 435, in write_multivol
    vi.set_hash("SHA1", gpg.get_hash("SHA1", tdp))
  File "/usr/lib/python2.7/dist-packages/duplicity/gpg.py", line 434, in get_hash
    fp = path.open("rb")
  File "/usr/lib/python2.7/dist-packages/duplicity/path.py", line 560, in open
    result = open(self.name, mode)
IOError: [Errno 2] No such file or directory: '/tmp/duplicity-c7h3vY-tempdir/mktemp-1BuqO1-6'

OK mine does have gpg.py in the stacktrace, but it's nothing to do with the gpg binary; it's crashing opening a temp file because the directory has been removed.

It looks like the top-level temporary directory (in my case, /tmp/duplicity-c7h3vY-tempdir) is being removed prematurely. I can't tell whether this is a bug in Duplicity or something weird in my system is removing temp directories spontaneously.

I've seen discussion about /tmp being deleted spontaneously by cronjobs, etc:
https://bbs.archlinux.org/viewtopic.php?id=170122
I haven't set up anything like that (in fact this is a brand new clean install of Ubuntu 16.04), but maybe something external to Duplicity is deleting these files.