linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.4.x VM problems thread
@ 2001-08-07 20:44 Igmar Palsenberg
  2001-08-07 20:55 ` Richard B. Johnson
  2001-08-08  0:24 ` Luigi Genoni
  0 siblings, 2 replies; 9+ messages in thread
From: Igmar Palsenberg @ 2001-08-07 20:44 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 252 bytes --]


Hi,

I've followed the 2.4.x VM thread stuff. Someone mentioned he will
wite a test program. Attached program kills all boxen within 1 minute,
it's not hard to see what it does.

I'm willing to test experimental stuff if needed.

	Regards,


		Igmar


[-- Attachment #2: Type: TEXT/PLAIN, Size: 496 bytes --]

#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <unistd.h>
#include <sys/mman.h>
#include <errno.h>

int main(int argc, char ** argv)
{
	void * tmp;
	pid_t pid;

	for (;;) {
		pid = fork();
		switch (pid) {
			case 0: break;
				tmp = mmap(0, 64 * 4096, PROT_EXEC, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
				if (tmp == MAP_FAILED)
					fprintf(stderr, "mmap() failed : %s\n", strerror(errno));
			case -1: break;
			default: break;
		}
	}

	return 0;
}

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.4.x VM problems thread
  2001-08-07 20:44 2.4.x VM problems thread Igmar Palsenberg
@ 2001-08-07 20:55 ` Richard B. Johnson
  2001-08-08  0:24 ` Luigi Genoni
  1 sibling, 0 replies; 9+ messages in thread
From: Richard B. Johnson @ 2001-08-07 20:55 UTC (permalink / raw)
  To: Igmar Palsenberg; +Cc: linux-kernel

On Tue, 7 Aug 2001, Igmar Palsenberg wrote:

> 
> Hi,
> 
> I've followed the 2.4.x VM thread stuff. Someone mentioned he will
> wite a test program. Attached program kills all boxen within 1 minute,
> it's not hard to see what it does.
> 
> I'm willing to test experimental stuff if needed.
> 
> 	Regards,

Wow a memory-mapped fork bomb! Now what on earth did you expect?
Run it from a user-account with ulimits enabled for slightly less
than the total system resources. Then complain.


Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

    I was going to compile a list of innovations that could be
    attributed to Microsoft. Once I realized that Ctrl-Alt-Del
    was handled in the BIOS, I found that there aren't any.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.4.x VM problems thread
  2001-08-07 20:44 2.4.x VM problems thread Igmar Palsenberg
  2001-08-07 20:55 ` Richard B. Johnson
@ 2001-08-08  0:24 ` Luigi Genoni
  2001-08-08  0:32   ` Mike Fedyk
  1 sibling, 1 reply; 9+ messages in thread
From: Luigi Genoni @ 2001-08-08  0:24 UTC (permalink / raw)
  To: Igmar Palsenberg; +Cc: linux-kernel

This kind of code would kill any Unix system, i think, not just linux 2.4
boxes.

On Tue, 7 Aug 2001, Igmar Palsenberg wrote:

>
> Hi,
>
> I've followed the 2.4.x VM thread stuff. Someone mentioned he will
> wite a test program. Attached program kills all boxen within 1 minute,
> it's not hard to see what it does.
>
> I'm willing to test experimental stuff if needed.
>
> 	Regards,
>
>
> 		Igmar
>
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.4.x VM problems thread
  2001-08-08  0:24 ` Luigi Genoni
@ 2001-08-08  0:32   ` Mike Fedyk
  2001-08-08  0:57     ` Luigi Genoni
  2001-08-08 12:12     ` Rik van Riel
  0 siblings, 2 replies; 9+ messages in thread
From: Mike Fedyk @ 2001-08-08  0:32 UTC (permalink / raw)
  To: linux-kernel

On Wed, Aug 08, 2001 at 02:24:37AM +0200, Luigi Genoni wrote:
> This kind of code would kill any Unix system, i think, not just linux 2.4
> boxes.
> 

I tried it on 2.2.19-ppc and could kill it with ^C at the prompt, or from
root if I was already logged in.  Trying to iniate connections to ssh didn't
produce any results after about 30 seconds.

Once it was killed the system was fine.

Haven't tried 2.4 yet...

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.4.x VM problems thread
  2001-08-08  0:32   ` Mike Fedyk
@ 2001-08-08  0:57     ` Luigi Genoni
  2001-08-08  1:06       ` Luigi Genoni
  2001-08-08 12:12     ` Rik van Riel
  1 sibling, 1 reply; 9+ messages in thread
From: Luigi Genoni @ 2001-08-08  0:57 UTC (permalink / raw)
  To: Mike Fedyk; +Cc: linux-kernel



On Tue, 7 Aug 2001, Mike Fedyk wrote:

> On Wed, Aug 08, 2001 at 02:24:37AM +0200, Luigi Genoni wrote:
> > This kind of code would kill any Unix system, i think, not just linux 2.4
> > boxes.
> >
>
> I tried it on 2.2.19-ppc and could kill it with ^C at the prompt, or from
> root if I was already logged in.  Trying to iniate connections to ssh didn't
> produce any results after about 30 seconds.
with linux 2.2 if you run this program and then try to run another process
you will get a "cannot fork" message.
no cresh if you can make a ^C or a killall, (you should not be able to run
a ps). This is the same behaviour of Solaris. With Linux 2.4 you will
start to fill your swap. kswapd will really stress your system. then you
should not be able to run any process. If X11 is running, it will be
freezed.  Same thing if you run AIX and Irix. Note that AIX and Irix are
quite different on any point of view if you go to process management :).

mmm, HP-UX 10.20 should get frozen too, while HP-UX 11 should act like
Linux 2.2 (not sure about this, I should check). I do not know about
FreeBSD.

What changes is the way the system acts when it has to execute a code like
for (;;)
	fork();

That is not related to vm. It is just how fork() is managed.

Note also that libc matters.

>
> Once it was killed the system was fine.
>
> Haven't tried 2.4 yet...
>

you will see a different behaviour.

bests
Luigi



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.4.x VM problems thread
  2001-08-08  0:57     ` Luigi Genoni
@ 2001-08-08  1:06       ` Luigi Genoni
  0 siblings, 0 replies; 9+ messages in thread
From: Luigi Genoni @ 2001-08-08  1:06 UTC (permalink / raw)
  To: Mike Fedyk; +Cc: linux-kernel



On Wed, 8 Aug 2001, Luigi Genoni wrote:

>
>
> On Tue, 7 Aug 2001, Mike Fedyk wrote:
>
> > On Wed, Aug 08, 2001 at 02:24:37AM +0200, Luigi Genoni wrote:
> > > This kind of code would kill any Unix system, i think, not just linux 2.4
> > > boxes.
> > >
> >
> > I tried it on 2.2.19-ppc and could kill it with ^C at the prompt, or from
> > root if I was already logged in.  Trying to iniate connections to ssh didn't
> > produce any results after about 30 seconds.
> with linux 2.2 if you run this program and then try to run another process
> you will get a "cannot fork" message.
> no cresh if you can make a ^C or a killall, (you should not be able to run
> a ps). This is the same behaviour of Solaris. With Linux 2.4 you will
> start to fill your swap. kswapd will really stress your system. then you
> should not be able to run any process. If X11 is running, it will be
> freezed.
excuse me, i was starting to write something about X11, then i changed my
mind.
Just read "It will be freezed"
> Same thing if you run AIX and Irix. Note that AIX and Irix are
> quite different on any point of view if you go to process management :).
>
> mmm, HP-UX 10.20 should get frozen too, while HP-UX 11 should act like
> Linux 2.2 (not sure about this, I should check). I do not know about
> FreeBSD.
>
> What changes is the way the system acts when it has to execute a code like
> for (;;)
> 	fork();
>
> That is not related to vm. It is just how fork() is managed.
>
> Note also that libc matters.
>
> >
> > Once it was killed the system was fine.
> >
> > Haven't tried 2.4 yet...
> >
>
> you will see a different behaviour.
>
> bests
> Luigi
>
>
Luigi


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.4.x VM problems thread
  2001-08-08  0:32   ` Mike Fedyk
  2001-08-08  0:57     ` Luigi Genoni
@ 2001-08-08 12:12     ` Rik van Riel
  1 sibling, 0 replies; 9+ messages in thread
From: Rik van Riel @ 2001-08-08 12:12 UTC (permalink / raw)
  To: Mike Fedyk; +Cc: linux-kernel

On Tue, 7 Aug 2001, Mike Fedyk wrote:
> On Wed, Aug 08, 2001 at 02:24:37AM +0200, Luigi Genoni wrote:
> > This kind of code would kill any Unix system, i think, not just linux 2.4
> > boxes.
> >
>
> I tried it on 2.2.19-ppc and could kill it with ^C at the prompt, or from
> root if I was already logged in.  Trying to iniate connections to ssh didn't
> produce any results after about 30 seconds.
>
> Once it was killed the system was fine.
>
> Haven't tried 2.4 yet...

Under 2.4-ac the system should stay usable.

2.4-linus probably dies because the limit on
the number of processes is dangerously high.

Rik
--
Executive summary of a recent Microsoft press release:
   "we are concerned about the GNU General Public License (GPL)"


		http://www.surriel.com/
http://www.conectiva.com/	http://distro.conectiva.com/


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.4.x VM problems thread
  2001-08-07 21:02 ` Ted Unangst
@ 2001-08-07 21:23   ` Hua Zhong
  0 siblings, 0 replies; 9+ messages in thread
From: Hua Zhong @ 2001-08-07 21:23 UTC (permalink / raw)
  To: Richard B. Johnson; +Cc: Igmar Palsenberg, linux-kernel

Well you can kill Solaris in this way too.  The system just can't fork more
than a certain number of processes. But as long as you manage to kill them,
you will be fine again.

So what exactly does it have to do with VM?

----- Original Message -----
From: "Ted Unangst" <tedu@stanford.edu>
To: "Richard B. Johnson" <root@chaos.analogic.com>
Cc: "Igmar Palsenberg" <maillist@jdimedia.nl>;
<linux-kernel@vger.kernel.org>
Sent: Tuesday, August 07, 2001 2:02 PM
Subject: Re: 2.4.x VM problems thread


> On Tue, 7 Aug 2001, Richard B. Johnson wrote:
>
> > Wow a memory-mapped fork bomb! Now what on earth did you expect?
> > Run it from a user-account with ulimits enabled for slightly less
> > than the total system resources. Then complain.
>
> not even mmap'ed.
>
> case 0: break;
>                                 tmp = mmap(0, 64 * 4096, PROT_EXEC,
> MAP_SHARED
> | MAP_ANONYMOUS, -1, 0);
>
> the mmap never even gets run.  might as well be for(;;) fork();
>
>
>
>
> >
> >
> > Cheers,
> > Dick Johnson
> >
> > Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).
> >
> >     I was going to compile a list of innovations that could be
> >     attributed to Microsoft. Once I realized that Ctrl-Alt-Del
> >     was handled in the BIOS, I found that there aren't any.
> >
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel"
in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> >
>
> --
> "I am clearly more popular than Reagan.  I am in my third term.
> Where's Reagan?  Gone after two!  Defeated by George Bush and
> Michael Dukakis no less."
>       - M. Barry, Mayor of Washington, DC
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.4.x VM problems thread
       [not found] <fa.kga80kv.1fk0mqv@ifi.uio.no>
@ 2001-08-07 21:02 ` Ted Unangst
  2001-08-07 21:23   ` Hua Zhong
  0 siblings, 1 reply; 9+ messages in thread
From: Ted Unangst @ 2001-08-07 21:02 UTC (permalink / raw)
  To: Richard B. Johnson; +Cc: Igmar Palsenberg, linux-kernel

On Tue, 7 Aug 2001, Richard B. Johnson wrote:

> Wow a memory-mapped fork bomb! Now what on earth did you expect?
> Run it from a user-account with ulimits enabled for slightly less
> than the total system resources. Then complain.

not even mmap'ed.

case 0: break;
                                tmp = mmap(0, 64 * 4096, PROT_EXEC,
MAP_SHARED
| MAP_ANONYMOUS, -1, 0);

the mmap never even gets run.  might as well be for(;;) fork();




>
>
> Cheers,
> Dick Johnson
>
> Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).
>
>     I was going to compile a list of innovations that could be
>     attributed to Microsoft. Once I realized that Ctrl-Alt-Del
>     was handled in the BIOS, I found that there aren't any.
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

--
"I am clearly more popular than Reagan.  I am in my third term.
Where's Reagan?  Gone after two!  Defeated by George Bush and
Michael Dukakis no less."
      - M. Barry, Mayor of Washington, DC


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-08-08 12:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-07 20:44 2.4.x VM problems thread Igmar Palsenberg
2001-08-07 20:55 ` Richard B. Johnson
2001-08-08  0:24 ` Luigi Genoni
2001-08-08  0:32   ` Mike Fedyk
2001-08-08  0:57     ` Luigi Genoni
2001-08-08  1:06       ` Luigi Genoni
2001-08-08 12:12     ` Rik van Riel
     [not found] <fa.kga80kv.1fk0mqv@ifi.uio.no>
2001-08-07 21:02 ` Ted Unangst
2001-08-07 21:23   ` Hua Zhong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).