So I have several (over 5) processes in the previously mentioned state:
Duplicity with a dozen or so gpg processes under it, hanging, duplicity
is being run as `usr/bin/duplicity restore`.

I have attached generated a core dump, downloaded symbols and analysed
the core dump with GDB. This is the stack trace:

#0  0x00007f6a2a3130c4 in __GI___libc_write (fd=1, 
buf=buf@entry=0x55af21404900, nbytes=nbytes@entry=4096) at 
../sysdeps/unix/sysv/linux/write.c:26
#1  0x00007f6a2a291ba7 in _IO_new_file_write (f=0x7f6a2a5ea720 
<_IO_2_1_stdout_>, data=0x55af21404900, n=4096) at fileops.c:1255
#2  0x00007f6a2a293782 in new_do_write (to_do=4096, 
    data=0x55af21404900 "**REDACTED**", fp=0x7f6a2a5ea720 <_IO_2_1_stdout_>) at 
fileops.c:510
#3  _IO_new_do_write (fp=0x7f6a2a5ea720 <_IO_2_1_stdout_>, 
    data=0x55af21404900 "**REDACTED**", to_do=4096) at fileops.c:486
#4  0x00007f6a2a2923bd in _IO_new_file_xsputn (f=0x7f6a2a5ea720 
<_IO_2_1_stdout_>, data=<optimized out>, n=8192) at fileops.c:1323
#5  0x00007f6a2a28651b in __GI__IO_fwrite (buf=buf@entry=0x55af213d57b0, 
size=size@entry=1, count=count@entry=8192, fp=0x7f6a2a5ea720 <_IO_2_1_stdout_>) 
at iofwrite.c:39
#6  0x00007f6a2a5f31ec in func_fp_write (cookie=0x55af213d5730, 
buffer=0x55af213d57b0, size=8192) at ../../src/estream.c:1523
#7  0x00007f6a2a5f2b18 in flush_stream (stream=stream@entry=0x55af213d5750) at 
../../src/estream.c:1965
#8  0x00007f6a2a5f3108 in es_write_fbf (stream=stream@entry=0x55af213d5750, 
    buffer=buffer@entry=0x55af213fc8f0 "**REDACTED**", 
bytes_to_write=bytes_to_write@entry=32768, 
bytes_written=bytes_written@entry=0x7fffb74c6d30) at ../../src/estream.c:2711
#9  0x00007f6a2a5f4313 in es_writen (stream=stream@entry=0x55af213d5750, 
buffer=buffer@entry=0x55af213fc8f0, bytes_to_write=32768, 
bytes_written=bytes_written@entry=0x7fffb74c6da0)
    at ../../src/estream.c:2813
#10 0x00007f6a2a5f5fac in _gpgrt_fwrite (ptr=ptr@entry=0x55af213fc8f0, 
size=size@entry=1, nitems=nitems@entry=32768, stream=0x55af213d5750) at 
../../src/estream.c:4221
#11 0x00007f6a2a5fae35 in gpgrt_fwrite (ptr=ptr@entry=0x55af213fc8f0, 
size=size@entry=1, nitems=nitems@entry=32768, stream=<optimized out>) at 
../../src/visibility.c:466
#12 0x000055af1f4b53a2 in handle_plaintext (pt=pt@entry=0x55af213dbbb0, 
mfx=mfx@entry=0x55af213efcd0, nooutput=<optimized out>, 
clearsig=clearsig@entry=0) at ../../g10/plaintext.c:426
#13 0x000055af1f4a0ddc in proc_plaintext (c=c@entry=0x55af213efcb0, 
pkt=pkt@entry=0x55af213efd60) at ../../g10/mainproc.c:760
#14 0x000055af1f4a3d7b in do_proc_packets (ctrl=0x55af213dbb30, 
c=0x55af213efcb0, a=0x55af213e72a0) at ../../g10/mainproc.c:1412
#15 0x000055af1f4a3f0a in proc_packets (ctrl=ctrl@entry=0x55af213dbb30, 
anchor=anchor@entry=0x55af213edaf0, a=0x55af213e72a0) at 
../../g10/mainproc.c:1181
#16 0x000055af1f492aaf in handle_compressed (ctrl=0x55af213dbb30, 
procctx=procctx@entry=0x55af213edaf0, cd=0x55af213edba0, 
callback=callback@entry=0x0, passthru=passthru@entry=0x0)
    at ../../g10/compress.c:324
