Please advise how to deal with this. Is this a normal thing for forkproxy process to be alive or should it exit upon creation of a device? LXD version is 4.0.4
forkproxy will stick around so long as the container is running.
Iâm not sure what the defunct child process is about and Iâm not seeing it here on a more recent LXD version, so thereâs a reasonable chance that the upcoming 4.0.5 may fix that for you.
Thanks for confirming. But, is that something we need to worry about? I.e. if they pile up over time can they cause issues with the host or containers? Could the host run out of memory?
We have to run 30+ containers on the host. Each container has to have 3 proxy devices. That will leave 90 forkproxy processes up and running - each having a zombie. We are worried it could drain the memory out or similar.
Could we just kill the forkproxy process with zombie child itself? Weâve noticed there arenât any consequences when we do that, container runs smoothly after that and device is still attached. Or do you have any kind of workaround for this?
Thanks for confirming. But, is that something we need to worry about? I.e. if they pile up over time
Itâs nothing to really worry about but we will obviously fix this!
can they cause issues with the host or containers? Could the host run out of memory?
We have to run 30+ containers on the host. Each container has to have 3 proxy devices. That will leave 90 forkproxy processes up and running - each having a zombie. We are worried it could drain the memory out or similar.
Apart from polluting the process table zombies donât have any negative side effects. Essentially, a zombie is a process that has already exited but itâs exit status hasnât been retrieved by the parent. So the kernel already has released all resources associated with that process but just keeps the task struct around (which is a bit of memory but not all that much). Itâs almost impossible to drain your host of resources because of that. One problem could be that if you were to create an insane amount of zombies you could run out of PID numbers since they arenât recycled. But thatâs unlikely too.
Could we just kill the forkproxy process with zombie child itself? Weâve noticed there arenât any consequences when we do that, container runs smoothly after that and device is still attached. Or do you have any kind of workaround for this?
You sure could do that but killing the forkproxy process would mean no data will be shoveled which Iâd assume is what you would want to use the forkproxy for.
But in any case, the branch I sent should fix the issue you reported and get rid of any zombies.