Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have tried to run the WatchDog Daemon using the tutorial found at http://binerry.de/post/28263824530/raspberry-pi-watchdog-timer

So basic process I ran through to get WatchDog up and running is:

1. sudo modprobe bcm2708_wdog
2. sudo nano /etc/modules (add line “bcm2708_wdog”)
3. apt-get install watchdog chkconfig
4. chkconfig watchdog on
5. /etc/init.d/watchdog start
6. nano /etc/watchdog.conf (enable line “watchdog-device = /dev/watchdog”)

When I reboot I see that the WatchDog daemon starts in one of the last system startup tasks, however when I try a fork bomb, System becomes unusable but never resets.

Fork bomb code use below:(Warning to others reading, below code can cause damage. Read linked tutorial on top for more info)

:(){ :|:& };:
share|improve this question
I recommend also check networking : /etc/watchdog.conf ping = <routerip> interface = eth0 interval = 20 realtime = yes priority = 1 watchdog-device = /dev/watchdog – Boris Ivanov Aug 20 '15 at 19:31

a) for a effective forkbomb you need to disable the swap partition. (swapoff -a) b) the system may survive a single forkbomb. Simply start a number of them.

A very simply test can be done by killing the watchdog process. By doing so the watchdog process doesn't ping the watchdog device, so the hardware watchdog will reboot the pi. In a realworld situation the watchdog daemon my not be able to ping anything because of high load on the system. The result would be the hardware reboot.

share|improve this answer
I turned off swap, and let process run for a while but still the unit did not restart. would multiple fork bombs be more effective than just the one? I would think you would acheive the same result with just one(I really don't know, just from my limited knowledge on how forks work). – Richard Nov 26 '12 at 18:25

I have a theory of why system is not rebooting, but not yet tested.

in /etc/watchdog.conf there are lines:

realtime = yes
priority = 1

basically what I am thinking is that the forkbomb runs but at a lower priority than 1. WatchDog Daemon is still able to get the pulses to the hardware WatchDog. System is still running pretty inoperable, but because WatchDog Daemon has such a high priority, it is happy.

in the same config file there is a line:

max-load-1     =24

I uncommeted this line and now the WatchDog Daemon works as expected.

only problem here is that it is possible to reboot machine when it is not truly hung. In my case, I am not running lxde and only running a few python cron jobs that are not resource hungry so it shouldn't be a issue for me.

share|improve this answer

I had the same experience when running the fork-bomb - the system become unstable - and kicked me off my ssh session - but the pi didn't reboot.

I got it to work (at least once) however - by running the fork-bomb as root.

   $ sudo su -
   # swapoff -a
   # :(){ :|:& };:
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.