You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* dagger fix: avoid leaking whole state/job with session.Group
Passing solver.state around as a session.Group results in the
solver.state being stored in cache refs, which makes cache ref memory
leaks significantly worse.
Signed-off-by: Erik Sipsma <[email protected]>
* rm SetFinalizer usage as it makes memory unfreeable
Based on testing, each of the three usages of SetFinalizer in buildkit
are broken in that they make the memory unfreeable.
Most likely this is somehow related to cyclic data structures, but
SetFinalizer is very tricky to use correctly so could be something else.
Either way, you can empirically see their usage results in unfreeable
memory by looking at the heap.alloc.garbage metric when running
`viewcore breakdown`. That metric indicates memory in the heap that's
not referenced but has not been released.
With the SetFinalizers in place, the garbage accumulates to over a GB
when running TestModule for a few mins. It never goes down even with
manual GC triggers and GOMEMLIMIT settings that force the GC to free as
much memory as it can.
Removing any one of the SetFinalizers reduces that garbage metric by a
few hundred MBs, but removing all of them reduces it down to negligible
levels.
Signed-off-by: Erik Sipsma <[email protected]>
---------
Signed-off-by: Erik Sipsma <[email protected]>
0 commit comments