3

I'm trying to crash an instance on AWS so that I can simulate what happens when it gets 'stuck'.

I tried the top suggestions here How to cause kernel panic with a single command? but unfortunately they were not successful.

cjm2671
  • 150
  • 1
    From the referenced page, did you try this: dd if=/dev/urandom of=/dev/mem ? And what happened after the sysrq trigger? – Liczyrzepa Jul 15 '15 at 13:48

1 Answers1

3

This wasn't one of the official answers to How to cause kernel panic with a single command?, but it was referenced in a comment, and it should cause the system to crash.

Run the following forkbomb command at your bash shell:

:(){ :|:& };:

The system will continue to create new processes until the system hangs.

Or you can try the following python script:

import os
while True: os.fork()
Addie
  • 131
  • 4