FreeBSD is safer without swap memory !

I have a box running FreeBSD 7.2 with limits procs enable in login.conf and loader.conf.
when I run desktop KDE 4 and make a crash script code like this:
Code:
#!/bin/sh
$0&
kwrite
$0&
$0&
$0&

I exec it, many kwrite windows open, doing then almost to crash and freeze the system, I press ALT + F2, open xterm terminal and do killall kwrite this make system crash and reboot force shutdown.

But when I do swapoff /dev/swap_device my system not crash and not shutdown, i do killall in kwrite and sh and i have my system accepted my order nice, it not crash.

Swap on in FreeBSD then can vulnerable to explore security.

I have 1 GB RAM in box and it run very nice without swap.
 
javanunes said:
FreeBSD is safer without swap memory !
Swap on in FreeBSD then can vulnerable to explore security.
You must get some more competent testing methodology before saying loud word...

Move swap to other disk i think its hw errror
 
A lot of people use FreeBSD with swap, and people rarely complain about problems, so you might want to look for other possibilities.
 
Give a script that crash it. I have only 512M i can test if this bug is really present =)
I have seen situations where freebsd kills most heavy process if its really looping/eating all memory
 
I have 512M RAM and kde4(with some programs running) not work at all without swap (reboots). Note i have big swap partition (really big).

Just tried your script. With swap it lives about 3min and then reboot. /var/log/messages:
Code:
Jul 16 11:04:14  kernel: Approaching the limit on PV entries, consider increasing either the vm.pmap.shpgperproc or the vm.pmap.pv_entry_max tunable.
Jul 16 11:04:14  kernel: panic: get_pv_entry: increase vm.pmap.shpgperproc
Jul 16 11:04:14  kernel: cpuid = 1
Without swap, about 30 secs and total freeze. /var/log/messages:
Code:
Jul 16 11:10:11  kernel: pid 1246 (Xorg), uid 0, was killed: out of swap space
Note that Xorg is not killed, system freezed.

I dont know what is better, i belive on server reboot is better than freeze. But, problem is repeatable.. Seems kernel is out of process descriptors or somewhat like this..
 
Alt said:
I have 512M RAM and kde4(with some programs running) not work at all without swap (reboots). Note i have big swap partition (really big).

Just tried your script. With swap it lives about 3min and then reboot. /var/log/messages:
Code:
Jul 16 11:04:14  kernel: Approaching the limit on PV entries, consider increasing either the vm.pmap.shpgperproc or the vm.pmap.pv_entry_max tunable.
Jul 16 11:04:14  kernel: panic: get_pv_entry: increase vm.pmap.shpgperproc
Jul 16 11:04:14  kernel: cpuid = 1
Without swap, about 30 secs and total freeze. /var/log/messages:
Code:
Jul 16 11:10:11  kernel: pid 1246 (Xorg), uid 0, was killed: out of swap space
Note that Xorg is not killed, system freezed.

I dont know what is better, i belive on server reboot is better than freeze. But, problem is repeatable.. Seems kernel is out of process descriptors or somewhat like this..

Your accounting_enable="YES" is enabled in rc.conf?
Your maxproc is enabled for 599 process ?
If maxproc is limited and swapoff, it no reboot and no freeze.

See my limits:
Code:
Resource limits (current):
  cputime          infinity secs
  filesize          4194304 kB
  datasize          1048576 kB
  stacksize           65536 kB
  coredumpsize     infinity kB
  memoryuse        infinity kB
  memorylocked     infinity kB
  maxprocesses          599
  openfiles            1198
  sbsize           infinity bytes
  vmemoryuse       infinity kB

my loader.conf have the line:
Code:
kern.maxproc="666"
it would not have reboot or freeze
 
Do you see any errors or log messages in files or core files? Sure there is a limit on how much you can put on everything and that is why we have clusters and powerful cpu that can support gig load of RAM. However,swap space is not your problem, you are running out of resources and it can be tracked with logs files or core dumps only.
 
Back
Top