From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 2726611C5 for ; Mon, 13 Jun 2016 10:46:21 +0200 (CEST) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bCNXx-0007jr-5p; Mon, 13 Jun 2016 10:48:38 +0200 To: "Ding, HengX" References: <6EBE0505FB6FBE47AB60080228528452519690E7@CDSMSX101.ccr.corp.intel.com> Cc: "Xu, Qian Q" , "dev@dpdk.org" From: Olivier Matz Message-ID: <575E72D4.7010104@6wind.com> Date: Mon, 13 Jun 2016 10:46:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 In-Reply-To: <6EBE0505FB6FBE47AB60080228528452519690E7@CDSMSX101.ccr.corp.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] run ip_fragmentation with cores in different socket will cause core dump X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 08:46:21 -0000 Hi, On 06/13/2016 09:41 AM, Ding, HengX wrote: > The following command will cause ip_fragmentation app fail: > examples/ip_fragmentation/build/ip_fragmentation -c 0x40002 -n 4 -- -p 0x3 -q 2 > while setting core mask to 0x2 or 0x40000 will not cause this issue. > > error message is shown below: > > EAL: Not managed by a supported kernel driver, skipped > IP_FRAG: Creating direct mempool on socket 0 > IP_FRAG: Creating indirect mempool on socket 0 > IP_FRAG: Creating LPM table on socket 0 > IP_FRAG: Creating LPM6 table on socket 0 > IP_FRAG: Creating direct mempool on socket 1 > IP_FRAG: Creating indirect mempool on socket 1 > IP_FRAG: Creating LPM table on socket 1 > IP_FRAG: Creating LPM6 table on socket 1 > IP_FRAG: Cannot create LPM table > PANIC in main(): > Cannot initialize memory structures! > 5: [examples/ip_fragmentation/build/ip_fragmentation() [0x42df85]] > 4: [/lib64/libc.so.6(__libc_start_main+0xf5) [0x3a8a421d65]] > 3: [examples/ip_fragmentation/build/ip_fragmentation() [0x42d163]] > 2: [examples/ip_fragmentation/build/ip_fragmentation(__rte_panic+0xc9) [0x426c0c]] > 1: [examples/ip_fragmentation/build/ip_fragmentation(rte_dump_stack+0x1a) [0x4980aa]] > Aborted (core dumped) > > And the bisect result: > > f82f705b635d31a63446a16bc4526dbebf293c5a is the first bad commit > commit f82f705b635d31a63446a16bc4526dbebf293c5a > Author: Olivier Matz > Date: Wed Apr 6 15:27:58 2016 +0200 > > lpm: fix allocation of an existing object > > Change rte_lpm*_create() functions to return NULL and set rte_errno to > EEXIST when the object name already exists. This is the behavior > described in the API documentation in the header file. > > These functions were returning a pointer to the existing object in that > case, but it is a problem as the caller did not know if the object had > to be freed or not. > > Doing this change also makes the lpm API more consistent with the other > APIs (mempool, rings, ...). > > Fixes: 916e4f4f4e ("memory: fix for multi process support") > > Signed-off-by: Olivier Matz > Acked-by: Pablo de Lara >>From what I see, the ip_fragmentation example does not check if a lpm table already exists before creating it. I'll send a patch to fix this, and also check if other applications examples are impacted. Thanks for reporting. Regards, Olivier