Opened 11 years ago

Closed 10 years ago

Last modified 9 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: None/Unknown 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 11 years ago by igloo

Milestone: 6.6.2

comment:2 Changed 10 years ago by simonmar

Resolution: invalid
Status: newclosed

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 10 years ago by simonmar


comment:4 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple
Note: See TracTickets for help on using tickets.