GPGMail: GPGMail makes Mac slow - uses a lot of CPU

Metin's Avatar

Metin

15 Aug, 2018 12:17 PM

Since the last update, I experience the problem that when displaying a PGP encrypted email, GPGMail uses so much CPU that my Mac doesn’t respond well any more.

This seems to be not only shortly while decrypting (which I would accept), but as long as the message is displayed.

Expected
I would expect high CPU usage only shortly while decrypting, not continuously while displaying the decrypted email.

macOS                   10.12.6     16G1510
GPG Suite               2018.3      2223    (8d0c266)
GPGMail                 2.7.3       1268    (b7a4d043)
GPG Keychain            1.4.4       1460    (9010342)
GPGServices             1.11.4      1013    (0b04f6c)
MacGPG                  2.2.8       916     (0ed4a99)
GPG Suite Preferences   2.1.2       997     (1a09bc7)
Libmacgpg               0.8.5       863     (0707962)
pinentry                0.9.7.1     9       (db18340)
  1. Support Staff 1 Posted by Steve on 17 Aug, 2018 02:30 PM

    Steve's Avatar

    Hi Metin,

    welcome to the GPGTools support platform. Sorry you are having problems using GPG Suite.

    Is this happening when selecting any encrypted message or one specific message? If the latter, can you isolate that message in a separate folder and see if the problem persists if you only select the inbox in Mail.app?

    While the issue is happeing, could you please create the following debug information:

    Spindump

    • open Activity Monitor
    • sort after 'Process Name' (first column) and select Mail
    • click the cogwheel icon and select 'Spindump'
    • 'Save...' the Spindump output to your desktop
    • attach the resulting file to your existing discussion

    Process Sample

    • open Activity Monitor
    • sort after 'Process Name' (first column) and select Mail
    • click the cogwheel icon and select 'Sample Process'
    • 'Save...' the Spindump output to your desktop
    • attach the resulting file to your existing discussion

    Best,
    steve

  2. 2 Posted by Metin on 27 Sep, 2018 09:57 AM

    Metin's Avatar

    Sorry for not getting back earlier. I have been trying to find out when exactly this happens, but I wasn't able to find a reproducable rule.

    However, I suspect that saving email drafts while typing is causing a high cpu usage, especially when replying to a long mail thread (which is all quoted in the reply mail).

    I'm still trying to hunt this down, and as soon as I have some reliable ideas, I'll get back with the requested data.

    Thanks
    Metin

  3. 3 Posted by Metin on 05 Oct, 2018 12:53 PM

    Metin's Avatar

    Hi guys,

    Today I experienced a severe problem when trying to reply to a gpg encrypted email. The computer was getting so slow that I when typing it took seconds for the characters to appear. Finally, I got a message that my system is out of memory. I checked through activity monitor, but the memory report was green (like 10 out of 16 GB used). However, in the task list, Mail was reported to use over 26 GB of memory!

    I was hardly able to use the computer, so I couldn't check in your message what you requested, but I've created 2 system reports that might help to track down the problem.

    After I restarted my Mac, Mail worked flawlessly with now only between 200MB and 400MB of memory usage. My Mac had been running for 24 days before that. I suspect a memory leakage somewhere that with time leads to the problems I experienced.

    I'd appreciate your help. Please let me know if I can provide more info.

    Thanks
    Metin

  4. 4 Posted by Metin on 06 Oct, 2018 10:03 AM

    Metin's Avatar

    Hi Steve,

    After the restart of my computer, I've experienced the original problem again. I'm not sure at all if it is connected to the other problem. Symptoms are different:

    • Mail memory usage is at sane 700 MB currently
    • I open a (quite long) pgp encyrpted email
    • Scrolling is laggy, but cpu usage seems ok yet - I guess that's due to decrypting the email on the fly?
    • I hit the reply button
    • Now the Mac starts to lag extremely. When I type my reply, it takes seconds until the letters appear. It makes me crazy because as I can't see what I'm typing, a lot of typos occur, and when I try to move the cursor to correct the typo, due to the lags it's difficult to position is correctly, creating even more typos.
    • cpu goes up, and the fan starts to become very loud. Even when I stop typing, the symptoms don't go away. The only thing I can do to calm down my Mac is to close the reply message.

    I attach two more of the requested files and hope this helps to identify the problem.

    Thanks
    Metin

  5. Support Staff 5 Posted by Steve on 29 Oct, 2018 04:51 PM

    Steve's Avatar

    HI Metin,

    please excuse the late reply, we are deeply sorry for not responding earlier. The amount of feedback we received in regards to the GPG Suite 2018.4 release was overwhelming. We are doing our best to catch up as fast as we can.

    Does this problem persist with GPG Suite 2018.5?

    Best,
    Steve

  6. 6 Posted by Metin on 29 Oct, 2018 05:18 PM

    Metin's Avatar

    Hi Steve,

    To be honest, I haven't installed the new version yet. I've been very busy, too. I will get back to you after I've done that and let you know.

    Thanks
    Metin

  7. 7 Posted by Metin on 30 Nov, 2018 11:23 AM

    Metin's Avatar

    Hi Steve,

    I've installed the latest version now, and I've also updated macOS to Mojave.

    The problem, however, since to be depending on how long a mail thread is, maybe also how long the emails in this thread are. When I view single emails, there is no problem at all, but if I view longer threads (like over 50 emails that went back and forth), CPU usage goes significantly. It seems to me as if the system wants to decrypt all messages in he thread at the same time?

    Not sure though, if there is anything you could do about it?

    Thanks
    Metin

  8. Support Staff 8 Posted by Steve on 30 Nov, 2018 12:42 PM

    Steve's Avatar

    Could you temporarily disable GPG Mail:

    • shut down Mail.app
    • open finder
    • navigate to /Library/Mail/Bundles or ~/Library/Mail/Bundles and copy GPGMail.mailbundle to your desktop
    • now delete GPGMail.mailbundle from the original folder

    Restart Mail and check the Preferences - GPG Mail should be gone.

    To re-enable mail, close Mail.app and move the bundle file back to the Bundles folder.

    how does mail then behave? Is the long thread then loaded without issues?

  9. 9 Posted by Metin on 03 Dec, 2018 01:16 PM

    Metin's Avatar

    Hi Steve,

    Tried what you described, but I don't see a significant difference.

    However, it's not as bad as it used to be since - I think - updating to Mojave.

    Cheers
    Metin

  10. Support Staff 10 Posted by Steve on 03 Dec, 2018 09:04 PM

    Steve's Avatar

    OK, please do keep an eye on this. If the issue gets worse, observe how Mail / your mac behaves with GPG Mail enabled / disabled and if there is any difference.

    I'm closing this discussion, but you can re-open this discussion here or open a new one any time.

    Best,
    Steve

  11. Steve closed this discussion on 03 Dec, 2018 09:04 PM.

  12. Metin re-opened this discussion on 13 Feb, 2019 01:56 PM

  13. 11 Posted by Metin on 13 Feb, 2019 01:56 PM

    Metin's Avatar

    Hi Steve,

    I'm afraid I have to get back to you regarding this problem.

    Today, I was browsing PGP encrypted emails, and the CPU usage went up significantly. However, my thought was that GPG needs to decrypt all those messages I'm browsing, so there is a reason for this.

    After that, I closed all these messages and started to write a new one, but my Mac was slowed down in a way that typing became very annoying because the characters would appear only much delayed. I checked the activity monitor and noticed that securityd, Mail and com.apple.WebKit.WebContent hogged around 130% CPU in total. Most of the time, securityd was top, but sometimes it passed to top position to Mail.

    My assumption was that the message I was working on would be encrypted again and again while I was typing, but after I had sent it, the CPU usage kept being that high for no obvious reason.

    After waiting and watching this for a few minutes, I finally quit Mail. As a result, CPU usage normalized. When I started Mail up again, CPU usage remained normal.

    I'm attaching a screenshot from activity monitor to give an idea. Don't know how to track this down if you say that's unusual behaviour.

    Cheers
    Metin

  14. Support Staff 12 Posted by Steve on 13 Feb, 2019 05:08 PM

    Steve's Avatar

    Hi Metin,

    sehe grade wir können auch auf deutsch weitermachen.

    securityd ist ein Prozess von Apple. Der kann spikes haben, wenn irgendwas mit deinen E-Mail Konten klemmt oder etwas mit der Abfrage von gespeicherten Passwörtern hakt.

    Nach einem Neustart sollte das aber behoben sein.

    Kannst du das bestätigen?

  15. 13 Posted by Metin on 13 Feb, 2019 05:20 PM

    Metin's Avatar

    Hm..

    Neustart von Mail oder Neustart von macOS?

    Nach dem Neustart von Mail war es ja erst mal weg. Wenn ich einen sehr langen verschlüsselten Mail-Thread durchsehe, get der CPU-Verbrauch sehr stark in die Höhe, so dass der Mac nur noch zäh reagiert. In der Regel reicht es zwar schon, damit aufzuhören, damit sich der Mac wieder beruhigt, aber manchmal hört es erst auf, wenn ich Mail beende. Gefühlsmäßig würde ich auch ein Speicherleck o.ä. tippen, aber ich habe leider immer noch nicht herausfinden können, unter welchen Umständen genau das reproduzierbar auftritt.

    Sorry! Wenn ihr auch keine Idee habt..?

  16. Support Staff 14 Posted by Steve on 13 Feb, 2019 05:46 PM

    Steve's Avatar

    Grundsätzlich werden in einem Thread alle Nachrichten einzeln geladen und dann entschlüsselt. Wenn du also sehr flott durch einen Thread tippst, kann das durchaus mal dafür sorgen, dass die Lüfter hörbar werden.

    Ja, die Reproduzierbarkeit ist hier leider der Punkt, der das Beheben solcher Probleme so komplex macht, leider.

  17. Support Staff 15 Posted by Luke Le on 13 Feb, 2019 05:54 PM

    Luke Le's Avatar

    Hi Metin,

    bei einem sehr langen Thread kann es gut sein, dass sowas passiert, allerdings vermutlich auch, wenn keine verschlüsselten Mails involviert sind. Jedes E-Mail wird von Mail mit einer eigenen WebKit (safari, com.apple.WebKit.WebContent) Instanz dargestellt und das kann sehr aufwändig für Mail und deinen Rechner werden. Hast du zufällig auch ein S/MIME Zertifikat im Einsatz? securityd wird von uns bzw. GnuPG nicht verwendet, weshalb ich vermute, dass es evtl. auch ein Problem mit deinem Keychain gibt.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac