From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id A01653253 for ; Tue, 18 Jul 2017 18:14:01 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 18 Jul 2017 09:13:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,378,1496127600"; d="scan'208";a="109320233" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.255.138.52]) ([10.255.138.52]) by orsmga004.jf.intel.com with ESMTP; 18 Jul 2017 09:13:56 -0700 To: Herbert Guan , dev@dpdk.org, declan.doherty@intel.com, jianbo.liu@linaro.org References: <1499671222-8283-1-git-send-email-herbert.guan@arm.com> <1499685226-8659-1-git-send-email-herbert.guan@arm.com> From: Ferruh Yigit Message-ID: Date: Tue, 18 Jul 2017 17:13:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1499685226-8659-1-git-send-email-herbert.guan@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] test: Fix memory corruption issues which fails the link_bonding test. 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: , X-List-Received-Date: Tue, 18 Jul 2017 16:14:03 -0000 On 7/10/2017 12:13 PM, Herbert Guan wrote: > Patch V2: fix build warnings by deleting unused variables. > > There were double-free problems in some test cases, which will cause > a duplicated mbuf will be added into mempool. After double-free, > some new allocated mbuf will hold a same address and thus cause the > memory corruption. > > Another minor issue is that in some test cases, allocated mbuf will > not be released after test case exits. Hopefully these leaked mbuf > will be released by the next test case in its setup phase when > stopping the virtual pmd ports, while this do is a memory leak of > the exited test case. > > To fix above 2 issues, this patch will do: > 1) Release virtual pmd ports' tx queue in the clean up function > remove_slaves_and_stop_bonded_device() of each test cases. > 2) Do not release allocated mbufs for test bursts. These mbufs > will be released in remove_slaves_and_stop_bonded_device() when > test case exits. > > Signed-off-by: Herbert Guan Updated unit test causing segfault, before and after patch, am I doing something wrong? I will postpone this patch until unit test can be verified. Thanks, ferruh