duplicity crashes with tmp files when gpg2 installed instead of gpg

Bug #710198 reported by pierre
64
This bug affects 23 people
Affects Status Importance Assigned to Milestone
Duplicity
Confirmed
Medium
Unassigned

Bug Description

Hello,
I use duplicity on my computer, and wished to use it on a Qnap NAS. duplicity was packaged for ipkg system for this hardware, and that is a good idea !
So, I import my GPG test keys and scripts, but duplicity crash with tmp directorys. I checked free space, permissions, and there is no problem. I run the script as admin on the NAS.

Below is the -v9 trace:

admin@JD pierretest # ./RemoteBackup.sh
2011-01-30_16:04:08: Backup for local filesystem started
2011-01-30_16:04:08: ... removing old backups
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
No old backup sets found, nothing deleted.
2011-01-30_16:04:09: ... backing up filesystem
Using archive dir: /root/.cache/duplicity/450b79617daa87d1ac397876cf9eb4c8
Using backup name: 450b79617daa87d1ac397876cf9eb4c8
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.sshbackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.giobackend Failed: No module named gio
Import of duplicity.backends.ftpbackend Succeeded
Import of duplicity.backends.cloudfilesbackend Succeeded
Import of duplicity.backends.botobackend Succeeded
Main action: full
================================================================================
duplicity 0.6.11 (November 20, 2010)
Args: /opt/bin/duplicity full -v9 --encrypt-key=7B4DD872 --sign-key=7B4DD872 --volsize=20 --tempdir=/share/MD0_DATA/pierretest/temp /share/MD0_DATA/pierretest/animaux_fond_ecran file:///share/MD0_DATA/pierre3home/test
Linux JD 2.6.33.2 #1 Wed Jan 5 02:06:35 CST 2011 armv5tel
/opt/bin/python2.6 2.6.6 (r266:84292, Nov 29 2010, 23:41:28)
[GCC 4.2.3]
================================================================================
Using temporary directory /share/MD0_DATA/pierretest/temp/duplicity-GMSDaL-tempdir
Registering (mkstemp) temporary file /share/MD0_DATA/pierretest/temp/duplicity-GMSDaL-tempdir/mkstemp-sg5M2u-1
Temp has 945400791040 available, backup will use approx 27262976.
Local and Remote metadata are synchronized, no sync needed.
0 files exist on backend
0 files exist in cache
Extracting backup chains from list of files: []
Last full backup date: none
Collection Status
-----------------
Connecting with backend: LocalBackend
Archive dir: /root/.cache/duplicity/450b79617daa87d1ac397876cf9eb4c8

Found 0 secondary backup chains.
No backup chains with active signatures found
No orphaned or incomplete backup sets found.
Using temporary directory /root/.cache/duplicity/450b79617daa87d1ac397876cf9eb4c8/duplicity-A1kupI-tempdir
Registering (mktemp) temporary file /root/.cache/duplicity/450b79617daa87d1ac397876cf9eb4c8/duplicity-A1kupI-tempdir/mktemp-UVriHK-1
Using temporary directory /root/.cache/duplicity/450b79617daa87d1ac397876cf9eb4c8/duplicity-N8zqdB-tempdir
Registering (mktemp) temporary file /root/.cache/duplicity/450b79617daa87d1ac397876cf9eb4c8/duplicity-N8zqdB-tempdir/mktemp-vd5hSf-1
AsyncScheduler: instantiating at concurrency 0
Registering (mktemp) temporary file /share/MD0_DATA/pierretest/temp/duplicity-GMSDaL-tempdir/mktemp-nvwoDJ-2
Selecting /share/MD0_DATA/pierretest/animaux_fond_ecran
Comparing () and None
Getting delta of (() /share/MD0_DATA/pierretest/animaux_fond_ecran dir) and None
A .
Removing still remembered temporary file /share/MD0_DATA/pierretest/temp/duplicity-GMSDaL-tempdir/mkstemp-sg5M2u-1
Cleanup of temporary file /share/MD0_DATA/pierretest/temp/duplicity-GMSDaL-tempdir/mkstemp-sg5M2u-1 failed
Removing still remembered temporary file /share/MD0_DATA/pierretest/temp/duplicity-GMSDaL-tempdir/mktemp-nvwoDJ-2
Cleanup of temporary file /share/MD0_DATA/pierretest/temp/duplicity-GMSDaL-tempdir/mktemp-nvwoDJ-2 failed
Cleanup of temporary directory /share/MD0_DATA/pierretest/temp/duplicity-GMSDaL-tempdir failed - this is probably a bug.
Traceback (most recent call last):
  File "/opt/bin/duplicity", line 1245, in <module>
    with_tempdir(main)
  File "/opt/bin/duplicity", line 1238, in with_tempdir
    fn()
  File "/opt/bin/duplicity", line 1211, in main
    full_backup(col_stats)
  File "/opt/bin/duplicity", line 417, in full_backup
    globals.backend)
  File "/opt/bin/duplicity", line 295, in write_multivol
    globals.gpg_profile, globals.volsize)
  File "/opt/lib/python2.6/site-packages/duplicity/gpg.py", line 275, in GPGWriteFile
    bytes_to_go = data_size - get_current_size()
  File "/opt/lib/python2.6/site-packages/duplicity/gpg.py", line 267, in get_current_size
    return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: '/share/MD0_DATA/pierretest/temp/duplicity-GMSDaL-tempdir/mktemp-nvwoDJ-2'

