Closed Darkness4 closed 2 weeks ago
Issue is being traced with Pyroscope (release v1.8.0-alpha.1).
Memory leaks were found at the wrapper function: calling cstr = C.CString(gostr)
without calling C.free(unsafe.Pointer(cstr))
. Fix in commit c8dc8bc533571721507dfec1fc186513e7045f05.
This only proves "slight" memory leakage, but not the big memory chunk seen in the screenshot.
Profiling report:
Container memory usage
Goroutines
Alloc objects
Alloc space
Inuse objects
Inuse space
CPU usage via pprof
Overshooting of the limit could be cause be GC cache + mem leak. Closing until further proof.
Memory leak without free found (dts_offset). Fixed via arena allocation (https://github.com/Darkness4/fc2-live-dl-go/commit/17972632547105566c6fb39fc3d1f4840ed5b8ad)
Could be memory cache, files are all heathy. Difficult to replicate.
Logs:
Update:
Memory cleared itself after memory dumping.
The program became unhealthy and kubernetes decided to kill it.