Bug 244548

Summary: dirmngr uses 100% CPU with SMIME email
Product: [openSUSE] openSUSE 10.2 Reporter: Peter Nixon <nix>
Component: OtherAssignee: Petr Uzel <puzel>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None CC: misch, nadvornik, peterph
Version: Final   
Target Milestone: ---   
Hardware: 32bit   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Sample mail that crashes dirmngr

Description Peter Nixon 2007-02-12 09:22:58 UTC
I have just received an email which causes dirmngr to use 100% cpu indefinitely. This obviously causes kmail/kontact to become unresponsive also. The mail is SMIME signed.
I can attach the email file directly from my Maildir folder but I do not want the contents to be public. Is there some way I can submit it for testing without it being publicly accessable?
Comment 1 Matej Horvath 2007-02-13 13:09:14 UTC
Lukas, I suggest to send it directly to you, since you are the dirmngr maintainer, If you don't mind.
Comment 2 Lukas Tinkl 2007-02-20 13:32:35 UTC
You can submit it directly to me, or mark the attachment as private (IIRC)
Comment 3 Lukas Tinkl 2007-03-14 13:20:52 UTC
*** Bug 253984 has been marked as a duplicate of this bug. ***
Comment 4 Peter Nixon 2007-03-14 14:07:19 UTC
I have sent the problem mail to Lukas. As far as I can see there is no way to attach something privately to bugzilla.
Comment 5 Michael Schwartzkopff 2007-03-14 14:22:11 UTC
Hi,

I think the problem is more network related see my duplicate bug # 253984. Anyway, I can provide you with a mail since I can easily reproduce the problem.
Comment 6 Peter Nixon 2007-03-14 14:43:24 UTC
I should add that while kmail is unresponsive and dirmngr is at 100% cpu, if you kill the dirmngr process kmail comes back to life and displays the email.
Comment 7 Michael Schwartzkopff 2007-03-15 08:29:51 UTC
Created attachment 124548 [details]
Sample mail that crashes dirmngr

Please find attached a sample mail that crashes dirmngr. The mail is signed only, not encrypted.
Comment 8 Lukas Tinkl 2007-03-15 13:01:47 UTC
If I build a new dirmngr RPM for you, would you be able to test if it fixes your problem?
Comment 9 Michael Schwartzkopff 2007-03-15 13:09:25 UTC
No problem. Just send it to my mail address.
misch /the well known sign/ multinet.de
Comment 10 Peter Nixon 2007-03-15 13:22:31 UTC
Yep. Likewise. Just send it to the mail address linked with my bugzilla account or provide a download link.
Comment 11 Lukas Tinkl 2007-03-20 14:39:56 UTC
http://ktown.kde.org/~lukas/download/dirmngr-0.9.7-1.i586.rpm

Please test and report if it fixes your problem :)
Comment 12 Peter Nixon 2007-03-20 15:05:06 UTC
# rpm -Uvh dirmngr-0.9.7-1.i586.rpm
error: Failed dependencies:
        libpth.so.20 is needed by dirmngr-0.9.7-1.i586

