As of macOS client version 2022.5.310.0 (20220606.16), there appears to be a large memory leak of around 500MB to 1GB a day. I’m not sure whether this is relative to traffic or what, but it seems continuous. I’ve reported this through the app as well, but figured I’d post it here for maximum visibility. This leak also doesn’t go way when restarting the WARP connection.
The app also doesn’t seem to kill the underlying CloudflareWARP process when I quit the menu item, so I have to kill that process to get the memory back.
Investigating further, it appears it’s leaking the SCNetworkReachability
checks. This is rather funny to me since I reported a similar bug many years ago in the OpenDNS DNSCrypt client. This is a small sample of leaks after running for just a few minutes.
leaks Report Version: 4.0
Process 81002: 16832 nodes malloced for 22663 KB
Process 81002: 11305 leaks for 1133072 total leaked bytes.
11305 (1.08M) << TOTAL >>
15 (1.45K) ROOT CYCLE: <SCNetworkReachability 0x10660a9d0> [304]
14 (1.16K) ROOT CYCLE: 0x600000b15b00 [48]
CYCLE BACK TO <SCNetworkReachability 0x10660a9d0> [304]
11 (1.00K) 0x600000516460 [32]
10 (992 bytes) 0x600000b15ef0 [48]
6 (528 bytes) 0x600000516840 [32]
5 (496 bytes) 0x600000b162e0 [48]
1 (304 bytes) <SCNetworkReachability 0x10660a2e0> [304]
2 (112 bytes) 0x600000b16130 [48]
1 (64 bytes) <pthread_mutex_t 0x600001015600> [64]
1 (32 bytes) 0x600000516520 [32]
1 (304 bytes) <SCNetworkReachability 0x10660c590> [304]
2 (112 bytes) 0x600000b163a0 [48]
1 (64 bytes) <pthread_mutex_t 0x600001015d00> [64]
2 (112 bytes) 0x600000b15f50 [48]
1 (64 bytes) <pthread_mutex_t 0x600001015bc0> [64]
15 (1.45K) ROOT CYCLE: <SCNetworkReachability 0x1066228c0> [304]
14 (1.16K) ROOT CYCLE: 0x600000b320d0 [48]
CYCLE BACK TO <SCNetworkReachability 0x1066228c0> [304]
11 (1.00K) 0x60000050cd00 [32]
10 (992 bytes) 0x600000b31ef0 [48]
6 (528 bytes) 0x60000050ce80 [32]
5 (496 bytes) 0x600000b32100 [48]
1 (304 bytes) <SCNetworkReachability 0x106624c40> [304]
2 (112 bytes) 0x600000b31ad0 [48]
1 (64 bytes) <pthread_mutex_t 0x600001036fc0> [64]
1 (32 bytes) 0x60000050cde0 [32]
1 (304 bytes) <SCNetworkReachability 0x106623e60> [304]
2 (112 bytes) 0x600000b32160 [48]
1 (64 bytes) <pthread_mutex_t 0x600001036d00> [64]
2 (112 bytes) 0x600000b31f20 [48]
1 (64 bytes) <pthread_mutex_t 0x600001036b40> [64]