Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Nov 2000 12:06:28 -0600 (CST)
From:      Ryan Thompson <i@ry.ca>
To:        Nicole <nicole@unixgirl.com>
Cc:        freebsd-isp@FreeBSD.ORG
Subject:   Re: Program keeps crashing server
Message-ID:  <Pine.BSF.4.21.0011131151080.54598-100000@ren.sasknow.com>
In-Reply-To: <XFMail.001108002347.nicole@unixgirl.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <i@ry.ca>
  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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0011131151080.54598-100000>