Replies: 6 comments
-
Good point. |
Beta Was this translation helpful? Give feedback.
-
FWIW, one principled fix would be to outlaw |
Beta Was this translation helpful? Give feedback.
-
The lifetime of |
Beta Was this translation helpful? Give feedback.
-
Is #18145 related to this? |
Beta Was this translation helpful? Give feedback.
-
#18145 (comment) would indicate that it's not since it looks the main leak is something related to the UI. But it's strange how the UI can use enough RAM to trigger an OOM, so maybe there is a little reference somewhere that connects these two threads. |
Beta Was this translation helpful? Give feedback.
-
I think I found a memory leak in BwoB that's not something that's fixable using a band-aid, but is somewhat fundamental.
When BwoB is on, we create a
RemoteActionFileSystem
for each executed action and if one wants to access an input file from Bazel, one has to plumb it throughActionExecutionContext.getPathResolver()
. That then returns aPath
, which can be used to get the metadata of input files or anInputStream
thereof.If a reference to such a
Path
is kept after the action finishes execution:Path
keeps a reference to itsActionFileSystem
ActionFileSystem
keeps a reference to itsActionInputMap
ActionInputMap
keeps a reference to the metadata of every input of the action in questionAnd
ActionInputMap
can be huge.I do know for a fact that we do save
Path
instances in things likeTestAttempt
, but I have no idea if those are transformedPath
s or whether we store suchPath
s anywhere else.We could in theory audit the code, but how nice would it be if we could somehow make it so that this is obviously not an issue.
Beta Was this translation helpful? Give feedback.
All reactions