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 7E76DA04FD; Tue, 14 Jun 2022 02:33:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B9F54068E; Tue, 14 Jun 2022 02:33:56 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 7FD554067C for ; Tue, 14 Jun 2022 02:33:54 +0200 (CEST) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LMTqZ3hdVzRj8K; Tue, 14 Jun 2022 08:30:34 +0800 (CST) Received: from [127.0.0.1] (10.67.100.224) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 14 Jun 2022 08:33:51 +0800 Subject: Re: [PATCH] eal: fix segment fault when exit trace To: David Marchand , "Richardson, Bruce" CC: Thomas Monjalon , dev , "Burakov, Anatoly" , Jerin Jacob Kollanukkaran References: <20220607120014.49823-1-fengchengwen@huawei.com> <0b9f04f5-6944-85e6-4c91-566476601368@huawei.com> From: fengchengwen Message-ID: Date: Tue, 14 Jun 2022 08:33:51 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.100.224] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected 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 Thansk for your testing, David. On 2022/6/13 22:15, David Marchand wrote: > On Tue, Jun 7, 2022 at 2:26 PM fengchengwen wrote: >> Hi Bruce, >> >> Could you please test freebsd platform? I think it also have >> the same problem, but I hasn't freebsd enviorment. > > I can reproduce a crash with FreeBSD 13. > > Moving rte_trace_save() and co earlier (as is done for Linux in this > proposed patch) avoids the crash, so I can't tell the traces file is > valid. > > dpdk@freebsd:~/dpdk $ git diff > diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c > index a6b20960f2..26fbc91b26 100644 > --- a/lib/eal/freebsd/eal.c > +++ b/lib/eal/freebsd/eal.c > @@ -893,11 +893,11 @@ rte_eal_cleanup(void) > eal_get_internal_configuration(); > rte_service_finalize(); > rte_mp_channel_cleanup(); > + rte_trace_save(); > + eal_trace_fini(); > /* after this point, any DPDK pointers will become dangling */ > rte_eal_memory_detach(); > rte_eal_alarm_cleanup(); > - rte_trace_save(); > - eal_trace_fini(); > eal_cleanup_config(internal_conf); > return 0; > } > >