Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#1146 closed bug (invalid)

Fork bomb should throw an exception

Reported by: guest Owned by:
Priority: normal Milestone: 6.8.1
Component: Runtime System Version: 6.7
Keywords: Cc:
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


When fork bombing (example code below, just run 'f'), a failed forkIO should raise an exception, but on 6.7.20070206 it just brings my system to its knees for a while then sometimes crashes and sometimes I just have to kill it. (printouts included just for the heck of it)

import Control.Concurrent

f = do a <- forkIO g
       b <- forkIO g
       putStrLn $ "f(): Forked a: " ++ (show a) ++ " and b: " ++ (show b)
       return ()

g = do a <- forkIO f
       b <- forkIO f
       putStrLn $ "g(): Forked a: " ++ (show a) ++ " and b: " ++ (show b)
       return ()

Change History (4)

comment:1 Changed 9 years ago by igloo

  • Milestone set to 6.6.2

comment:2 Changed 9 years ago by simonmar

  • Resolution set to invalid
  • Status changed from new to closed

There's nothing special about forkIO here; you can get the same effect by writing a program with a space leak. The runtime keeps allocating memory until memory runs out.

comment:3 Changed 9 years ago by simonmar

  • Milestone changed from 6.6.2 to 6.8.1

comment:4 Changed 8 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.