From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: Memory leak when adding/removing vhost_user ports Date: Mon, 18 Apr 2016 10:46:50 -0700 Message-ID: <20160418174650.GD2576@yliu-dev.sh.intel.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev , Daniele Di Proietto To: Christian Ehrhardt Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 9767B3978 for ; Mon, 18 Apr 2016 19:45:54 +0200 (CEST) Content-Disposition: inline In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Apr 18, 2016 at 07:18:05PM +0200, Christian Ehrhardt wrote: > I assume there is a leak somewhere on adding/removing vhost_user ports. > Although it could also be "only" a fragmentation issue. > > Reproduction is easy: > I set up a pair of nicely working OVS-DPDK connected KVM Guests. > Then in a loop I > - add up to more 512 ports > - test connectivity between the two guests > - remove up to 512 ports > > Depending on memory and the amount of multiqueue/rxq I use it seems to > slightly change when exactly it breaks. But for my default setup of 4 > queues and 5G Hugepages initialized by DPDK it always breaks at the sixth > iteration. > Here a link to the stack trace indicating a memory shortage (TBC): > https://launchpadlibrarian.net/253916410/apport-retrace.log > > Known Todos: > - I want to track it down more, and will try to come up with a non > openvswitch based looping testcase that might show it as well to simplify > debugging. > - in use were Openvswitch-dpdk 2.5 and DPDK 2.2; Retest with DPDK 16.04 and > Openvswitch master is planned. > > I will go on debugging this and let you know, but I wanted to give a heads > up to everyone. Thanks for the report. > In case this is a known issue for some of you please let me know. Yeah, it might be. I'm wondering that virtio_net struct is not freed. It will be freed only (if I'm not mistaken) when guest quits, by far. BTW, could you dump the ovs-dpdk log? --yliu