Latest in

Image credit:

Killing a Mac OS X machine

Scott Granneman
January 15, 2005
Share
Tweet
Share

Sponsored Links

My buddy Robert Citek has been interested, over the last couple of years, in ways to kill Unix machines. In other words, he tries to create scripts that will bring *nix machines to their knees. His interest isn’t malicious - he’s one of the most honest guys I know - but he thinks that by understanding where the weaknesses are, it will better enable him to shore those up and turn weaknesses into strengths. Robert knows Linux really, really, really well (actually, he knows RPM-based distros really well; Debian-based distros are still something new to him), but he bought a Mac OS X laptop a year ago, so now he’s focusing on ways to kill Mac OS X (which is still Unix, remember). Here’s his latest report, from the CWE-LUG mailing list:

<Robert’s email>

I was able to successfully kill my Mac last night with the following script [Scott: remove the blank lines from the script; this blog’s wysiwyg keeps inserting them]:

perl -le '
@foo=qw(hello) ;
for (my $i ; $i<100 ; $i++) {
push(@foo, @foo) || die "$i -- no more\n" ;
print "$i" ;
} ;
print "size is $#foo" ;
'






By killed I mean that without warning the Mac just turned off. When I powered on, it took a long time (probably doing an fsck) and then the time was set to January 1970. So, this was the hardest crash I have ever seen on a Unix box.

So I figured this script would be a good test for ulimit (bash, ksh ; limit in tcsh, csh). But no matter what setting I used for the various ulimit options, the script kept running, sucking up more and more RAM, until I manually stopped it with a Ctrl-C.

I’m curious to know if the above script kills anyone else’s machines and if setting ulimit/limit options prevents it?

</Robert’s email>

Jon, another member of the CWE-LUG list, is a big FreeBSD user, and he reported that the script did nothing on his FreeBSD box. It ran for 10 seconds or so & things slowed down, but then a warning appeared in the terminal - “Out of memory during request for 1012 bytes, total sbrk() is 535257088 bytes” - and things resumed as normal! On OpenBSD, the script ran for 4 seconds, maybe, and then gave an “Out of Memory” error, but there was no slowdown in performance.

What about the rest of you out there? Try it - ON A NON-PRODUCTION MACHINE!!! - & let us know!

All products recommended by Engadget are selected by our editorial team, independent of our parent company. Some of our stories include affiliate links. If you buy something through one of these links, we may earn an affiliate commission.
Share
Tweet
Share

Popular on Engadget

Live PlayStation 5 photos reveal a truly giant console

Live PlayStation 5 photos reveal a truly giant console

View
Microsoft releases a final preview for Windows 10's October update

Microsoft releases a final preview for Windows 10's October update

View
Sony apologizes for botched PlayStation 5 pre-orders

Sony apologizes for botched PlayStation 5 pre-orders

View
MIT algorithm finds subtle connections between art pieces

MIT algorithm finds subtle connections between art pieces

View
The best wireless earbuds you can buy right now

The best wireless earbuds you can buy right now

View

From around the web

Page 1Page 1ear iconeye iconFill 23text filevr