Date: Wed, 15 Aug 2012 11:21:34 -0400 From: John Baldwin <jhb@freebsd.org> To: Sergey Kandaurov <pluknet@gmail.com> Cc: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>, freebsd-current FreeBSD <freebsd-current@freebsd.org>, des@freebsd.org Subject: Re: swp_pager_meta_build DoS printf Message-ID: <201208151121.34815.jhb@freebsd.org> In-Reply-To: <CAE-mSO%2BXH36yyvSyaHU7bNAzDS___C=zwriAaeT6p6itbbKYNw@mail.gmail.com> References: <7BEE3948-EE35-48C2-B4B1-25E34087A4C4@lists.zabbadoz.net> <B60059D0-9ED8-430D-8D7D-275E4536AC94@lists.zabbadoz.net> <CAE-mSO%2BXH36yyvSyaHU7bNAzDS___C=zwriAaeT6p6itbbKYNw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, August 13, 2012 1:49:38 am Sergey Kandaurov wrote: > On 2 July 2012 20:31, Bjoern A. Zeeb <bzeeb-lists@lists.zabbadoz.net> wrote: > > > > On 2. Jul 2012, at 14:36 , John Baldwin wrote: > > > >> On Sunday, July 01, 2012 8:23:31 am Bjoern A. Zeeb wrote: > >>> Hey, > >>> > >>> hitting this printf in swp_pager_meta_build() > >>> > >>> if (uma_zone_exhausted(swap_zone)) { > >>> printf("swap zone exhausted, increase kern.maxswzone\n"); > >>> vm_pageout_oom(VM_OOM_SWAPZ); > >>> pause("swzonex", 10); > >>> } else > >>> > >>> seems to be an effective way to put the machine into a state of no recovery > >>> unless the memory situation would be able to clear itself. Not that it wouldn't > >>> otherwise be any better but in addition having a couple of tenthousands of these > >>> going to console as well is really not helpful to try to do anything either. Can > >>> we make it a log() call or something? > >>> > >>> /bz > >>> > >>> PS: I am not sure as I have seen it on someone else's machines and it's > >>> probably been ZFS that caused it. I unfortunately neither had a way to > >>> get back in or break to a kernel debugger, so information is sparse. > >> > >> This used to be a silent deadlock before I added the printf() and the call to > >> OOM. :-P Do you just want to ratelimit the printf? We have an API to ratelimit > >> printf's already. > > > > Ratelimit would be fine; I was writing that on the wrong time of the wrong day to > > just get it out; could you do that? > > Hi, looks like the discussion was abandoned. > What about this patch? It enables to ratelimit the printf. > Also, are the new variables put in the right places from the style pov? I think DES has a newer variant of this now? -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208151121.34815.jhb>