From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0076.outbound.protection.outlook.com [104.47.0.76]) by dpdk.org (Postfix) with ESMTP id F196769FB for ; Fri, 19 Aug 2016 08:10:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Z0jgizVaHKGy59uvQPExHLHy8SFzhPbDtFiH4UcE5Xk=; b=eN/5AW+NBaKILJpH01ERnq93QYU5dIg/7r36lOshjkp92ZXLG0R7yFLU6UPzgER0bxmLq2s2Nl/o+fbydMwnJX2NdgE5PsY5PJNAYma0r4G5v+3xF4GhbwsRnIzT04bf3kJXEDS+08zE7QWEb7wrzzIIMmLekV1RMLRcz9qB3Cc= Received: from DB5PR0401MB2054.eurprd04.prod.outlook.com (10.166.11.137) by DB5PR0401MB2056.eurprd04.prod.outlook.com (10.166.11.139) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.2; Fri, 19 Aug 2016 06:10:01 +0000 Received: from DB5PR0401MB2054.eurprd04.prod.outlook.com ([10.166.11.137]) by DB5PR0401MB2054.eurprd04.prod.outlook.com ([10.166.11.137]) with mapi id 15.01.0599.001; Fri, 19 Aug 2016 06:10:01 +0000 From: Shreyansh Jain To: "martin_curran-gray@keysight.com" , "users@dpdk.org" Thread-Topic: segfault with dpdk 16.07 in rte_mempool_populate_phys Thread-Index: AdH4kORR/4kmue64QRuvda8Df4kUXwBTgvEA Date: Fri, 19 Aug 2016 06:10:01 +0000 Message-ID: References: <22C95CA62CBADB498D32A348F0F073BC20AE2583@wcosexch02k.cos.is.keysight.com> In-Reply-To: <22C95CA62CBADB498D32A348F0F073BC20AE2583@wcosexch02k.cos.is.keysight.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; x-originating-ip: [192.88.169.1] x-ms-office365-filtering-correlation-id: aac015ea-7377-4ba9-e530-08d3c7f774c8 x-microsoft-exchange-diagnostics: 1; DB5PR0401MB2056; 6:Ek7CHlHBRULWtJMk0G8GqXPokp8yEEhBMbAP6BgxPkw2MHtdZfeuC3GqI+lczKPRsFZ+N74DIemump7EXTNcXze0Tv+l3/BGSNix0uzEcjKLeGs3z+k51D58id8WfehF56Yv2muzecUlyOAhb8OFDyco+8ZID26t0oDzbdSl6KAVxBL+LsG7P0IAlJ8z8x3i8joG38w6vZdPFWIivw8bGDs4JRB9u5W4Q0aam1lvvx+DP3HYSu91BMfUEqvVwOkksvRSLCyWnxbEZKZ1XzHvBOrNho/TyEG5MUko5/I9WlqzCGACPY6d/+kQHgnOEqVzJ+PUnC0RPCVnRvZ/nLZ8Gw==; 5:gTZN26mnlnNQR2JyW28I7RICsa24Dl1Op3E/s59Jl0JiYqFaVenbXv6/2NwadTonzgu5jJc1YSSuhoLxvufnJFFKgS2uJe1h8APHtFuhQXLAbN9sF2mOadSauAfDBxynzJYePOUNAAGdYbcGy3YNHg==; 24:lJEZUEWpJqmYefLIIwzIguFBHN9eoneioHMcgskXHjjErFdrWOnW7V2piAWJqXhsm4g8TV3WpERfk8/F6dpD+mNeuPDif0CnoespCkmn29w=; 7:ac20kt6aywHOylGNci8WSjid0lO24rbB68Hhcz2H8t0fqxCBhtEIQqxjl9oJQE8NJ9Icy2y8eQty3xo96oUXz3jHnHRMcNt0h7SNmfDa35ICBmPxIb2uNnBJen6FmX5EsbRIa8ZGiL5DV485Zr6OCeq5qIO3Jv+2bXYIy4X2Q1sJJbH1xA5Weev+q3dGjojywXi/ahPhvaMKWUwQGVud/8MDa/EKNDl1BtvhZLaOSaE8k9e/SQ8sa06cLtb5b4Vh x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR0401MB2056; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:DB5PR0401MB2056; BCL:0; PCL:0; RULEID:; SRVR:DB5PR0401MB2056; x-forefront-prvs: 0039C6E5C5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(6009001)(7916002)(189002)(13464003)(199003)(51884002)(53754006)(377454003)(2501003)(8936002)(10400500002)(105586002)(101416001)(586003)(68736007)(7696003)(7736002)(9686002)(7846002)(92566002)(19580405001)(86362001)(107886002)(189998001)(66066001)(33656002)(2906002)(87936001)(77096005)(81166006)(97736004)(122556002)(54356999)(50986999)(5001770100001)(76176999)(6116002)(102836003)(3280700002)(5002640100001)(3846002)(106356001)(2900100001)(5890100001)(3660700001)(8676002)(11100500001)(74316002)(81156014)(76576001)(19580395003)(2950100001)(305945005)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR0401MB2056; H:DB5PR0401MB2054.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Aug 2016 06:10:01.7852 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0401MB2056 Subject: Re: [dpdk-users] segfault with dpdk 16.07 in rte_mempool_populate_phys X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2016 06:10:04 -0000 Hi Martin, > -----Original Message----- > From: users [mailto:users-bounces@dpdk.org] On Behalf Of martin_curran- > gray@keysight.com > Sent: Wednesday, August 17, 2016 8:34 PM > To: users@dpdk.org > Subject: [dpdk-users] segfault with dpdk 16.07 in rte_mempool_populate_ph= ys >=20 > Hi All, >=20 > Trying to move an application from 2.2.0 to 16.07 >=20 > Tested out l2fwd in 16.7 , quite happy with that ( in fact very happy wit= h > the performance improvement I measure over 2.2.0 ) >=20 > But now trying to get our app moved over, and coming un-stuck. >=20 > As well as the main packet mbuf pools etc, our app has a little pool for > error messages >=20 > When that is created with "rte_mempool_create" I get a segmentation fault > from rte_mempool_populate_phys >=20 > It seems I have nothing valid for this call in rte_mempool.c to work with >=20 > ret =3D rte_mempool_ops_alloc(mp); >=20 > I can see in the user guide in section 5.5 it talks about Mempool Handler= s, > and new API to do with rte_mempool_create_empty and > rte_mempool_set_ops_byname Indeed there are changes to the mempool allocation system. 16.07 includes s= upport for pluggable pool handlers. But, it should not matter to you if you are directly calling mempool_create= (with flags=3D0) because default handler "ring_mp_mc" would be attached to= your Pool. You can read more about how ring_mp_mc behaves in rte_mempool_ring.c. >=20 > But the code of rte_mempool _create seems to call rte_mempool_create_emp= ty > and rte_mempool_set_ops_byname As you are passing flags=3D0, I am assuming it would fall back to default h= andler - ring_mp_mc (multi-consumer/multi-producer). >=20 > Then it calls the mp_init before the rte_mempool_populate_default, down = in > which the call to rte_mempool_populate_phys eventually cores >=20 > I've tried building and running the ip_reassembly example program, and I = can > see that is uses rte_mempool_create in a similar, although admittedly > slightly different fashion. > it has flags set as MEMPOOL_F_SP_PUT | MEMPOOL_F_SC_GET where as I have= 0 > but the code in rte_mempool_create uses the flags to call the set_ops_by_= name > slightly differently depending on what flags you have. The value of flags would depend on the way you use the mempool: Single/Mult= iple producer, or Single/Multiple consumers. [For rte_mempool_create and de= fault available handlers]. But, flags=3D0 should still be safe bet AFAIK. >=20 > I tried changing my app to use the same parameters in the rte_mempool_cre= ate > call as the example program, but I still get a segmentation fault >=20 > Is there something else I'm missing?? Somehow I feel that the problem is not with flags but probably there is not= enough memory available because of which rte_memzone_reserve_aligned might= have failed. But, I am not sure. >=20 > I looked through the ip_reassembly program, but couldn't see it making an= y > extra calls to do anything to the pool before the create is called? >=20 > Any help gratefully received >=20 > Program terminated with signal 11, Segmentation fault. > #0 0x0000000000000000 in ?? () >=20 > #0 0x0000000000000000 in ?? () > #1 0x00007f9fa586cdde in rte_mempool_populate_phys (mp=3D0x7f9f9485dd00, > vaddr=3D0x7f9f9485d2c0
, > paddr=3D8995066560, len=3D2560, > free_cb=3D0x7f9fa586cbe0 , > opaque=3D0x7f9fb40e4cb4) > at /root/######/dpdk-16.07/lib/librte_mempool/rte_mempool.c:363 > #2 0x00007f9fa586da4a in rte_mempool_populate_default (mp=3D0x7f9f9485dd= 00) > at /root/######/dpdk-16.07/lib/librte_mempool/rte_mempool.c:583 > #3 0x00007f9fa586dd49 in rte_mempool_create (name=3D0x7f9fa588fb56 "Erro= r Ind > Mempool", n=3D, > elt_size=3D256, cache_size=3D, private_data_size= =3D optimized out>, > mp_init=3D0x7f9fa586c2b0 , mp_init_arg=3D0x0, > obj_init=3D0x7f9fa586c1c0 , > obj_init_arg=3D0x0, socket_id=3D-1, flags=3D0) at /root/######/dpdk- > 16.07/lib/librte_mempool/rte_mempool.c:909 Would it be possible for you to paste the application startup logs? It migh= t give us some more hints. >=20 >=20 >=20 > Thanks >=20 > Martin >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 > Martin Curran-Gray > HW/FPGA/SW Engineer > Keysight Technologies UK Ltd - Shreyansh