[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: Krashmail (was: re: kmail weirdness)
From:       Marc Mutz <Marc.Mutz () uni-bielefeld ! de>
Date:       2001-06-29 17:35:42
[Download RAW message or body]

-----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-----


["Krashmail-togz.txt.gz" (application/x-gzip)]
_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic