Date: Fri, 13 Feb 2015 17:31:23 +0100 From: =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= <roger.pau@citrix.com> To: Andrew Thompson <thompsa@FreeBSD.org> Cc: freebsd-xen@freebsd.org Subject: Re: xenstore memory issue Message-ID: <54DE26DB.90000@citrix.com> In-Reply-To: <CAFAOGNS6w1uy6OUOXEohZH29b8X07rZc83%2B6O7fUA=SDn1VveQ@mail.gmail.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>
next in thread | previous in thread | raw e-mail | index | archive | help
El 13/02/15 a les 0.46, Andrew Thompson ha escrit: > On 11 February 2015 at 05:22, Roger Pau Monné <roger.pau@citrix.com> 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é <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 TIME > COMMAND > 0 13250 13249 0 20 0 16552 1968 xsdread S - 5:57.60 > /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. Roger.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54DE26DB.90000>