Loading ...
Sorry, an error occurred while loading the content.

18265Re: [redhat] Something fun to do, but not on a production system...

Expand Messages
  • Jeff Lane
    May 1, 2008
      On Wed, Apr 30, 2008 at 4:44 PM, Scott <scottro@...> wrote:

      > > bomb(){ bomb | bomb& }; bomb
      > Yes, that did help.

      One thing bothering me about this, though, is that I can't grasp
      exactly WHY this happens. Normally, there's a PID limit and once the
      kernel reaches that limit, it recycles old PIDs, and if none are
      available, it either errors and refuses to start more processes, or it
      starts killing off older processes. I've seen both of those occur.

      In this case, the machine locks up hard... which to me says either the
      processors are thoroughly chewed up with the exponential number of
      forks being created, or the RAM is being eaten up by all those
      processes being created.

      However, I don't know exactly how many forks it takes to bring down
      the system... I tried instrumenting the bash version yesterday but
      that didn't work at all.. the system locked up and I never got any
      output at all.

      I am thinking, though, that using C and fork() as it is in the
      examples will let me add a simple counter and a printf to at least
      tell me how many processes are being spawned... then maybe I can do
      some memory watching or something like that...

      Not that it really matters in my environment... I do beta testing for
      a living, so user security is not my concern.... but this has my
      curiosity piqued :-)

    • Show all 15 messages in this topic