在 2021/2/10 23:59, Burakov, Anatoly 写道:
On 04-Feb-21 11:47 AM, oulijun wrote:
Hi,
Sorry your questions are quite confused.
Please start explaining what is the problem you are trying to solve.
Start the master and slave processes at the same time, and then run
the kill -9 command to kill the slave processes.
The slave process should call rte_eal_cleanup to release resources.
But I find that there is no release from the process,
and I think there is a resource leak.
To add to others, not only there will be a resource leak whenever you're
killing processes with SIGKILL, the cleanup is up to individual
applications to perform. It is not the responsibility of the DPDK
library itself to install signal handlers and handle SIGINT or others.
So, if the application leaks resources, it's up to the application to
catch termination signals and clean up after itself. Unfortunately,
there's also no way to recover any leaked memory that has gone out this
way: there is no garbage collection or any similar mechanism in DPDK.
Therefore, while primary-secondary process model is slightly more
resilient than single-process model, there are no mechanisms to reclaim
memory from a crashed process, and crashing secondary process still
leads to undefined behavior.
For example, a crashing secondary process may crash while holding a
lock, and there's no way to release the lock without reinitializing the
lock (which often means restart). The secondary process may also crash
while processing buffers, and those in-flight buffers will be lost.
There's nothing we can do about it, at least for now.
Thank you very much for your response.