From owner-freebsd-current@FreeBSD.ORG Mon Jul 2 16:31:50 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B88F8106566B; Mon, 2 Jul 2012 16:31:50 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 51DD18FC16; Mon, 2 Jul 2012 16:31:50 +0000 (UTC) Received: from [192.168.14.142] (unknown [62.49.66.12]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPSA id 3D62B25D3A02; Mon, 2 Jul 2012 16:31:49 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201207021036.45567.jhb@freebsd.org> Date: Mon, 2 Jul 2012 16:31:48 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <7BEE3948-EE35-48C2-B4B1-25E34087A4C4@lists.zabbadoz.net> <201207021036.45567.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) Cc: freebsd-current FreeBSD Subject: Re: swp_pager_meta_build DoS printf X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:31:50 -0000 On 2. Jul 2012, at 14:36 , John Baldwin wrote: > On Sunday, July 01, 2012 8:23:31 am Bjoern A. Zeeb wrote: >> Hey, >>=20 >> hitting this printf in swp_pager_meta_build() >>=20 >> if (uma_zone_exhausted(swap_zone)) { >> printf("swap zone exhausted, increase = kern.maxswzone\n"); >> vm_pageout_oom(VM_OOM_SWAPZ); >> pause("swzonex", 10); >> } else >>=20 >> 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? >>=20 >> /bz >>=20 >> 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. >=20 > 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? /bz --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do!