Subject: Re: easy ways to crash your NetBSD system
To: Jukka Marin <>
From: Ken Hornstein <>
List: current-users
Date: 04/04/1996 00:53:39
>> >Two easy ways to crash a NetBSD system - is it only my system or...?
>> >
>> >1. main(void) { while(1) fork(); }
>> Ahhh.  The problem here is that you have main() prototyped incorrectly :-)
>Argh. ;)  Originally, main() was defined to return void (when this little
>program appeared in the Finnish computer wars newsgroup.  I forgot to remove
>the other void. ;)

This was a joke based on the last idiotic flame war that went around on the
NetBSD mailing lists.  (PS - Before anyone _else_ sends me mail, I already
knew that main(void) is a valid prototype for main().  It was a joke!).

>> I think a lot of Unixes lose big on this one.
>I knew someone would say this.  Does this mean NetBSD shouldn't be any better?
>;-)  It doesn't feel too good that any user can bring the system down any time
>they want. :-(

You could try lowering the per-user process limits to fix this.  I assume
that eventually you run out of VM?

>> >2. use dd to copy data from a raw disk partition to /dev/null and set
>> >   the block size to a big value (like 8 megs).
>> What happens when you do this?
>A panic.  The kernel runs out of something.  I tried increasing some constant,
>but it didn't help.  (Can't remember the details any more.)

As someone else already pointed out, if your users can read your raw disk
partitions, you have worse problems to deal with :-)