Forcing a log flush (#25) doesn't resolve the high memory usage (as we'd expect, but worth ruling out).
The state file in #24 looks sane to me; forcing a re-exec of the Session Init does cause the memory to fall to reasonable levels. This almost feels like a compiler bug where __attribute__ ((cleanup())) is failing for some reason.
From info provided by jibel...
Forcing a log flush (#25) doesn't resolve the high memory usage (as we'd expect, but worth ruling out).
The state file in #24 looks sane to me; forcing a re-exec of the Session Init does cause the memory to fall to reasonable levels. This almost feels like a compiler bug where __attribute__ ((cleanup())) is failing for some reason.