Avast WEBforum

Consumer Products => Avast Mac Security => Topic started by: AIlinykh on February 21, 2020, 11:42:26 AM

Title: Gmail IMAP throttling when using Avast Mail Shield + Spark email client
Post by: AIlinykh on February 21, 2020, 11:42:26 AM
Hello,

I am writing concerning Gmail throttling IMAP connection when using Avast Security and Spark by Readdle on macOS devices. As Spark team, we received several reports from our users regarding sync issues on Gmail / G Suite accounts. We were able to reproduce the issue. General points:
- Avast Security up and running on Mac (our customers mentioned using either free or premium version of the app);
- Spark being used as regular email app;
- Gmail/G Suite account added to Spark;
- Spark logs showed Gmail starting to throttle IMAP connection or even completely locking the account with command / bandwidth limits reached;
- disabling Avast for a few days results in account being un-locked.

From what we’ve seen it looks like average mail load and network stability are the key reasons why some accounts are being locked with limits reached in a short time (up to several hours) while others are just throttled even though such Spark&Avast setup is being used for quite a while.

To narrow down the issue, we monitored connections opened by Spark and the ones opened by com.avast.proxy to mail servers; no other mail apps running. In about 24 hours it appeared that there were connections which Avast kept open while no trace of such in Spark. Attached is the record for the moment when it started:

=======
COMMAND    PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
com.avast  353     root   24u  IPv4 0x7cfacd5157ae5d3f      0t0  TCP localhost:12993->localhost:57719 (ESTABLISHED)
com.avast  353     root   25u  IPv4 0x7cfacd516751ca2f      0t0  TCP 192.168.5.119:57720->lf-in-f108.1e100.net:imaps (ESTABLISHED)
com.avast  353     root   32u  IPv4 0x7cfacd5154f3bd3f      0t0  TCP *:12993 (LISTEN)
com.avast  353     root   44u  IPv6 0x7cfacd5162ef7a57      0t0  TCP *:12993 (LISTEN)
com.avast  353     root   48u  IPv4 0x7cfacd516751d3b7      0t0  TCP localhost:12993->localhost:57232 (ESTABLISHED)
com.avast  353     root   49u  IPv4 0x7cfacd516751c0a7      0t0  TCP 192.168.5.119:57233->lg-in-f109.1e100.net:imaps (ESTABLISHED)
Spark     4617 ailinykh   51u  IPv4 0x7cfacd5159f173b7      0t0  TCP localhost:57719->localhost:12993 (ESTABLISHED)
Spark     4617 ailinykh   64u  IPv4 0x7cfacd5159f173b7      0t0  TCP localhost:57719->localhost:12993 (ESTABLISHED)
Spark     4617 ailinykh   75u  IPv4 0x7cfacd515dcd8d3f      0t0  TCP localhost:57232->localhost:12993 (ESTABLISHED)
Spark     4617 ailinykh   77u  IPv4 0x7cfacd515dcd8d3f      0t0  TCP localhost:57232->localhost:12993 (ESTABLISHED)
=======
COMMAND    PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
com.avast  353     root   24u  IPv4 0x7cfacd5157ae5d3f      0t0  TCP localhost:12993->localhost:57719 (ESTABLISHED)
com.avast  353     root   25u  IPv4 0x7cfacd516751ca2f      0t0  TCP 192.168.5.119:57720->lf-in-f108.1e100.net:imaps (ESTABLISHED)
com.avast  353     root   32u  IPv4 0x7cfacd5154f3bd3f      0t0  TCP *:12993 (LISTEN)
com.avast  353     root   38u  IPv4 0x7cfacd515fb58d3f      0t0  TCP localhost:12993->localhost:57878 (ESTABLISHED)
com.avast  353     root   39u  IPv4 0x7cfacd51675eb0a7      0t0  TCP 192.168.5.119:57879->lh-in-f108.1e100.net:imaps (ESTABLISHED)
com.avast  353     root   44u  IPv6 0x7cfacd5162ef7a57      0t0  TCP *:12993 (LISTEN)
com.avast  353     root   48u  IPv4 0x7cfacd516751d3b7      0t0  TCP localhost:12993->localhost:57232 (ESTABLISHED)
com.avast  353     root   49u  IPv4 0x7cfacd516751c0a7      0t0  TCP 192.168.5.119:57233->lg-in-f109.1e100.net:imaps (ESTABLISHED)
com.avast  353     root   58u  IPv4 0x7cfacd5158772a2f      0t0  TCP localhost:12993->localhost:57880 (ESTABLISHED)
com.avast  353     root   59u  IPv4 0x7cfacd51618ff0a7      0t0  TCP 192.168.5.119:57881->lh-in-f108.1e100.net:imaps (ESTABLISHED)
Spark     4617 ailinykh   51u  IPv4 0x7cfacd5159f173b7      0t0  TCP localhost:57719->localhost:12993 (ESTABLISHED)
Spark     4617 ailinykh   64u  IPv4 0x7cfacd5159f173b7      0t0  TCP localhost:57719->localhost:12993 (ESTABLISHED)
Spark     4617 ailinykh   75u  IPv4 0x7cfacd515dcd8d3f      0t0  TCP localhost:57232->localhost:12993 (ESTABLISHED)
Spark     4617 ailinykh   77u  IPv4 0x7cfacd515dcd8d3f      0t0  TCP localhost:57232->localhost:12993 (ESTABLISHED)


As we used 5 seconds refresh rate, it is most likely that Spark opened and closed the connection during that interval (If Spark cannot connect to the server, it will drop the connection and retry).

We would appreciate your help in finding the root of the issue. If there is any additional information required from our side, please let me know.

To reproduce:
1. Install Spark from App Store ( https://apps.apple.com/us/app/spark-email-app-by-readdle/id1176895641?mt=12 ; macOS High Sierra or later required )
2. Add any Gmail/G Suite account
3. Use Spark for several days along with Avast Mac Security running on your macOS device. Simple mail send&receive is enough.

Email/attachments loading slowing down would be noticeable representation of Gmail starting to throttle imap connections.

Looking forward to your findings.

Best Regards,
Anna Ilinykh
Spark QA Support Engineer
Title: Re: Gmail IMAP throttling when using Avast Mail Shield + Spark email client
Post by: ondrej.kolacek on February 21, 2020, 02:25:48 PM
Hello,
I will contact you via email.
Kind regards,
Ondrej Kolacek
Title: Re: Gmail IMAP throttling when using Avast Mail Shield + Spark email client
Post by: Roger319 on February 22, 2020, 03:25:33 PM
FYI, I experience the same issue with both Spark and the Apple Mail app (on MacBook, iPad and iPhone). Disabling Web Shield and Email Shield in Avast provides a temporary fix.
Title: Re: Gmail IMAP throttling when using Avast Mail Shield + Spark email client
Post by: ondrej.kolacek on March 04, 2020, 12:57:23 PM
Hello,

we confirm that we have found a bug in Avast Mail Shield which probably causes these problems if Spark is being used as a mail client. We will fix this in the next version (Avast 14.4).

Please if you are experiencing issues, temporarily disable Avast Mail Shield or add your IMAP server to exceptions until the new version gets out.

Thanks to the OP for notifying us about the problem.

We apologise for the problem and for the inconvenience.

Kind regards,
Ondrej Kolacek
Title: Re: Gmail IMAP throttling when using Avast Mail Shield + Spark email client
Post by: Andrew778 on June 02, 2021, 09:41:04 PM
I am experiencing this exact behavior with both my personal Gmail account and my work Google account using Avast 14.8 and MacOS 11.4