summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Annex/Transfer.hs4
-rw-r--r--debian/changelog3
-rw-r--r--doc/bugs/too_many_open_files_on_OSX.mdwn4
3 files changed, 10 insertions, 1 deletions
diff --git a/Annex/Transfer.hs b/Annex/Transfer.hs
index 448b5b3d7..d33d3073b 100644
--- a/Annex/Transfer.hs
+++ b/Annex/Transfer.hs
@@ -85,7 +85,9 @@ runTransfer' ignorelock t file shouldretry a = do
locked <- catchMaybeIO $
setLock fd (WriteLock, AbsoluteSeek, 0, 0)
if isNothing locked
- then return (Nothing, True)
+ then do
+ closeFd fd
+ return (Nothing, True)
else do
void $ tryIO $ writeTransferInfoFile info tfile
return (mfd, False)
diff --git a/debian/changelog b/debian/changelog
index 0e267eb0a..22eaf0bae 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,9 @@ git-annex (5.20140832) UNRELEASED; urgency=medium
if a key is present on a rsync remote, and when dropping a key from
the remote.
* Promote file not found warning message to an error.
+ * Fix transfer lock file FD leak that could occur when two separate
+ git-annex processes were both working to perform the same set of
+ transfers.
-- Joey Hess <joeyh@debian.org> Thu, 04 Sep 2014 16:17:22 -0400
diff --git a/doc/bugs/too_many_open_files_on_OSX.mdwn b/doc/bugs/too_many_open_files_on_OSX.mdwn
index d30870a3b..2ca89fcf0 100644
--- a/doc/bugs/too_many_open_files_on_OSX.mdwn
+++ b/doc/bugs/too_many_open_files_on_OSX.mdwn
@@ -36,3 +36,7 @@ lsof -p <my annex process>
.../.git/annex/ssh/myserver.lock
.../.git/annex/transfer/upload/b4d67c4f-8cca-423c-9363-f3063b7fe3e4/lck.SHA256E-s10448418--4f61fab4... ~200 different files.
"""]]
+
+> Thanks for a very clear bug report! Was easy from that to find
+> where the lock file was not being closed in this situation.
+> [[fixed|done]] --[[Joey]]