GpgOL: Rare Outlook freeze when decrypting / verifying mails
Closed, ResolvedPublic

Description

I've already spent several days investigating this:

When decrypting / verifying a mail outlook sometimes freezes. There is no clear indication why or when that is the case.
For me the freeze appears < 1% meaning it freezes usually after > 100 decrypt / verify operations.
With changed Timing I was able to move this to < 0.1% meaning that it froze only after > 1000 decrypt / verify operations.

Changing the timing of ParseController::parse appeared to affect this. Although speeding it up and switching to the keycache does not appear to have the desired effect.

  • Sometimes Outlook freezes while our code is active. A call into the OOM like
int ret = put_oom_string (m_mailitem, "Body", converted ? converted : "");

does not return.

  • Mostly Outlook freezes while we are not active. We see the freeze when we send a windowmessage and it is no longer handled.

I did not find a pattern with Process Monitor and Process Explorer. Sometimes Outlook churns CPU when it is hanging, sometimes not. The stack in Process Explorer looks differently all the time.

It might be related to UI invalidation as changing the timing of UI Invalidation also changed the crash stuff. But the invalidation is done when it freezes and the Icons etc. are already queried so I don't really see how that can be the case.

Details

Version
3.1.3
JJworx added a subscriber: JJworx.Sep 14 2018, 5:22 PM

I also have these seldom freezings. Any log / tracker I could activate that would help you?

JJworx, thanks but I don't think a log would help me currently. With Gpg4win-3.1.3 I'm down in my main test instance to have these crashes ~0.25% (so I need around 400 verify/decrypt operations).

At some "random" point the Outlook API just stops responding.

My next step here will be to write some test code that will simulate the workflow of decrypt / verify operations to hopefully help me figure out the state of outlook when it locks up.

That may be true, my Outlook crashes more often. Especially when dealing
with incoming S/MIME-signed mails!

Am 19.09.2018 um 10:32 schrieb aheinecke (Andre Heinecke):

aheinecke added a comment.

JJworx, thanks but I don't think a log would help me currently. With
Gpg4win-3.1.3 I'm down in my main test instance to have these crashes
~0.25% (so I need around 400 verify/decrypt operations).

At some "random" point the Outlook API just stops responding.

My next step here will be to write some test code that will simulate
the workflow of decrypt / verify operations to hopefully help me
figure out the state of outlook when it locks up.

*TASK DETAIL*
https://dev.gnupg.org/T4111

*EMAIL PREFERENCES*
https://dev.gnupg.org/settings/panel/emailpreferences/

*To: *aheinecke
*Cc: *JJworx, aheinecke, ccharabaruk, Mak, gp_ast

  • This is an automated email from the GnuPG development hub. If you have registered in the past at https://bugs.gnupg.org/ your account was migrated automatically. You can visit https://dev.gnupg.org/ to set a new password and update your email preferences.

That may be true, my Outlook crashes more often. Especially when dealing
with incoming S/MIME-signed mails!

T4141 might be the cause for "new" instabilities with 3.1.3. If a mail was seen where the charset of the mail could not be converted the next view of a mail would run into undefined behavior, likely crashing.

There is now an option in the debugging tab of the GpgOL config dialog to disable async decryption. This does not fully fix the issue but maybe mitigates it for some users that are very affected by this.

With Gpg4win 3.1.4 and the two blocking options, searching for any name in Inbox, entering more than 2 letters will crash Outlook 100%.

werner added a subscriber: werner.Nov 2 2018, 11:41 AM

The T4237 fix should also fix this one.

Yes. Thanks! I'm at over 2500 S/MIME verify operations without a crash now!

@jjworks that is not to say that we have fixed all the bugs but there was a bug in one of our librarys that freed a random resource, so it could have caused anything. So I'm closing this issue as decrypt / verify is now rock solid for me.

aheinecke closed this task as Resolved.Nov 2 2018, 1:02 PM
werner awarded a token.Nov 2 2018, 3:10 PM