"Too many open files" error nn macOS (plus fix)

Bug #1689632 reported by Howard Kaye
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Invalid
Undecided
Unassigned

Bug Description

duplicity 0.7.10
Python 2.7.10
macOS 10.12.4
target filesystem: hfs+

On macOS, the tempfile.TemporaryFile call erroneously raises an IOError exception saying that too many files are open. This causes restores to fail randomly, after thousands of files have been restored.

The following patch seems to work around the problem:

*** /Users/howie/duplicity-0.7.10/duplicity/patchdir.py 2015-09-10 09:03:43.000000000 -0400
--- patchdir.py 2017-05-09 14:27:38.000000000 -0400
***************
*** 496,502 ****
              See https://bugs.launchpad.net/duplicity/+bug/670891 for discussion
              of os.tmpfile() vs tempfile.TemporaryFile() w.r.t. Windows / Linux.
              """
! if sys.platform.startswith(('cygwin', 'windows')):
                  tempfp = os.tmpfile()
              else:
                  tempfp = tempfile.TemporaryFile(dir=tempdir.default().dir())
--- 496,502 ----
              See https://bugs.launchpad.net/duplicity/+bug/670891 for discussion
              of os.tmpfile() vs tempfile.TemporaryFile() w.r.t. Windows / Linux.
              """
! if sys.platform.startswith(('cygwin', 'windows', 'darwin')):
                  tempfp = os.tmpfile()
              else:
                  tempfp = tempfile.TemporaryFile(dir=tempdir.default().dir())

Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.7.13
status: New → Fix Committed
Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

Patch has been removed from the source repo.

Changed in duplicity:
status: Fix Committed → Invalid
importance: Medium → Undecided
milestone: 0.7.13 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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