From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 102CF3F9 for ; Wed, 17 Dec 2014 10:35:43 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 17 Dec 2014 01:35:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,691,1406617200"; d="scan'208";a="500093162" Received: from bricha3-mobl3.ger.corp.intel.com ([10.243.20.28]) by orsmga003.jf.intel.com with SMTP; 17 Dec 2014 01:31:20 -0800 Received: by (sSMTP sendmail emulation); Wed, 17 Dec 2014 09:35:34 +0025 Date: Wed, 17 Dec 2014 09:35:33 +0000 From: Bruce Richardson To: Rick LaMont Message-ID: <20141217093533.GA12400@bricha3-MOBL3> References: <20141217041236.GB15643@www6.g1.pair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141217041236.GB15643@www6.g1.pair.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Segmentation fault in rte_eal_hugepage_attach 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: Wed, 17 Dec 2014 09:35:44 -0000 On Tue, Dec 16, 2014 at 11:12:36PM -0500, Rick LaMont wrote: > My DPDK application works fine when it's the primary process but crashes > whenever --proc-type=secondary. The segmentation fault occurs in this call > to mmap() within rte_eal_hugepage_attach(): > > /* > * fdzero is mmapped to get a contiguous block of virtual > * addresses of the appropriate memseg size. > * use mmap to get identical addresses as the primary process. > */ > base_addr = mmap(mcfg->memseg[s].addr, mcfg->memseg[s].len, > PROT_READ, MAP_PRIVATE | MAP_FIXED, fd_zero, 0); > > I've confirmed that addr and len match the values in rte_eal_hugepage_init() > of the primary process (1 gigabyte). The target platform is a 32-bit embedded > system running a Yocto distribution. I've confirmed that other applications > such as mp_simple work as both primary and secondary on the same platform. > The problem only occurs with a larger application to which I'm adding DPDK > capabilities. > > Any advice on how to troubleshoot this? I've been looking at it for a week > already and am running out of ideas for things to test. > > Thanks, > > > Rick LaMont | The storm that I thought would blow over > Dot C Software, Inc. | Clouds the light of the love that I found Hi, getting multi-process support working on 32-bits is a lot more difficult than with 64-bit due to the reduced addresss space range available. The most likely cause of failure in mapping the memory is that the range requested is already used by another memory mapping in the processes address space. Two possible paths to look at this: 1) examine the /proc//maps file for the secondary process to see what is using the address range and if it's something you can do something about. 2) If you do find a free 1G range inside the secondary process address space, you can try hinting that address to the primary process to see if it can map the memory there, allowing the secondary process to duplicate. [See "base-virtaddr" EAL option] Regards, /Bruce