[erlang-questions] VM leaking memory
Fri Feb 1 06:12:53 CET 2019
The original proxy design was like this:
External TCP Source -> Proxy Process (binary transformation and analysis)
-> External TCP Sink
The current design added a new stage to the proxy by having 2 processes
instead of 1:
External TCP Source -> Proxy Process1 -> Proxy Process2 -> External TCP Sink
Process1 forward the binaries (>64B) to Process2 which also inspects them
(by logging suspicious packets).
I will perform more checks today and report back.
On 01/31, Scott Ribe wrote:
> >> On Jan 31, 2019, at 3:26 PM, Frank Muller <frank.muller.erl@REDACTED>
> >> The refc binary is the one using most of VM’s memory (in GB) compared
> to other allocators (few MB).
> >So, could be the classic leak where you match on a binary and pass a
> sub-binary to another process? That creates a ref to the original binary,
> and if the first process is a long-lived one that doesn't gc often, even
> though the second one finishes, the original binary hangs around...
> Yeah, that's a good bet. I'd check in the new feature where a sub-binary
> of a large binary is taken, and would call `NewBin = binary:copy(Bin)`
> on it to free the ref as early as possible.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions