swp_pager_meta_build DoS printf
John Baldwin
jhb at freebsd.org
Mon Jul 2 15:04:34 UTC 2012
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.
--
John Baldwin
More information about the freebsd-current
mailing list