Removing still remembered temporary file /root/.cache/duplicity/450b79617daa87d1ac397876cf9eb4c8/duplicity-A1kupI-tempdir/mktemp-UVriHK-1
Removing still remembered temporary file /root/.cache/duplicity/450b79617daa87d1ac397876cf9eb4c8/duplicity-N8zqdB-tempdir/mktemp-vd5hSf-1
close failed in file object destructor:
IOError: [Errno 32] Broken pipe
2011-01-30_16:04:10: Backup for local filesystem complete
2011-01-30_16:04:10: ------------------------------------

I export my GPG passphrase... I am just testing locally (later, I would like to do it on a ftp).
I looked at previous bugs, I looked at -v9 trace on my computer, and I can't understand the problem.
It is duplicity 0.6.11 (0.6.10 on my computer), Python 2.6.6 (same on my computer).
Really, I don't understand.
Where should I look?

only difference is :
Import of duplicity.backends.giobackend Failed: No module named gio
but I don't know what I should install to solve this.

Many thanks if someone could give me a clue to investigate...

Revision history for this message
pierre (mkzuot) wrote :

It seems to be a duplicate of Bug #532244
...

Revision history for this message
pierre (mkzuot) wrote :

... OK, found the solution.
It is not a temp directory problem.
It is just a gpg problem.
On this NAS server, I installed with ipkg duplicity, gpg2, import my keys, trust to ultimate, and so on...
Guess what : gpg2. (not the gpg command)

just make a link between gpg2 and gpg !!!

In my case :

# cd /opt/bin
# ln -s /opt/bin/gpg2 gpg

problem solved, but not obvious. the -v9 trace leads to tempdir failure !

Revision history for this message
Olivier Berger (oberger) wrote :

Would it be possible to edit the bug's subject/title to make it more accurate ?

pierre (mkzuot)
summary: - duplicity crashes with tmp files on an arm processor (NAS remote backup
- application)
+ duplicity crashes with tmp files when gpg2 installed instead of gpg
Revision history for this message
pierre (mkzuot) wrote :

I've just update the bug title. Previous title was "duplicity crashes with tmp files on an arm processor (NAS remote backup application)"
In fact duplicity seems to crash with tmp files...
One way to avoid it might be to check if gpg is present (or gpg2)

I now use duplicity without problems on this NAS, and I wrote a tutorial to speed up the installation for duplicity fans !

http://wiki.qnap.com/wiki/How_To_Install_Duplicity_On_QNAP_NAS

works like a charm !

Revision history for this message
Michael Terry (mterry) wrote :

This seems like just a packaging error or maybe undocumented dependency on gnupg (vs gnupg2). Installing gnupg should solve this (or manually symlinking as you did).

I'm guessing the best solution would be to give a better error message.

Cysioland (cysioland)
Changed in duplicity:
status: New → Confirmed
Revision history for this message
Matt Giuca (mgiuca) wrote :

Bug #922101 was marked a duplicate of this. It is the same symptom (crash accessing /tmp files) but nothing to do with GPG, so either it isn't a duplicate, or this issue isn't relevant to gpg. See https://bugs.launchpad.net/duplicity/+bug/922101/comments/3.

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote : Update bug:, status confirmed, importance medium

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

 status confirmed
 importance medium
 done
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEExwf+p6/3mDvUSsaGH1G0ZBEHM/EFAmBmHPgACgkQH1G0ZBEH
M/H/lAgAkwgk8oVNLD0GQwoSd8b721uYkcaNCQQ8ledyLiggYHBc2oT/fojN6vvo
5q9GderQE9hJbBU+bUmD0QYiIH5Ov/bcFvhxJdB0uhhZlpWK4suoLJ1WaKFbyXCY
mDwsDP0qDF+JwVYcVBhBsebTXIxszdaaBfenDMnNeWhDIx/Utk1TLeA6VhO8Yahx
g1G7eyJxojVVhV8fkQA8zeLZ+bV2L+1714dh3MIG9WcdR7Zusln3YgJIkd7RkPGX
oOuYGdBMLNKybafVNTPUyufSmX7pHUQ0XW2C6VhRuBg042fpr8CA4/yQvonAcVNl
fJ+/2caI4W5wyejneZ7F9gIaetOq4Q==
=L3da
-----END PGP SIGNATURE-----

