AdguardForMac
AdguardForMac copied to clipboard
Very high CPU usage in Mail.app
I’m seeing very high (100%) CPU usage in Mail.app.
The behaviour is a bit random. Typically it will work properly several hours and suddenly I will notice my MacBook gets hot. Most of the time it happens at some point during the night and I find it hot in the morning. It seems that Mail.app has trouble connecting and gets stuck in a loop somewhere. I have to force quit it.
I think it started with AdGuard 2.6. It started on Big Sur, and still happens in Monterey.
This seems similar to #928.
I have no antivirus, firewall or other network related software installed. I’m running a fresh 12.0.1 install on an M1 MB Air.
I sent a bug report. Ticket number is 548998.
Below is a screenshot of Mail.app with an error message saying the connection expired. It think iCloud and Yahoo (top and bottom) are affected but not Outlook/Exchange.

Hello there!
Could you check if the issue repeats if you run mail.app
after running AdGuard protection?
If starting Mail.app
while AdGuard protection is already running helps, it is the AdguardTeam/CoreLibs#1436.
@Chinaski1 AdGuard launches automatically on startup and I open Mail.app manually after that so if I understand what you are saying correctly Mail.app always runs after AdGuard. It has not helped so far.
I have been trying to reproduce this issue for a few days, but have not noticed this behaviour.
So I would like to ask you to take a Sample if you notice a recurrence of this situation. (100& CPU load)
- Activity monitor -> Choose Mail.app -> Click on
Sample
-> Send received txt file to [email protected] - Is the issue reproduced only with DNS filtering ON?
@Chinaski1 Apologies for the delay. I have sent the sample. I can confirm that the issue happens even with dns filtering off. I have no other adblocker, firewall, antivirus or network related extension installed. There is no profile installed, I have manually checked that the dns is my ISP’s.
I also have the same issue.
Hello, I appear to have hit the very same issue this morning. Restarting Mail.app made it stop. It may have been an interaction with my VPN software as well.
I'm posting here mostly so I can find this Github issue in future, if it happens again I will try to provide more debugging info.
The only thing I can mention is that while Mail.app was at 100%, looking in Console there were endless identical nw_socket_handle_socket_event
messages, all with READ_CLOSE
in them.
@sfionov @Stillness-2 guys, this looks like a consequence of using tcpkill
to mitigate the old Network Extensions bug.
Can we simply exempt Mail.app from the tcpkill
's scope?
I had to exclude the mail app from AdGuard to resolve the issue.
@sfionov it seems that my original assumption about tcpkill
might be wrong. Any idea what could it be?
Yep, it doesn't seem to be tcpkill problem. May be an Apple bug. However, they pushed some fixes for transparent proxy since 12.0.1.
@letheed @grovolis Can you please retry to test it with the latest macOS version?
Yep, it doesn't seem to be tcpkill problem. May be an Apple bug. However, they pushed some fixes for transparent proxy since 12.0.1.
@letheed @grovolis Can you please retry to test it with the latest macOS version?
I'd love to but I've sold my Mac while I wait for my new one to come in.
Might be more than a month before I can test this.
I was able to reproduce this today on macOS 12.3.1.
I was having the same issue today. I use macOS 12.3.1. Disabling "Protect Mail Activity" and "Hide IP Address" seemed to solve the problem.
I was having the same issue today. I use macOS 12.3.1. Disabling "Protect Mail Activity" and "Hide IP Address" seemed to solve the problem.
~~This seems to be working for me too!~~ Edit: The problem seems to be back, adding mail.app to the exclusions again.
I was having the same issue today. I use macOS 12.3.1. Disabling "Protect Mail Activity" and "Hide IP Address" seemed to solve the problem.
~This seems to be working for me too!~ Edit: The problem seems to be back, adding mail.app to the exclusions again.
I came to a hasty conclusion. The problem is back for me too. I'll add mail.app to the exclusions.
Yes, I have kept "Private Relay (beta)" disabled so far, and I’ve tried disabling "Protect my mail activity" before, it has always come back. Only excluding Mail.app from filtering has had an effect so far.
May be related to https://github.com/AdguardTeam/CoreLibs/issues/1643
Still happens with CoreLibs 1.10.113.
Happening with AdGuard 2.10.1.1277 (CoreLibs version 1.11.98, DNSLibs version 2.1.38) with macOS Ventura 13.4.1.
@validatedev Can you please say what type of email service is configured in your Mail app? IMAPS, POPS, Exchange/Outlook Web Access or something else?
Sure. I have 5 IMAPs (4 Google, 1 iCloud) and 1 Exchange. Thanks for the interest, by the way.