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 CE071A04B8; Tue, 5 May 2020 11:14:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 60B591D513; Tue, 5 May 2020 11:14:30 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80048.outbound.protection.outlook.com [40.107.8.48]) by dpdk.org (Postfix) with ESMTP id 1DDD01C209; Tue, 5 May 2020 11:14:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UM15DpS8IAQhdrRvfeZIeHm7o32uLebMMNnIxC/JozD6va2hXtDoJhhsOYf7pR1n6DNKQrW6uNt7vd0YX98axkH5bql5nLBSwzAqqmFlSeMisiiXGnRHT1hZoml4PjI1DSca5QsZSvFwos9CnE/8Qc3phrun/Vdv4v+qbZgU84evFQesdGaTrsHrL6C3u56V5kqlaq8vLF6NDxXRQ3Fu6C1La1071+NiEtlKUd4J7tbGCpd3BBrqAE9FcHNhhWIM2zf9hWNOym40vnTmUAnVh8bYpCEL7frcT76su5lgz4kjm8pU+/MYi9W8jiYBG7Q64PPpjmDUrFyynZeZTKEjqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A4kmEz0nAUf+9tNhGli6Qb+kSbqvk0nGFOl2BEZ9iww=; b=NhoGmH+pdNCPQ7samZiTpZXgyhD1LTES4VekoIL2IOsB0hhgOjtHMtvj5xZ/1X9svWrOiQhMCg50WunNOTjNiIwbrFlRrWM3fNV5leEfnQ775wgaLCqms8sRFBU1ze1HrhG1b+RPJBWfN6ijIca5+92qz/UoKCELEqgJ4zJtJ2k+FuW7jK/DU1uHza27LxcjYpZzIvqZWLkxOWw2xkgwt2/qUHuhwpXUl4Ol/s4d8jP6zswITyFbqCuWmXCxdZuWnR8I9YTa0N5RcG3wX5IEKonwbLCXEvDyDG4N8bEmpq28u9g50hM3YZjzDdntp6Q5wJC0G+EM//+s2yx7/09eqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A4kmEz0nAUf+9tNhGli6Qb+kSbqvk0nGFOl2BEZ9iww=; b=VROr2mojYeUt/OTuDg4VJXjFxVMpGwnT3C5Ubr6WPKd3q99nqxtCvO5ABWcDW38DqFKt29sr97X128tjN21ZRd2CipiT0diYdETAL0lLBikZo/5BaBgEm4qKNNC/tbsND4k/lmBM35cUsjnGPfb2vLi1exWJ3FCE/bAgnDtoKLE= Received: from AM0PR05MB4401.eurprd05.prod.outlook.com (2603:10a6:208:62::20) by AM0PR05MB4593.eurprd05.prod.outlook.com (2603:10a6:208:ad::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.21; Tue, 5 May 2020 09:14:27 +0000 Received: from AM0PR05MB4401.eurprd05.prod.outlook.com ([fe80::7913:410a:98a6:bec5]) by AM0PR05MB4401.eurprd05.prod.outlook.com ([fe80::7913:410a:98a6:bec5%4]) with mapi id 15.20.2979.025; Tue, 5 May 2020 09:14:27 +0000 From: Ali Alnubani To: =?iso-8859-1?Q?Ga=EBtan_Rivet?= CC: Ferruh Yigit , wangyunjian , "dev@dpdk.org" , "jerry.lilijun@huawei.com" , "xudingke@huawei.com" , "stable@dpdk.org" , Raslan Darawsheh Thread-Topic: [dpdk-dev] [dpdk-stable] [PATCH] net/failsafe: fix fd leak Thread-Index: AQHWHLS+GZ7br3z3TUSuNQl1RwARsKiWNezAgAHxEACAARmzwA== Date: Tue, 5 May 2020 09:14:26 +0000 Message-ID: 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> In-Reply-To: <20200504162002.2das2dx4tad5krqn@u256.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: u256.net; dkim=none (message not signed) header.d=none;u256.net; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [37.76.221.121] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 58610cb7-82ba-4fa5-26b0-08d7f0d4b5d9 x-ms-traffictypediagnostic: AM0PR05MB4593:|AM0PR05MB4593: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3383; x-forefront-prvs: 0394259C80 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FO4mT1PiOHLbFk+2vHv5U1pZtoP/21GHV1X67RWpcVfSJEmonQBbjLEgcnE5Cz+TIAIsCyoNk5CERmrwF8S5p+8aAK8ItXEXu0N8ftMd7a2TuoeqqjT+GHpXQcdw4ddTapvFCUc+Y0IBMU9yL1lfunNx/LJwxLDRaBHpUTMpePz6BvDI4nNVtmVikRUTF0r4MQW1EIoEeUtzjK+cSJLY2XCJZwIwG05V6gbi/J4QIBPxwxh9XdCOQOH5JwMWOakFOAI6NCfATEluvh17cHukss1ym7OEQcY2XrpGQoHD3pcf73f6G7ZtfWL1bmbV7ZKCAqMNK8knvrdpt4YsVoX+UpiFhmW956q3G670hFUht2FzU9jIE6qZkbVBnnkRPo+DETUSqsnMaDXC+DtqTXLkPzjxeLn/K6ZhcC1meEA1y99VPXV8xkJ2DLpLr07aDOqNN+nLtebz5qVYSF0KNRwv9AQrhK4Sydt6vf62Y2hD6kFLZspLPJuEmFI0R04VMfHuDfT4xxYdQCZVLUZtFZR/VA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB4401.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(376002)(396003)(366004)(39860400002)(346002)(33430700001)(4326008)(7696005)(53546011)(6506007)(5660300002)(66574012)(76116006)(52536014)(66556008)(9686003)(66446008)(66946007)(55016002)(107886003)(64756008)(66476007)(6916009)(26005)(71200400001)(186003)(86362001)(478600001)(33656002)(316002)(54906003)(8936002)(33440700001)(2906002)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 6NKHpg8QclcIHK9qKZVa+a/wo5/5ng6sGYl7a7h2jCtgHw1hm11a7GrajPTRBv7erg42mraeP6dZD/x6SxdN+mFCSWC0H+KYlHaHkuepyvNpgukz3HQGk4cl7/GO5YVyv0ZN7cNzgFkeOO3MIP7OwXtf0UBcNAK3Kga8lGHyVi3tDZCPsYzAf98G+QwS+xIhcFftvhfDTAILq8KDNXclKshFxg62N/4ddiiDQF86EWxMbbZxksFqFJg8Lejz00TvQeIc0+jH8vb0FzgC3KxZTM9DoFgIAtZuTpFO3YsLDZeTVgznk9lIqPue3nP6QNvao8aDlx2JMjo6u8cGVt3HUo6uwFH0D0a8epS2HAD4v2L07X84pv6ZTYQkBk+oHBCItsRjbx66doEbdQB79ghhgEp8eI8VMV1QrSCLzYlVRkIyE5qDce1F0L02ozt87YRnLoLtzuet9XJxc12vdWX79YIcP/AyNWhDDZyy1PW3hF1hgDDRtk9DX7tSXL+W9MuznHdRCrKUxV7voSekEa4Axb01N5840Fakc+lBb1UIYuZCSN0aE0hcbuyti5ALxnGsDYsuMt9b+m3VXMSazSTe9fMSgVRGcrPq1H00smMWHEgSluy5ACyMxgYaBN+1mO2SVQPrlobMxVmsrYut6r3ZZj85THGBMhP44q3B+VbWNHCuIOTfM/yot2qRKbOwGyxgq9L4e4HT5Lw6do2PhkV1Ar5P0II9yQ10XnSexgAkOCaEvdFGSfFyZZVf5QP3xzYcnKNI8PMYYyGeYBelWHL0k4aSiAKV/X91oip3Adyx0ks= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58610cb7-82ba-4fa5-26b0-08d7f0d4b5d9 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2020 09:14:26.9645 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: KNlUQ31xY+d7IxxZ8XdNXk2EXIY15rQ69+Wwtez36sG1aWcJxRC/cRwh3aNfUCncnfC2hawO6C/j12P53MUKTA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4593 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" > -----Original Message----- > From: Ga=EBtan 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 >=20 > 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=EBtan 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=EBtan 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" comman= d. > Testpmd log: > > > > """ > > x86_64-native-linuxapp-gcc/build/app/test-pmd/testpmd -n 4 -- -i > > --forward-mode=3Dmac > > 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=3D203456, > > size=3D2176, socket=3D0 > > testpmd: preferred mempool ops selected: ring_mp_mc > > > > Warning! port-topology=3Dpaired 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 wi= th a > "reset". > > > > - Ali >=20 > Hi Ali, >=20 > Thanks for the report, I am looking into it. >=20 > 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=3D= "net_failsafe0,dev(0000:08:00.0)"'. >=20 > I see a segfault currently at startup, so in any case there are fixes to = be > pushed. > I'll see afterward if I need a specific platform to reproduce your bug. >=20 > Regards, > -- > Ga=EBtan Regards, Ali