Changed in duplicity:
importance: Undecided → Medium
Revision history for this message
sirhc (sirhc808) wrote : Re: [Bug 710198] Update bug:, status confirmed, importance medium
Download full text (7.3 KiB)

unsubscribe

> On Apr 1, 2021, at 3:20 PM, Kenneth Loafman <email address hidden> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> status confirmed
> importance medium
> done
> -----BEGIN PGP SIGNATURE-----
>
> iQEzBAEBCAAdFiEExwf+p6/3mDvUSsaGH1G0ZBEHM/EFAmBmHPgACgkQH1G0ZBEH
> M/H/lAgAkwgk8oVNLD0GQwoSd8b721uYkcaNCQQ8ledyLiggYHBc2oT/fojN6vvo
> 5q9GderQE9hJbBU+bUmD0QYiIH5Ov/bcFvhxJdB0uhhZlpWK4suoLJ1WaKFbyXCY
> mDwsDP0qDF+JwVYcVBhBsebTXIxszdaaBfenDMnNeWhDIx/Utk1TLeA6VhO8Yahx
> g1G7eyJxojVVhV8fkQA8zeLZ+bV2L+1714dh3MIG9WcdR7Zusln3YgJIkd7RkPGX
> oOuYGdBMLNKybafVNTPUyufSmX7pHUQ0XW2C6VhRuBg042fpr8CA4/yQvonAcVNl
> fJ+/2caI4W5wyejneZ7F9gIaetOq4Q==
> =L3da
> -----END PGP SIGNATURE-----
>
>
> ** Changed in: duplicity
> Importance: Undecided => Medium
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (922101).
> https://bugs.launchpad.net/bugs/710198
>
> Title:
> duplicity crashes with tmp files when gpg2 installed instead of gpg
>
> Status in Duplicity:
> Confirmed
>
> Bug description:
> Hello,
> I use duplicity on my computer, and wished to use it on a Qnap NAS. duplicity was packaged for ipkg system for this hardware, and that is a good idea !
> So, I import my GPG test keys and scripts, but duplicity crash with tmp directorys. I checked free space, permissions, and there is no problem. I run the script as admin on the NAS.
>
> Below is the -v9 trace:
>
> admin@JD pierretest # ./RemoteBackup.sh
> 2011-01-30_16:04:08: Backup for local filesystem started
> 2011-01-30_16:04:08: ... removing old backups
> Local and Remote metadata are synchronized, no sync needed.
> Last full backup date: none
> No old backup sets found, nothing deleted.
> 2011-01-30_16:04:09: ... backing up filesystem
> Using archive dir: /root/.cache/duplicity/450b79617daa87d1ac397876cf9eb4c8
> Using backup name: 450b79617daa87d1ac397876cf9eb4c8
> Import of duplicity.backends.hsibackend Succeeded
> Import of duplicity.backends.sshbackend Succeeded
> Import of duplicity.backends.webdavbackend Succeeded
> Import of duplicity.backends.localbackend Succeeded
> Import of duplicity.backends.imapbackend Succeeded
> Import of duplicity.backends.rsyncbackend Succeeded
> Import of duplicity.backends.tahoebackend Succeeded
> Import of duplicity.backends.giobackend Failed: No module named gio
> Import of duplicity.backends.ftpbackend Succeeded
> Import of duplicity.backends.cloudfilesbackend Succeeded
> Import of duplicity.backends.botobackend Succeeded
> Main action: full
> ================================================================================
> duplicity 0.6.11 (November 20, 2010)
> Args: /opt/bin/duplicity full -v9 --encrypt-key=7B4DD872 --sign-key=7B4DD872 --volsize=20 --tempdir=/share/MD0_DATA/pierretest/temp /share/MD0_DATA/pierretest/animaux_fond_ecran file:///share/MD0_DATA/pierre3home/test
> Linux JD 2.6.33.2 #1 Wed Jan 5 02:06:35 CST 2011 armv5tel
> /opt/bin/python2.6 2.6.6 (r266:84292, ...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.