#17 0x000055af1f4a1070 in proc_compressed (c=c@entry=0x55af213edaf0, 
pkt=pkt@entry=0x55af213dcd90) at ../../g10/mainproc.c:819
#18 0x000055af1f4a3c9b in do_proc_packets (ctrl=0x55af213dbb30, 
c=0x55af213edaf0, a=0x55af213e72a0) at ../../g10/mainproc.c:1413
#19 0x000055af1f4a3f0a in proc_packets (ctrl=ctrl@entry=0x55af213dbb30, 
anchor=anchor@entry=0x55af213e9340, a=0x55af213e72a0) at 
../../g10/mainproc.c:1181
#20 0x000055af1f4c355d in decrypt_data (ctrl=0x55af213dbb30, 
procctx=procctx@entry=0x55af213e9340, ed=0x55af213dcdd0, dek=0x7f6a2b8bb118) at 
../../g10/decrypt-data.c:253
#21 0x000055af1f4a07f8 in proc_encrypted (c=c@entry=0x55af213e9340, 
pkt=pkt@entry=0x55af213dce10) at ../../g10/mainproc.c:603
#22 0x000055af1f4a3d0b in do_proc_packets (ctrl=0x55af213dbb30, 
c=0x55af213e9340, a=0x55af213e72a0) at ../../g10/mainproc.c:1411
#23 0x000055af1f4a4181 in proc_encryption_packets 
(ctrl=ctrl@entry=0x55af213dbb30, anchor=anchor@entry=0x0, 
a=a@entry=0x55af213e72a0) at ../../g10/mainproc.c:1280
#24 0x000055af1f4c21bb in decrypt_message (ctrl=0x55af213dbb30, 
filename=<optimized out>) at ../../g10/decrypt.c:88
#25 0x000055af1f4810d0 in main (argc=<optimized out>, argv=<optimized out>) at 
../../g10/gpg.c:4045


I have redacted the write buffer contents but it is clear, IMHO, that it has 
deciphered some file and is trying to write it into the communication pipe 
Duplicity has established. I can't find it in the code **is it possible that 
Duplicity is not consuming the GPG output thus GPG never exits this threads 
waiting to `pthread_join()` after `wait()` are stuck thus no more threads can 
be started at some point?**

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to duplicity in Ubuntu.
https://bugs.launchpad.net/bugs/1727653

Title:
  error: can't start new thread

Status in Duplicity:
  In Progress
Status in deja-dup package in Ubuntu:
  Confirmed
Status in duplicity package in Ubuntu:
  In Progress

Bug description:
  $ uname -a
  Linux mbpr13b 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 
x86_64 x86_64 x86_64 GNU/Linux

  duplicity gets started daily via deja-dup automatically.

  Every now and then (approx. every third time) I get the following
  error:

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

  Failed with an unknown error.

  Traceback (most recent call last):
    File "/usr/bin/duplicity", line 1546, in <module>
      with_tempdir(main)
    File "/usr/bin/duplicity", line 1540, in with_tempdir
      fn()
    File "/usr/bin/duplicity", line 1391, in main
      do_backup(action)
    File "/usr/bin/duplicity", line 1468, in do_backup
      restore(col_stats)
    File "/usr/bin/duplicity", line 731, in restore
      restore_get_patched_rop_iter(col_stats)):
    File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 560, in 
Write_ROPaths
      for ropath in rop_iter:
    File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 523, in 
integrate_patch_iters
      for patch_seq in collated:
    File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 389, in 
yield_tuples
      setrorps(overflow, elems)
    File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 378, in 
setrorps
      elems[i] = iter_list[i].next()
    File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 107, in 
filter_path_iter
      for path in path_iter:
    File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 121, in 
difftar2path_iter
      tarinfo_list = [tar_iter.next()]
    File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 339, in 
next
      self.set_tarfile()
    File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 333, in 
set_tarfile
      self.current_fp = self.fileobj_iter.next()
    File "/usr/bin/duplicity", line 768, in get_fileobj_iter
      manifest.volume_info_dict[vol_num])
    File "/usr/bin/duplicity", line 811, in restore_get_enc_fileobj
      fileobj = tdp.filtered_open_with_delete("rb")
    File "/usr/lib/python2.7/dist-packages/duplicity/dup_temp.py", line 119, in 
filtered_open_with_delete
      fh = FileobjHooked(path.DupPath.filtered_open(self, mode))
    File "/usr/lib/python2.7/dist-packages/duplicity/path.py", line 778, in 
filtered_open
      return gpg.GPGFile(False, self, gpg_profile)
    File "/usr/lib/python2.7/dist-packages/duplicity/gpg.py", line 202, in 
__init__
      'logger': self.logger_fp})
    File "/usr/lib/python2.7/dist-packages/duplicity/gpginterface.py", line 
374, in run
      create_fhs, attach_fhs)
    File "/usr/lib/python2.7/dist-packages/duplicity/gpginterface.py", line 
420, in _attach_fork_exec
      process.thread.start()
    File "/usr/lib/python2.7/threading.py", line 736, in start
      _start_new_thread(self.__bootstrap, ())
  error: can't start new thread

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

  Restarting deja-dup manually fixes the problem and the next few days,
  automatic backup will run correctly until (see above).

  ProblemType: Bug
  DistroRelease: Ubuntu 17.10
  Package: duplicity 0.7.12-1ubuntu1
  ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4
  Uname: Linux 4.13.0-16-generic x86_64
  ApportVersion: 2.20.7-0ubuntu3
  Architecture: amd64
  CurrentDesktop: ubuntu:GNOME
  Date: Thu Oct 26 10:49:45 2017
  InstallationDate: Installed on 2017-10-20 (5 days ago)
  InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20171018)
  SourcePackage: duplicity
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/duplicity/+bug/1727653/+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

Reply via email to