Date: Sat, 14 Feb 2015 08:16:03 +1300 From: Andrew Thompson <thompsa@FreeBSD.org> To: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= <roger.pau@citrix.com> Cc: freebsd-xen@freebsd.org Subject: Re: xenstore memory issue Message-ID: <CAFAOGNRAR6ybi884UGEpX=j7NaGRxvhWbdaRUD-nqi%2B8PjYNwA@mail.gmail.com> In-Reply-To: <54DE26DB.90000@citrix.com> References: <CAFAOGNTCJsXr0VOUHAtFoPvQO5VWSUvL_VKkxYoaCtrZdC6zUg@mail.gmail.com> <54D88BD5.7050703@citrix.com> <CAFAOGNTqMOF=wK79PzoOV8d8Qh-4CkHPs4rxy9gmfBEbQ9-CfA@mail.gmail.com> <CAFAOGNR6u3O9WhG0tjey-7thKTM8HXweK2vn4TJRLvE7OezF%2BA@mail.gmail.com> <54DA303F.9020203@citrix.com> <CAFAOGNS6w1uy6OUOXEohZH29b8X07rZc83%2B6O7fUA=SDn1VveQ@mail.gmail.com> <54DE26DB.90000@citrix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 14 February 2015 at 05:31, Roger Pau Monn=C3=A9 <roger.pau@citrix.com> w= rote: > El 13/02/15 a les 0.46, Andrew Thompson ha escrit: > > On 11 February 2015 at 05:22, Roger Pau Monn=C3=A9 <roger.pau@citrix.co= m> > wrote: > > > >> Hello Andrew, > >> > >> El 10/02/15 a les 10.22, Andrew Thompson ha escrit: > >>> On 10 February 2015 at 16:25, Andrew Thompson <thompsa@freebsd.org> > >> wrote: > >>> > >>>> On 9 February 2015 at 23:28, Roger Pau Monn=C3=A9 <roger.pau@citrix.= com> > >> wrote: > >>>> A bit of trial and error with dtrace has narrowed this down. I can > cause > >>>> the leak by just opening /dev/xen/xenstore > >> > >> Thanks for doing all this legwork! IMHO the best solution is to switch > >> xenstore dev to use cdevpriv in order to store each client data. What = we > >> are doing right now (storing client data in dev->si_dvr1) is plain > >> wrong. I've uploaded two patches (one for HEAD and one for stable/10) = so > >> that you can try it also, please report back whether this fixes your > >> problem or not: > >> > >> https://people.freebsd.org/~royger/xenstore_fix/ > >> > >> > > I have tested this on 10.0 and it does fix the issue. After 36000 > > allocations there are just 6 active at 13K > > > > xenstore 6 13K - 36699 16,32,64,128,256,512 > > > > > > I looked in to why this only affected one of my many VMs as they run > > xe-update-guest-attrs and nova-agent which should have triggered the > leak. > > They are all stuck on xsdread when reading from the xenstore so the > update > > loop has stopped. > > > > UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIM= E > > COMMAND > > 0 13250 13249 0 20 0 16552 1968 xsdread S - 5:57.6= 0 > > /usr/local/bin/xenstore-read domid (xenstore) > > Is this with my patch applied? AFAICT xsdread means it's waiting on the > address at dev->si_drv1, which is completely wrong because every time > the device was opened this address changed. With my patch applied it > should no longer be an issue. > > No, I was looking at the other unpatched servers, I didnt realise the two issues were linked. Please commit! cheers, Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFAOGNRAR6ybi884UGEpX=j7NaGRxvhWbdaRUD-nqi%2B8PjYNwA>