Krashmail (was: re: kmail weirdness)

Marc Mutz Marc.Mutz@uni-bielefeld.de
Fri Jun 29 19:55:01 2001


--Boundary_(ID_UNoslgtVFaebrUjI0ltKAw)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

[ Could the gnupg people please have a look at the scenario near the end of the mail? The mail in question and the last bits of a strace of a crash are attached... ]

On Friday 29 June 2001 15:55, Don Sanders wrote:

> On Friday 29 June 2001 14:42, Marc Mutz wrote:
<snip>
> > I also attached the output of strace, form the fork() in
> > KMMsgBase until the crash.
> >
> > My main problem is that I don't really know what could
> > cause a SIGPIPE, except killing the sending or receiving
> > process...
>
> I guess gpg is abnormally terminating.
>
Yes, strace says SIGCHLD and the next write causes SIGPIPE.
> This is probably related to the fact that the
> "-----BEGIN PGP SIGNED MESSAGE-----" clause does not start
> at the beginning of the body of the mail.
>
No, it's fine if it doesn't. You can pipe a whole mail through gpg and it will scan for this line itself, skipping preceding and trailing "garbage". No, the error gpg gives back if you pipe it the mail on the command line is "CRC Error" and "QP character in armor, probably a buggy MTA has been used". Indeed, there are QP-encoded characters in between the ---begin signature--- ... ---end signature--- lines.
> I suspect gpg is being passed extraneous data, that is
> causing it to terminate. But it is confusing that you can
> only reproduce the problem sometimes and that I can't
> reproduce the problem at all.
>
GnuPG people: Is the below picture correct? Does GnuPG behave like this? Timing problem? GPG exits as soon as it encounters the garbage character? KMail doesn't recognize this and happily keeps on writing to the pipe? Sometimes KMail gets this extra slice of CPU time that allows it to write the last line before gpg gets to read the line before? write(20, "-----BEGIN PGP SIGNATURE-----\n", 30) = 30 poll([{fd=21, events=POLLIN}], 1, 0) = 0 poll([{fd=20, events=POLLOUT, revents=POLLOUT}], 1, 5) = 1 write(20, "Version: GnuPG v1.0.6 (GNU/Linux"..., 34) = 34 poll([{fd=21, events=POLLIN}], 1, 0) = 0 poll([{fd=20, events=POLLOUT, revents=POLLOUT}], 1, 5) = 1 write(20, "Comment: For info see http://www"..., 43) = 43 poll([{fd=21, events=POLLIN}], 1, 0) = 0 poll([{fd=20, events=POLLOUT, revents=POLLOUT}], 1, 5) = 1 write(20, "\n", 1) = 1 poll([{fd=21, events=POLLIN}], 1, 0) = 0 poll([{fd=20, events=POLLOUT, revents=POLLOUT}], 1, 5) = 1 write(20, "iD8DBQE7O1GYWQvEMJfcXlQRAkdVAJ9l"..., 65) = 65 poll([{fd=21, events=POLLIN}], 1, 0) = 0 poll([{fd=20, events=POLLOUT, revents=POLLOUT}], 1, 5) = 1 ******** vvv Below we write broken line vvvvv **** write(20, "/uls/xpaRkDpK+a+q8ICRqU=3D\n", 27) = 27 poll([{fd=21, events=POLLIN}], 1, 0) = 0 poll([{fd=20, events=POLLOUT, revents=POLLOUT}], 1, 5) = 1 write(20, "=3DkRCs\n", 8) = 8 poll([{fd=21, events=POLLIN}], 1, 0) = 0 poll([{fd=20, events=POLLOUT, revents=POLLOUT|POLLERR}], 1, 5) = 1 - --- SIGCHLD (Child exited) --- write(20, "-----END PGP SIGNATURE-----\n", 28) = -1 EPIPE (Broken pipe) - --- SIGPIPE (Broken pipe) --- +++ killed by SIGPIPE +++ While this is a snippet of a strace where everything went well: write(20, "iD8DBQE7O1GYWQvEMJfcXlQRAkdVAJ9l"..., 65) = 65 poll([{fd=21, events=POLLIN}], 1, 0) = 0 poll([{fd=20, events=POLLOUT, revents=POLLOUT}], 1, 5) = 1 write(20, "/uls/xpaRkDpK+a+q8ICRqU=3D\n", 27) = 27 poll([{fd=21, events=POLLIN}], 1, 0) = 0 poll([{fd=20, events=POLLOUT, revents=POLLOUT}], 1, 5) = 1 write(20, "=3DkRCs\n", 8) = 8 - --- SIGCHLD (Child exited) --- poll([{fd=21, events=POLLIN, revents=POLLIN|POLLHUP}], 1, 0) = 1 read(21, "Hi,\n\nstill didn\'t get TCFS to wo"..., 1024) = 414 poll([{fd=21, events=POLLIN, revents=POLLHUP}], 1, 0) = 1 write(2, "libkdenetwork: ", 15libkdenetwork: ) = 15 write(2, "GnuPG hung up\n", 14GnuPG hung up ) = 14 close(20) = 0 read(21, "", 1024) = 0 close(21) = 0 read(23, "libkdenetwork: pgp cmd = LANGUAG"..., 1024) = 168 read(23, "", 1024) = 0 close(23) = 0 write(2, "libkdenetwork: ", 15libkdenetwork: ) = 15 write(2, "libkdenetwork: pgp cmd = LANGUAG"..., 168libkdenetwork: pgp cmd = LANGUAGE=C gpg --batch --decrypt gpg: CRC error; 9110ac - dc3911 gpg: quoted printable character in armor - probably a buggy MTA has been used ) = 168 write(2, "libkdenetwork: ", 15libkdenetwork: ) = 15 write(2, "\n", 1 ) = 1 Marc - -- Marc Mutz <Marc@Mutz.com> http://marc.mutz.com/ http://www.mathematik.uni-bielefeld.de/~mmutz/ http://EncryptionHOWTO.sourceforge.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7PLx83oWD+L2/6DgRAqdrAJ9C+aq2VsbtcaKS/imcVJ8A38NrZACgznd1 C+gzD8KsBmLT2fqRh6spvgo= =9niA -----END PGP SIGNATURE----- --Boundary_(ID_UNoslgtVFaebrUjI0ltKAw) Content-type: application/x-gzip; name=Krashmail-togz.txt.gz Content-disposition: attachment; filename=Krashmail-togz.txt.gz Content-transfer-encoding: base64 H4sICEzOOzsCA0tyYXNobWFpbC10b2d6LnR4dACdVl134jgSfW7/ijqzDwOn24ptcABPJ5s0X033 kNBAZnu3Tx4UW8bqGItYcoD99VuSgRACs7PrEGwsuXRv1a0r93IxhyHlKcvtDmVzkV0pW2QpzxiJ GEyTAr4UGXhNcBtBHT8t8BzHtcZMFXlmj6hKAvh4MsCl1WEpf2Y5i+ypCCCX6ioVIU0TIRXZXWG4 kOG0KIBYA9oNQOVgdiTmlGfww/UaxME/975qvXtY7z8xwu+Yr6qw5CqB7mQ4HQGPoFerdxuu33Ba TetdLHL4+ArM5W+a7AfN1BBGkpqy7wVuE947+Bsq7e5kWj3EG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