OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Possible Memory Corruption?

From: Abel Talaveron (abelteya.com)
Date: Fri Jan 21 2005 - 02:32:00 CST


> Very recently I had a similar problem (not sure if the box was ping-able
> though). Mine was about a bad RAM, HD was fine. To test the RAMs I used
> Memtest-86.
> http://www.memtest86.com/
> But it might take too long to test that much RAM as you have.
> (Btw, a word of caution: as Memtest-86 documentation mentions, memory test
> failures do not necessary mean that there is something wrong with the RAM,
> it may be something else.)
>
> ----- Original Message -----
> From: "Alex Kirk" <alexschnarff.com>
> To: <miscopenbsd.org>
> Sent: Thursday, January 20, 2005 9:38 PM
> Subject: Re: Possible Memory Corruption?
>
>
> Nick,
>
> It would be very surprising indeed to see my system totally running out of
> memory, given that I've got 256MB of RAM + 256MB of swap on a machine that
> doesn't ever see 25 simultaneous users (unless you count people requesting
> a
> web
> page, perhaps). Still, what you're saying makes sense, and it fits with
> the
> "resource shortage" messages out of syslog.
>
> It certainly can't hurt to add more swap, and I think I have a spare
> memory
> stick I can throw into the thing. Hopefully that fixes things.
>
> Meanwhile, if anyone else has any thoughts on this, I'm all ears -- just
> in
> case
> there may be some other cause.
>
> Alex Kirk
>
>> I don't believe a panicked box will respond to a ping.
>>
>> HOWEVER, a machine that has used all its RAM+swap will.
>>
>> Might be very interesting to keep an eye on "top".
>> I had a machine do this recently, figured 192M RAM+300M of swap was
>> sufficient for the webmail program, until 25 students tried to change
>> their PW at the same time. First hour, it froze up much as you
>> described: responds to ping, not much else. Rebooted it, watched top,
>> and didn't see a problem 'till suddenly swap started getting chewed very
>> rapidly. As I'm franticly trying to add a "swap to file" file to the
>> thing, the teacher called me and said "it's getting really slow!", and
>> we were at 250M of 300M of swap in use. "tell the kids to STOP DOING
>> ANYTHING!". Got another 500M of swap in place a minute later and
>> another 128M of RAM in the server that afternoon, and they've been happy
>> ever since (just that "this is your webmail system" introduction is a
>> killer, apparently).
>>
>> Might even be good to toss a lot more swap in the thing, to see if it
>> settles it down. Unfortunately, I don't know of a way to find out what
>> the historic maximum swap used was, so if a non-but-near-critical event
>> happens while you aren't looking, you won't know much, but if you have
>> an app leaking RAM, you will see it.
>>
>> Nick.
>> --
>> http://www.holland-consulting.net
>
>
>

I'm not sure if this could help you but maybe....

I'm running OpenBSD 3.6 GENERIC and I have added/edited 5 lines in my
GENERIC:

option RAMDISK_HOOKS # enable mini root hooks
option MINIROOTSIZE=14000 # mini root size of 7mb
config bsd root on rd0a swap on rd0b and wd0b
...
pseudo-device rd 1 # ramdisk device driver

These lines are because I'm running a ramdisk kernel. My root device is RAM
and I've only a 128mb Flash attached on my ide bus. My machine has 128mb of
RAM and when I boot the machine I mount a 40mb memory filesystem. So, if I
run top I can see 62mb used of my RAM.

The system is a firewall where is running apache because the firewall is
configured by web.

Well, now the possible help... My system crashes sometimes ( I'm solving
it ) because apache don't understand softlinks and I've some directories
mounted in flash and softlinked and some directories in the root device
(RAM) I have to change the config files and .php files that contain
something about files that are in flash with the real directory as
/mnt/usr/local/apache2/htdocs/