in conversation on IRC, weasel says his pubring.gpg (using gnupg from debian
stable, which is currently 1.4.18-7+deb8u3) gets truncated about every few weeks.
He says that he thinks it happens when he gets frustrated with something taking
a long time and uses ctrl-C to abort gpg. often, this happens while doing gpg
- keyring is large: ~300MiB
- ~/.gnupg is backed by an ext4 filesystem on an SSD
- he will do repeated key imports, like those triggered by his "get-signers"
- during those imports is when ctrl-C is likely to cause the truncation.
This should be relatively straightforward to reproduce:
- make a large keyring
- delete a few signatures from within it
- refresh the keyring (or run get-signers against one of the keys in it)
- watch the $GNUPGHOME -- as soon as .lock and .tmp files show up, send a
sigint to the gpg process.