From owner-freebsd-stable@FreeBSD.ORG Wed Nov 3 16:26:03 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 838BE16A4CE for ; Wed, 3 Nov 2004 16:26:03 +0000 (GMT) Received: from park.rambler.ru (park.rambler.ru [81.19.64.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C68E43D54 for ; Wed, 3 Nov 2004 16:26:02 +0000 (GMT) (envelope-from is@rambler-co.ru) Received: from is.park.rambler.ru (is.park.rambler.ru [81.19.64.102]) by park.rambler.ru (8.12.6/8.12.6) with ESMTP id iA3GPjis019192; Wed, 3 Nov 2004 19:25:45 +0300 (MSK) (envelope-from is@rambler-co.ru) Date: Wed, 3 Nov 2004 19:25:45 +0300 (MSK) From: Igor Sysoev X-X-Sender: is@is.park.rambler.ru To: Uwe Doering In-Reply-To: <4168578F.7060706@geminix.org> Message-ID: <20041103191641.K63546@is.park.rambler.ru> References: <4168578F.7060706@geminix.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: stable@freebsd.org Subject: Re: vnode_pager_putpages errors and DOS? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2004 16:26:03 -0000 On Sat, 9 Oct 2004, Uwe Doering wrote: > Robert Watson wrote: > > On Fri, 8 Oct 2004, Steve Shorter wrote: > > > >>> I have some machines that run customers cgi stuff. > >>>These machines have started to hang and become unresponsive. > >>>At first I thought it was a hardware issue, but I discovered in > >>>a cyclades log the following stuff that got logged to the > >>>console which explains the cause of the system hangs/failures. > >>> > >>>vnode_pager_putpages: residual I/O 65536 at 347 > >>>vnode_pager_putpages: I/O error 28] > >>>vnode_pager_putpages: residual I/O 65536 at 285] > >> > >> Aha! also at the same time I get in syslog > >> > >> /kernel: pid 6 (syncer), uid 0 on /chroot/tmp: file system full > >> > >> Whats happening? Can a full filesystem bring the thing down? > >>Ideas? Fixes? > > > > Ideally not, but many UNIX programs respond poorly to being out of memory > > and disk space ("No space, wot?"). Are you using a swap file, and if so, > > how did you create the swapfile? Are you using sparse files much? > > I wonder whether the unresponsiveness is actually just the result of the > kernel spending most of the time in printf(), generating warning > messages. vnode_pager_generic_putpages() doesn't return any error in > case of a write failure, so the caller (syncer in this case) isn't aware > that the paging out failed, that is, it is supposed to carry on as if > nothing happened. > > So how about limiting the number of warnings to one per second? UFS has > similar code in order to curb "file system full" and the like. Please > consider trying the attached patch, which applies cleanly to 4-STABLE. > It won't make the actual application causing these errors any happier, > but it may eliminate the DoS aspect of the issue. I have just tried your patch. To test I ran the program from http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/67919 The patch allows me to login on machine while the system reports about "vnode_pager_putpages: I/O error 28". However, the file system access is very limited and after some time the system became unresponsible. Igor Sysoev http://sysoev.ru/en/