From owner-freebsd-isp Mon Nov 13 10: 2:30 2000 Delivered-To: freebsd-isp@freebsd.org Received: from ren.sasknow.com (ren.sasknow.com [207.195.92.131]) by hub.freebsd.org (Postfix) with ESMTP id D46A437B4C5 for ; Mon, 13 Nov 2000 10:02:26 -0800 (PST) Received: from localhost (ryan@localhost) by ren.sasknow.com (8.9.3/8.9.3) with ESMTP id MAA55875; Mon, 13 Nov 2000 12:06:28 -0600 (CST) (envelope-from i@ry.ca) Date: Mon, 13 Nov 2000 12:06:28 -0600 (CST) From: Ryan Thompson X-Sender: ryan@ren.sasknow.com To: Nicole Cc: freebsd-isp@FreeBSD.ORG Subject: Re: Program keeps crashing server In-Reply-To: Message-ID: Organization: SaskNow Technologies [www.sasknow.com] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi Nicole. I haven't seen more than one reply to this , which might not have given you the help you need. I'll take a stab Nicole wrote to freebsd-isp@FreeBSD.ORG: > > Hi All > OK I have a stupid question. > > Q> What allows a program to crash/reboot a server? If the program is running as the superuser, basically "How Do You Want To Crash Today?(TM)" :-) Doesn't sound like it is in your case, but check effective UID/GID to see if it's running with elevated priviliges. If the program has write access to any devices besides tty, etc, it can bring down a system pretty easily. > no swap use. Only that the CPU usage percentage is Very high. Load seems to > stay at ~1.0 Some servers of mine routinely run around 3.0-5.0 and are still very responsive. I've created educational demonstrations that have pushed a FreeBSD 4.1 system into the stratosphere of load averages (500-600) by creating a few thousand processes that sleep() then die ;-) Point being, here, is that load averages are very artifical terms, and are highly relative to the server and the processes that are actually running. > I have a program that I am running to compute apache logs and on many > occasions it will cash the server. It is being run by the apache server > username. I have setup login.conf with process limits. Top running and freezing > at the time of the death does not seem to show excessive memory use. Absolutly So the server CRASHES? You mention crash and freeze in the same breath, here. If if crashes, does it panic, or silently reboot? If it panics, and you can manage to get a core dump, you should turn debugging on in the kernel and trace through the core dump after the system comes back up. If you can't get it to core dump at crash, you MIGHT learn something by starting the program, letting it run for awhile, then calling kill -6 programname to force the process to generate a core file. (Or even forcing a kernel dump) If the system only appears to hang, can you ping it from another box? Can you start a shell and kill the offending process? top(1) isn't always so hot... try writing a program that sits in a loop and outputs process information for your program, and system utilization, to a file every second or so. Use unbuffered IO and call sync so your stats are written out in pseudo-realtime. sleep() for a second or so. > So.. What can I check or monitor? What kind of limits can I use without > strangling the program? > > Any help much appreciatted > > > Thanks! > > Nicole > - Ryan -- Ryan Thompson Network Administrator, Accounts Phone: +1 (306) 664-1161 SaskNow Technologies http://www.sasknow.com #106-380 3120 8th St E Saskatoon, SK S7H 0W2 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message