From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 68A29A0546; Mon, 8 Mar 2021 09:56:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 573BA22A363; Mon, 8 Mar 2021 09:56:37 +0100 (CET) Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by mails.dpdk.org (Postfix) with ESMTP id E250340141 for ; Mon, 8 Mar 2021 09:56:35 +0100 (CET) Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DvBxS0m7jzjWTD; Mon, 8 Mar 2021 16:55:08 +0800 (CST) Received: from [10.78.49.194] (10.78.49.194) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Mon, 8 Mar 2021 16:56:31 +0800 To: "Burakov, Anatoly" , Thomas Monjalon CC: Ferruh Yigit , dev , References: <8270022.kECihOmdav@thomas> <0aacfa1e-2191-c196-ac73-fad99c016aec@huawei.com> From: oulijun Message-ID: Date: Mon, 8 Mar 2021 16:56:31 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.78.49.194] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] =?utf-8?q?=E3=80=90Some_Questions_About_Multi-Process?= =?utf-8?q?_Resource_Cleaning=E3=80=91?= X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" ÔÚ 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.