From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C5CCA0350; Tue, 5 May 2020 20:35:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B80B91D6AD; Tue, 5 May 2020 20:35:37 +0200 (CEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by dpdk.org (Postfix) with ESMTP id 3083D1D687; Tue, 5 May 2020 20:35:36 +0200 (CEST) X-Originating-IP: 86.246.31.132 Received: from u256.net (lfbn-idf2-1-566-132.w86-246.abo.wanadoo.fr [86.246.31.132]) (Authenticated sender: grive@u256.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id A2E6860008; Tue, 5 May 2020 18:35:33 +0000 (UTC) Date: Tue, 5 May 2020 20:35:27 +0200 From: =?utf-8?Q?Ga=C3=ABtan?= Rivet To: Ali Alnubani Cc: Ferruh Yigit , wangyunjian , "dev@dpdk.org" , "jerry.lilijun@huawei.com" , "xudingke@huawei.com" , "stable@dpdk.org" , Raslan Darawsheh Message-ID: <20200505183527.cyif3fanwylcsnv7@u256.net> References: <1587984259-18296-1-git-send-email-wangyunjian@huawei.com> <20200427111210.7pm3rkifd2zcrxjo@u256.net> <2c742d0c-1478-5fc8-cf7a-ffaa81b592f6@intel.com> <20200504162002.2das2dx4tad5krqn@u256.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/failsafe: fix fd leak X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" On 05/05/20 09:14 +0000, Ali Alnubani wrote: > > -----Original Message----- > > From: Gaëtan Rivet > > Sent: Monday, May 4, 2020 7:22 PM > > To: Ali Alnubani > > Cc: Ferruh Yigit ; wangyunjian > > ; dev@dpdk.org; jerry.lilijun@huawei.com; > > xudingke@huawei.com; stable@dpdk.org; Raslan Darawsheh > > > > Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/failsafe: fix fd leak > > > > On 03/05/20 11:33 +0000, Ali Alnubani wrote: > > > Hi, > > > > > > > -----Original Message----- > > > > From: dev On Behalf Of Ferruh Yigit > > > > Sent: Monday, April 27, 2020 7:56 PM > > > > To: Gaëtan Rivet ; wangyunjian > > > > > > > > Cc: dev@dpdk.org; jerry.lilijun@huawei.com; xudingke@huawei.com; > > > > stable@dpdk.org > > > > Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/failsafe: fix fd > > > > leak > > > > > > > > On 4/27/2020 12:12 PM, Gaëtan Rivet wrote: > > > > > On 27/04/20 18:44 +0800, wangyunjian wrote: > > > > >> From: Yunjian Wang > > > > >> > > > > >> Zero is a valid fd. The fd won't be closed thus leading fd leak, > > > > >> when it is zero. > > > > >> > > > > >> Fixes: f234e5bd996d ("net/failsafe: register slaves Rx > > > > >> interrupts") > > > > >> Fixes: 9e0360aebf23 ("net/failsafe: register as Rx interrupt > > > > >> mode") > > > > >> Cc: stable@dpdk.org > > > > >> > > > > > > > > > > Hello Yunjian, > > > > > > > > > > Nothing prevents a DPDK app from closing 0 and getting it from > > > > > another call, good catch. > > > > > > > > > >> Signed-off-by: Yunjian Wang > > > > > > > > > > Acked-by: Gaetan Rivet > > > > > > > > Applied to dpdk-next-net/master, thanks. > > > > > > This patch is causing Testpmd to quit when I issue a "port stop" command. > > Testpmd log: > > > > > > """ > > > x86_64-native-linuxapp-gcc/build/app/test-pmd/testpmd -n 4 -- -i > > > --forward-mode=mac > > > EAL: Detected 8 lcore(s) > > > EAL: Detected 1 NUMA nodes > > > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket > > > EAL: Selected IOVA mode 'PA' > > > EAL: No available hugepages reported in hugepages-1048576kB > > > EAL: Probing VFIO support... > > > EAL: PCI device 0002:00:02.0 on NUMA socket 0 > > > EAL: probe driver: 15b3:1004 net_mlx4 > > > Interactive-mode selected > > > Set mac packet forwarding mode > > > Warning: NUMA should be configured manually by using --port-numa-config > > and --ring-numa-config parameters along with --numa. > > > testpmd: create a new mbuf pool : n=203456, > > > size=2176, socket=0 > > > testpmd: preferred mempool ops selected: ring_mp_mc > > > > > > Warning! port-topology=paired and odd forward ports number, the last port > > will pair with itself. > > > > > > Configuring Port 1 (socket 0) > > > Port 1: 00:15:5D:26:2B:00 > > > Checking link statuses... > > > Done > > > testpmd> port stop 1 > > > Stopping ports... > > > Checking link statuses... > > > Done > > > testpmd> > > > Stopping port 1... > > > Stopping ports... > > > Done > > > > > > Shutting down port 1... > > > Closing ports... > > > Done > > > > > > Bye... > > > """ > > > > > > My terminal gets broken at this point, and I have to reinitialize it with a > > "reset". > > > > > > - Ali > > > > Hi Ali, > > > > Thanks for the report, I am looking into it. > > > > Are you testing failsafe on Azure? > > This reproduces with Failsafe, but not necessarily on Azure. You can try to reproduce on any platform if you pass something like '-w 00:00.0 --vdev="net_failsafe0,dev(0000:08:00.0)"'. > Hi, Indeed, I am able to reproduce the issue using this command: bash> ./build/app/dpdk-testpmd -n4 -m 4096 --no-huge --vdev='net_failsafe0,dev(net_ring0)' -- -i (no need of PCI bus nor hugepages to validate failsafe sometimes). I was asking about Azure because you did not give the command line options for fail-safe, so I assumed it had been probed automagically. I made a fix, will send soon. Regards, -- Gaëtan