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:
- 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 )
- Add any Gmail/G Suite account
- 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