:-(
Comment 13 Lukas Tinkl 2007-03-21 12:44:38 UTC
sry, here it is :(

http://ktown.kde.org/~lukas/download/pth-2.0.7-4.i586.rpm
Comment 14 Peter Nixon 2007-03-21 13:23:17 UTC
OK. That solves the problem for me.
However, the CPU does still spike to 100% for 5-10 seconds and kmail is unresponsive during this time, after which the mail is shown properly and everything returns to normal..
Comment 15 Lukas Tinkl 2007-03-21 13:36:37 UTC
Nice to hear, now I have to find out how to release an update since the required packages (pth, libassuan) changed quite a bit in factory (OpenSUSE 10.3)
Comment 16 Michael Schwartzkopff 2007-03-22 08:41:56 UTC
Hi,

sorry, no fix for me. Still getting 100% CPU load.
Comment 17 Michael Schwartzkopff 2007-03-22 14:28:11 UTC
I am still having the problem:

CRL Server sends tcp FIN package, mine answers with ACK, but does not send out the second FIN package to the server. The the tcp connection is still open in FIN wait state. 
Comment 18 Lukas Tinkl 2007-03-22 16:45:51 UTC
OK, then you can report the bug directly to the aegypten developers project here, I'm sure they will be able to answer to this:
http://intevation.de/roundup/aegypten/

Thanks
Comment 19 Vladimir Nadvornik 2007-10-18 10:04:51 UTC
new maintainer
Comment 20 Petr Cerny 2008-04-30 15:04:42 UTC
Leaving SUSE - reassigning to Vladimir.
Comment 21 Vladimir Nadvornik 2008-05-15 09:44:48 UTC
new maintainer
Comment 22 Christopher Stender 2008-06-04 12:52:45 UTC
This bug is really annoying. I'm getting more and more SMINE signed mails which causes 100% CPU load and stops me from working. IMHO also a DoS issue because KMAIL opens new mails in inbox automatically.
Comment 23 Petr Uzel 2008-06-09 09:44:49 UTC
Christopher, what version of dirmngr do you use?
Comment 24 Michael Schwartzkopff 2008-06-09 09:57:13 UTC
(from Michael Schwartzkopff)

Hi,

I am using 
dirmngr 0.9.5

on OpenSuSE10.2

# uname -a
Linux mucnb003 2.6.18.8-0.9-default #1 SMP Sun Feb 10 22:48:05 UTC 2008 i686 i686 i386 GNU/Linux

Greetings.
Comment 25 Christopher Stender 2008-06-09 10:26:44 UTC
I'm using dirmngr-0.9.5-30.1. Anything else you need? I can forward a SMIME signed mail if you need one.
Comment 26 Petr Uzel 2008-06-09 14:04:28 UTC
Some mail causing dirmngr to hang would be very helpful - I'm not able to reproduce the bug with the one from comment#7 in openSUSE 11.0 RC1. You can post it here as a private attachment or send it directly to me.

Regarding dirmngr version: would you be able to test dirmngr in openSUSE 10.3 or even openSUSE 11.0 (Beta/RC) ?

Thanks


Comment 27 Christopher Stender 2008-06-09 15:24:25 UTC
I can try to reproduce it with openSUSE 11.0 RCx next week. Maybe someone else is faster. ;-)
Comment 28 Petr Uzel 2008-06-11 09:00:17 UTC
I'm still not able to reproduce it - is there any better way than simply opening the mail in kmail (with S/MIME enabled)? Do you use any special S/MIME settings?

Thanks
Comment 29 Christopher Stender 2008-07-12 12:45:28 UTC
Sorry for the late response. I did some debugging and found the problem. I installed openSUSE 11.0 and created a new KMail setup. Everything was working fine and I was not able to reproduce the bug. Then I copied my .gnupg dir from openSUSE 10.2 to openSUSE 11.0 and suddenly I noticed the 5-10 hang in kmail which was caused by 100% CPU load of dirmngr. So I looked into the .gnupg folder and noticed that dirmngr-cache.d/ has a size of 123MB! It contains a 81MB big DIR.txt and miscellaneous files DIR-tmp-$HOSTNAME-XXX.txt.tmp and crl-XXX.db (XXX are numbers/hex numbers). I removed all files within the dirmngr-cache.d folder and now the issue is gone. I guess dirmngr parsed one or all of these files which takes 5-10 seconds and causes the high load.
Comment 30 Petr Uzel 2008-07-14 13:45:32 UTC
Thanks for the info and debugging. As I can not reproduce it and it seems to work for you in 11.0, I incline to close this one as RESOLVED.

Michael, what about you - do you still encounter any problems with dirmngr?
Comment 31 Michael Schwartzkopff 2008-07-15 08:55:28 UTC
Hi,

I also found the huge files in .gnupg/dirmngr-cache.d/ After deleting these files the problem was gone.

Thanks for your long-term support.

Greetings,

Michael.
Comment 32 Petr Uzel 2008-07-15 09:19:58 UTC
(In reply to comment #31 from Michael Schwartzkopff)
> I also found the huge files in .gnupg/dirmngr-cache.d/ After deleting these
> files the problem was gone.

OK, so let's close this one. I have to close it as invalid as it is not related to any bug in dirmngr AFAIK.

> Thanks for your long-term support.

Well, I thank you and Christopher - you fixed it yourselves after all :)

Regards,
Petr