Commit graph

1829 commits

Author SHA1 Message Date
Joey Hess
dda812583f root caused 2011-04-21 12:13:17 -04:00
Joey Hess
82347fc5ab seems -rtsopts is needed now for profiling 2011-04-21 11:23:44 -04:00
Joey Hess
2467c56771 update on S3 memory leaks
The remaining leaks are in hS3. The leak with encryption was worked around
by the use of the temp file. (And was probably originally caused by
gpgCipherHandle sparking a thread which kept a reference to the start
of the byte string.)
2011-04-21 11:06:29 -04:00
Joey Hess
45bdb2d413 ensure tmp dir exists 2011-04-21 10:53:29 -04:00
Joey Hess
6fcd3e1ef7 fix S3 upload buffering problem
Provide file size to new version of hS3.
2011-04-21 10:33:17 -04:00
Joey Hess
d8329731c6 missing build dep 2011-04-21 09:58:32 -04:00
Joey Hess
d01e30fcc5 Merge remote-tracking branch 'origin/master' 2011-04-21 02:31:17 -04:00
Joey Hess
43639f69f6 ghc7
* Update Debian build dependencies for ghc 7.
* Debian package is now built with S3 support. Thanks Joachim Breitner for
  making this possible, also thanks Greg Heartsfield for working to improve
  the hS3 library for git-annex.

Also hid a conflicting new symbol from Control.Monad.State
2011-04-21 02:22:40 -04:00
Joey Hess
e3651b1285 update 2011-04-21 01:51:15 -04:00
https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U
156f6c7aa6 removed 2011-04-20 21:46:33 +00:00
https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U
8d6b4f6f7d Added a comment 2011-04-20 21:33:17 +00:00
https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U
130252d938 Added a comment 2011-04-20 21:30:13 +00:00
Joey Hess
0c9896114e add news item for git-annex 0.20110419 2011-04-19 22:26:40 -04:00
Joey Hess
143fc7b692 finalize release 2011-04-19 21:40:21 -04:00
Joey Hess
936ad63cf4 heard from hS3 author 2011-04-19 17:56:56 -04:00
Joey Hess
2b742dcd78 Merge remote-tracking branch 'branchable/master' 2011-04-19 16:32:33 -04:00
Joey Hess
4837176897 update on memory leak
Finished applying to S3 the change that fixed the memory leak in bup, but
it didn't seem to help S3.. with encryption it still grows to 2x file size.
2011-04-19 16:31:35 -04:00
http://joey.kitenet.net/
ef6d265af4 Added a comment 2011-04-19 20:13:10 +00:00
Joey Hess
030c7a056b update 2011-04-19 16:03:27 -04:00
Joey Hess
5985acdfad bup: Avoid memory leak when transferring encrypted data.
This was a most surprising leak. It occurred in the process that is forked
off to feed data to gpg. That process was passed a lazy ByteString of
input, and ghc seemed to not GC the ByteString as it was lazily read
and consumed, so memory slowly leaked as the file was read and passed
through gpg to bup.

To fix it, I simply changed the feeder to take an IO action that returns
the lazy bytestring, and fed the result directly to hPut.

AFAICS, this should change nothing WRT buffering. But somehow it makes
ghc's GC do the right thing. Probably I triggered some weakness in ghc's
GC (version 6.12.1).

(Note that S3 still has this leak, and others too. Fixing it will involve
another dance with the type system.)

Update: One theory I have is that this has something to do with
the forking of the feeder process. Perhaps, when the ByteString
is produced before the fork, ghc decides it need to hold a pointer
to the start of it, for some reason -- maybe it doesn't realize that
it is only used in the forked process.
2011-04-19 15:27:03 -04:00
Joey Hess
b1274b6378 refactor 2011-04-19 14:50:09 -04:00
Joey Hess
a441e08da1 Fix stalls in S3 when transferring encrypted data.
Stalls were caused by code that did approximatly:

content' <- liftIO $ withEncryptedContent cipher content return
store content'

The return evaluated without actually reading content from S3,
and so the cleanup code began waiting on gpg to exit before
gpg could send all its data.

Fixing it involved moving the `store` type action into the IO monad:

liftIO $ withEncryptedContent cipher content store

Which was a bit of a pain to do, thank you type system, but
avoids the problem as now the whole content is consumed, and
stored, before cleanup.
2011-04-19 14:45:19 -04:00
Joey Hess
1687fecd33 bug 2011-04-19 13:45:32 -04:00
Joey Hess
4cbd71b057 enable gpg batch mode when GPG_AGENT_INFO is set 2011-04-19 13:40:02 -04:00
https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U
684ad74710 Added a comment 2011-04-17 23:46:38 +00:00
Joey Hess
6c238922f0 Merge remote-tracking branch 'branchable/master' 2011-04-17 18:18:55 -04:00
Joey Hess
86f7feb278 initremote: show gpg keys 2011-04-17 18:18:27 -04:00
praet
0c856a9925 2011-04-17 20:29:34 +00:00
praet
f5845ce97b 2011-04-17 20:26:56 +00:00
praet
1d94323318 2011-04-17 20:22:24 +00:00
Joey Hess
a91a51fc03 Add missing build dep on dataenc. 2011-04-17 14:41:24 -04:00
Joey Hess
7aa668f4b4 Don't run gpg in batch mode, so it can prompt for passphrase when there is no agent. 2011-04-17 14:30:22 -04:00
Joey Hess
d9690a9b5d cleanup 2011-04-17 13:11:38 -04:00
Joey Hess
e8a94d914b Merge remote-tracking branch 'branchable/master' 2011-04-17 12:45:13 -04:00
Joey Hess
8e53d0032e add news item for git-annex 0.20110417 2011-04-17 12:44:29 -04:00
Joey Hess
36f048979f releasing version 0.20110417 2011-04-17 12:43:36 -04:00
Joey Hess
dd207994bc reword again
On second thought, "unlocking" is confusable with git-annex unlock.
2011-04-17 12:36:12 -04:00
https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U
db348896c3 2011-04-17 16:02:22 +00:00
Joey Hess
416c5e38e7 link 2011-04-17 11:45:34 -04:00
Joey Hess
dcbe94b3a5 layout 2011-04-17 11:44:32 -04:00
Joey Hess
e2a3b69195 Merge remote-tracking branch 'branchable/master' 2011-04-17 11:42:31 -04:00
Joey Hess
d93e2f52c3 update 2011-04-17 11:41:52 -04:00
Joey Hess
808040d72a update to mention encryption 2011-04-17 11:38:28 -04:00
Joey Hess
f486768b16 tweak wording 2011-04-17 11:31:56 -04:00
Joey Hess
83423211a2 design wrapup 2011-04-17 11:27:24 -04:00
Joey Hess
80981600a0 looked up HMAC block size details 2011-04-17 11:13:54 -04:00
Joey Hess
eafb519592 hmacSha1 wants the secret key as first parameter
I was offline last night and going by function signatures, and unable to
tell which was which. Note sure it matters to HMAC which comes first;
better safe than sorry.
2011-04-17 11:09:33 -04:00
Joey Hess
3d2a0f68b5 note 2011-04-17 11:08:11 -04:00
Joey Hess
67cced26dc S3 crypto support
Untested, I will need to dust off my S3 keys, and plug the modem back in
that was unplugged last night due to very low battery bank power. But it
compiles, so it's probably perfect. :)
2011-04-17 11:01:34 -04:00
Joey Hess
4d136e1ef5 use different parts of cipher for hmac and gpg
Per bugs/S3_bucket_uses_the_same_key_for_encryption_and_hashing

It may be paranoid to worry about the cipher being recovered
from hmac keys, but yes.. let's be paranoid.
2011-04-17 01:36:22 -04:00