From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 30 15:59:35 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 125FC16A404 for ; Tue, 30 Jan 2007 15:59:35 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from sccmmhc92.asp.att.net (sccmmhc92.asp.att.net [204.127.203.212]) by mx1.freebsd.org (Postfix) with ESMTP id D29AA13C467 for ; Tue, 30 Jan 2007 15:59:34 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from [10.0.0.4] (12-216-254-44.client.mchsi.com[12.216.254.44]) by sccmmhc92.asp.att.net (sccmmhc92) with ESMTP id <20070130155933m9200jir1qe>; Tue, 30 Jan 2007 15:59:34 +0000 Message-ID: <45BF6B65.1000105@math.missouri.edu> Date: Tue, 30 Jan 2007 09:59:33 -0600 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.13) Gecko/20070128 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <20070130140227.26613101832@hk2.uwaterloo.ca> <20070130152633.GF19656@dan.emsphone.com> In-Reply-To: <20070130152633.GF19656@dan.emsphone.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: top delay value X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 15:59:35 -0000 Dan Nelson wrote: > In the last episode (Jan 30), waldeck@gmx.de said: > >>An unprivileged user could waste all CPU time by setting a low delay >>value in top (interactive or via -s). > > > Are you sure? In 6.2 at least, "s0" in interactive mode results in a > 1-second delay, and "top -s0" prints > > top: warning: seconds delay should be positive -- using default > .... You can run "top -s0" as root (not that this negates your point in any way). Incidently, this is an excellent way to generate those "calcru going backwards" errors, at least in some recent versions of FreeBSD. Just run a highly threaded, CPU intensive job at the same time. I did this on SMP systems, so I don't know if it also does this on non-SMP systems. On versions of FreeBSD 5.x I was able to induce kernel panics, the likes of which produced useless core dumps, but this seems to have been fixed with more recent versions. Stephen