Potential Network Extension memory leak

I've been investigating memory consumption issues with a network extension. It seems as though the "leak" exists within the network extension framework. Looking at a memory graph, there appears to be a _socketFlows dictionary or similar in the network extension framework that holds all of the flows and they continue to pile up and consume memory.

The problem seems to be particularly bad when I leave my MacBook plugged in and running over the weekend and come back on Monday.

For instance, in that time period, the memory consumption grew from <100MB to >1GB.

To try to narrow this down to see if it was an "us" problem or truly in the framework, I installed Objective-See Foundation's Lulu tool, which also uses a network extension. It similarly saw memory grow from around 30MB or less to 600MB in the same time frame.

Has anyone else seen this? We do have an open feedback ticket FB18731867 that might be related that has to do with seeing multiple instances of the same data filter provider started and maybe running in a network extension.

Please add an example memory graph file to your bug report.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi Quinn,

I've attached the memgraph to the feedback ticket. I also attached the output from heap, vmmap, and footprint

Thanks!

Well, that’s definitely weird.

I don’t have any good theories as to what’s going on here, but I do have a quick question. From the bug it looks like you have Apple’s application firewall enabled (System Settings > Network > Firewall). Is that right? And, if so, does disabling that change things?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Potential Network Extension memory leak
 
 
Q