diff options
author | Joey Hess <joey@kitenet.net> | 2013-01-05 13:42:31 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-01-05 13:42:31 -0400 |
commit | 1cf23b8adc1d9b680083b8f04f2ec9a199550462 (patch) | |
tree | e5b809a3b106d77725660b78a4a244197781ab2c | |
parent | b73a3fa6461ae98302a1c98d90588dd748304961 (diff) |
committer: Fix a file handle leak.
-rw-r--r-- | Command/Add.hs | 3 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/bugs/assistant___40__OS_X_Lion__41___-___34__too_many_open_files__34___error.mdwn | 6 |
3 files changed, 9 insertions, 1 deletions
diff --git a/Command/Add.hs b/Command/Add.hs index 25548a973..7b2d5fd30 100644 --- a/Command/Add.hs +++ b/Command/Add.hs @@ -60,7 +60,8 @@ lockDown file = do tmp <- fromRepo gitAnnexTmpDir createAnnexDirectory tmp liftIO $ do - (tmpfile, _handle) <- openTempFile tmp (takeFileName file) + (tmpfile, handle) <- openTempFile tmp (takeFileName file) + hClose handle nukeFile tmpfile createLink file tmpfile return $ KeySource { keyFilename = file , contentLocation = tmpfile } diff --git a/debian/changelog b/debian/changelog index 8979d29df..f98d335b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ git-annex (3.20130103) UNRELEASED; urgency=low * webapp: Add UI to stop and restart assistant. + * committer: Fix a file handle leak. -- Joey Hess <joeyh@debian.org> Thu, 03 Jan 2013 14:58:45 -0400 diff --git a/doc/bugs/assistant___40__OS_X_Lion__41___-___34__too_many_open_files__34___error.mdwn b/doc/bugs/assistant___40__OS_X_Lion__41___-___34__too_many_open_files__34___error.mdwn index ad8d18fcf..1b3879e63 100644 --- a/doc/bugs/assistant___40__OS_X_Lion__41___-___34__too_many_open_files__34___error.mdwn +++ b/doc/bugs/assistant___40__OS_X_Lion__41___-___34__too_many_open_files__34___error.mdwn @@ -24,3 +24,9 @@ What version of git-annex are you using? On what operating system? Please provide any additional information below. I imagine I could avoid this error by using the "ulimit -n" command to increase number of files in a shell session and then running assistant manually, so this is really only a bug report about the bundled application. + +> This seems to be caused by Command.Add.lockdown not closing the +> temporary file handle, so when called in a mapM by the committer +> thread when there are a lot of files, it could build up a lot of +> open handles before later GC closes them. Added a manual close, +> so I think this is [[done]]. --[[Joey]] |