Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Aug 1999 09:58:35 +0800
From:      leijun <worthope@public.bta.net.cn>
To:        freebsd-bugs@FreeBSD.org
Subject:   about user's crash freebsd system, help me!
Message-ID:  <37AA414B.C12AB762@public.bta.net.cn>

next in thread | raw e-mail | index | archive | help
Hi ,

  I am leiyin , a software engineer in china. I just want to migrate
from linux world to freebsd  world. However , our new freebsd 3.1 system
can be crashed down by any
user who just create such a small program which I call it crashme.

   The program source is very simple:

   #define NUM 1024000
   #define BLOCK 4096
  char *content[NUM];

   main()
  {
    int i,j;

    for(i=0;i<NUM;i++)
   {
     content[i] = (char *)malloc(BLOCK*sizeof(char));

      for(j=0;j<BLOCK;j++)
      *(content[i]+j) = 'A';
     }


    sleep(10000000);
  }

  compile it and run ./crashme under any user privilege can causes the
whole system
  to say " swap_pager: out of swap space" ! What is more worse is I
cannot try to stop
  the program with Ctl_C.I try such progam under unixware 7.01,
  but unixware could kill the rogue progam when it detect it would be
out of swap. In other words the system can continue to work without any
difficult. Why freebsd cannot
 survive from such situation. Could you tell me how could I do under
such situation?


   leiyin
   worthope@public.bta.net.cn





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37AA414B.C12AB762>