Linux x86 2.4.4
Mailcrypt: all versions seem affected
Decrypting messages larger than a few kilobytes (encrypted) hangs XEmacs until gpg is killed from a shell, at which point a SIGPIPE error is displayed by mailcrypt.
Stracing both XEmacs and gpg shows that they're both stuck in a write syscall to their respective output pipes. Under Linux a pipe memory buffer is relatively small (one 4Kb page) and apparently mailcrypt tries to send the whole buffer to gpg before reading the cleartext ouput from its input pipe.
If I understand the problem correctly, in case of large enough ciphertext buffers (>8Kb?), this behaviour "clogs" both pipes - gpg decrypts the first 4Kb of cleartext then waits for mailcrypt to empty the output pipe, while mailcrypt keeps sending more ciphertext to gpg until the second pipe is full as well. This results in the deadlock I observed.
I have no idea of how this problem might be corrected, short of using temporary files instead of pipes (and lose security) or bypassing mailcrypt altogether for such messages. Either solution is probably not acceptable. Perhaps it is possible to improve the pipe r/w mechanism used by mailcrypt in some way - writing ciphertext in small chunks, or forking separate writer/reader processes come to mind as possible approaches.