Polyphemus
Posts: 1
Joined: Sun Aug 05, 2012 6:32 pm

watchdog errors on startup

Sun Aug 05, 2012 6:39 pm

Hi :D

I'm trying to enable the watchdog as described here (and other places):
http://binerry.de/post/28263824530/rasp ... hdog-timer

But on reboot I'm getting the following errors in syslog:

Jan 1 01:00:17 webpi wd_keepalive[840]: int=10 alive=/dev/watchdog realtime=yes
Jan 1 01:00:17 webpi wd_keepalive[840]: hardware wartchdog identity: BCM2708
Jan 1 01:00:17 webpi wd_keepalive[840]: unable to disable oom handling!
Jan 1 01:00:17 webpi kernel: [ 18.305250] watchdog stopped
Jan 1 01:00:22 webpi watchdog[854]: starting daemon (5.12):
Jan 1 01:00:22 webpi watchdog[854]: int=1s realtime=yes sync=no soft=no mla=0 mem=0
Jan 1 01:00:22 webpi watchdog[854]: ping: no machine to check
Jan 1 01:00:22 webpi watchdog[854]: file: no file to check
Jan 1 01:00:22 webpi watchdog[854]: pidfile: no server process to check
Jan 1 01:00:22 webpi watchdog[854]: interface: no interface to check
Jan 1 01:00:22 webpi watchdog[854]: test=none(0) repair=none(0) alive=/dev/watchdog heartbeat=none temp=none to=root no_act=no
Jan 1 01:00:22 webpi watchdog[854]: cannot set timeout 60 (errno = 22 = 'Invalid argument')
Jan 1 01:00:22 webpi watchdog[854]: hardware wartchdog identity: BCM2708

And the watchdog is disabled... I'm using the latest firmware/kernel pulled by rpi-update.

Does someone have any ideas?

lines
Posts: 7
Joined: Fri Aug 24, 2012 8:48 pm
Location: DE

Re: watchdog errors on startup

Sun Aug 26, 2012 10:05 pm

Hello,

today I got the same problem. Did you find a solution already?

Aug 26 21:58:25 raspberrypi wd_keepalive[1717]: starting watchdog keepalive daemon (5.12):
Aug 26 21:58:25 raspberrypi wd_keepalive[1717]: int=10 alive=/dev/watchdog realtime=yes
Aug 26 21:58:25 raspberrypi wd_keepalive[1717]: hardware wartchdog identity: BCM2708
Aug 26 21:58:25 raspberrypi wd_keepalive[1717]: unable to disable oom handling!
Aug 26 21:58:26 raspberrypi wd_keepalive[1717]: stopping watchdog keepalive daemon (5.12)
Aug 26 21:58:26 raspberrypi kernel: [ 46.550418] watchdog stopped
Aug 26 23:03:31 raspberrypi watchdog[1849]: starting daemon (5.12):
Aug 26 23:03:31 raspberrypi watchdog[1849]: int=1s realtime=yes sync=no soft=no mla=0 mem=0
Aug 26 23:03:31 raspberrypi watchdog[1849]: ping: no machine to check
Aug 26 23:03:31 raspberrypi watchdog[1849]: file: no file to check
Aug 26 23:03:31 raspberrypi watchdog[1849]: pidfile: no server process to check
Aug 26 23:03:31 raspberrypi watchdog[1849]: interface: no interface to check
Aug 26 23:03:31 raspberrypi watchdog[1849]: test=none(0) repair=none(0) alive=/dev/watchdog heartbeat=none temp=none to=root no_act=no
Aug 26 23:03:31 raspberrypi watchdog[1849]: cannot set timeout 60 (errno = 22 = 'Invalid argument')
Aug 26 23:03:31 raspberrypi watchdog[1849]: hardware wartchdog identity: BCM2708

The watchdog does only work the first time I set it up, not after restart.
but:

Code: Select all

/etc/init.d/watchdog status
tells me:
[ ok ] watchdog is running.

I'm not really sure what is wrong in there.

lines
Posts: 7
Joined: Fri Aug 24, 2012 8:48 pm
Location: DE

Re: watchdog errors on startup

Wed Aug 29, 2012 7:52 pm

i think i got it.
The watchdog is fine, i think the fork bomb in the example is not always panicing the pi. i can still ping it, but with longer ping time.

meufeu
Posts: 6
Joined: Wed Dec 19, 2012 8:36 am

Re: watchdog errors on startup

Wed Jan 09, 2013 10:08 am

hi from france

i've got exactly the same problem !
Jan 8 21:26:37 raspberrypi ntpd[1680]: Listening on routing socket on fd #19 for interface updates
Jan 8 21:26:37 raspberrypi ntpd[1680]: restrict: error in address '::' on line 38. Ignoring...
Jan 8 21:26:37 raspberrypi ntpd[1680]: restrict: error in address '::1' on line 42. Ignoring...
Jan 8 21:26:38 raspberrypi wd_keepalive[1747]: starting watchdog keepalive daemon (5.12):
Jan 8 21:26:38 raspberrypi wd_keepalive[1747]: int=10 alive=/dev/watchdog realtime=yes
Jan 8 21:26:38 raspberrypi wd_keepalive[1747]: hardware wartchdog identity: BCM2708
Jan 8 21:26:38 raspberrypi wd_keepalive[1747]: unable to disable oom handling!
Jan 8 21:26:38 raspberrypi kernel: [ 30.798468] watchdog stopped
Jan 8 21:26:38 raspberrypi wd_keepalive[1747]: stopping watchdog keepalive daemon (5.12)
Jan 8 21:27:20 raspberrypi watchdog[1785]: starting daemon (5.12):
Jan 8 21:27:20 raspberrypi watchdog[1785]: int=1s realtime=yes sync=no soft=no mla=24 mem=0
Jan 8 21:27:20 raspberrypi watchdog[1785]: ping: no machine to check
Jan 8 21:27:20 raspberrypi watchdog[1785]: file: no file to check
Jan 8 21:27:20 raspberrypi watchdog[1785]: pidfile: no server process to check
Jan 8 21:27:20 raspberrypi watchdog[1785]: interface: no interface to check
Jan 8 21:27:20 raspberrypi watchdog[1785]: test=none(0) repair=none(0) alive=/dev/watchdog heartbe
at=none temp=none to=root no_act=no
Jan 8 21:27:20 raspberrypi watchdog[1785]: cannot set timeout 60 (errno = 22 = 'Invalid argument')
Jan 8 21:27:20 raspberrypi watchdog[1785]: hardware wartchdog identity: BCM2708
and the bomb given to validate watchdog installation kill my PI who DO NOT RESTART
so watchdog do not work !
could you help ?

fik
Posts: 7
Joined: Thu Jan 17, 2013 1:34 pm

Re: watchdog errors on startup

Thu Jan 17, 2013 2:00 pm

I think the problem is in:

Code: Select all

Jan 8 21:26:38 raspberrypi wd_keepalive[1747]: stopping watchdog keepalive daemon (5.12)
wd_keepalive stops /dev/watchdog, as you can see in dmesg:

Code: Select all

[   24.101813] bcm2708 watchdog, heartbeat=15 sec (nowayout=0)
[   42.418448] watchdog stopped
The solution is to use module parameter nowayout=1, so /dev/watchdog can't be disabled

Code: Select all

echo "options bcm2708_wdog nowayout=1 heartbeat=15" | sudo tee /etc/modprobe.d/watchdog.conf
then everyting works as expected. Heartbeat 15s is the maximum of the hardware. You may safely increase interval = 5 in your /etc/watchdog.conf. In dmesg you'll find

Code: Select all

[   26.185031] bcm2708 watchdog, heartbeat=15 sec (nowayout=1)
[   42.013465] wdt: WDT device closed unexpectedly.  WDT will not stop!
Also I prefer to load the bcm2708_wdog module with the watchdog service and not before. So instead of puting it in /etc/modules, put it in

Code: Select all

cat /etc/default/watchdog 
# Start watchdog at boot time? 0 or 1
run_watchdog=1
# Load module before starting watchdog
watchdog_module="bcm2708_wdog"
# Specify additional watchdog options here (see manpage).

barneywolff
Posts: 1
Joined: Tue Mar 05, 2013 4:05 am

Re: watchdog errors on startup

Tue Mar 05, 2013 4:17 am

I had what looks like the same problem - system would only stay up 10 sec, then reboot.
What I think is wrong is that /etc/init.d/wd_keepalive has links in rc[2345].d and gets run when the level is started. But unless I'm confused, that's wrong, because /etc/init.d/watchdog itself controls when wd_keepalive is stopped or started - init should not be doing it itself. Removing the links cured the problem.

So, since the header in /etc/init.d/wd_keepalive says to create the links, why? On what system would that be correct?

fik
Posts: 7
Joined: Thu Jan 17, 2013 1:34 pm

Re: watchdog errors on startup

Mon Mar 11, 2013 3:46 pm

I think the wd_keepalive is keeping the watchdog fed during the booting, until the normal watchdog starts.

The problem is, that the hw watchdog stops on the closing of wd_keepalive, which should not happen. Either wd_keepalive is sending V character, to stop the device (I doubt it), or the kernel module is not handling correctly the closure of the device.

I think your solution not to use wd_keepalive is good, maybe better than mine with nowayout=1, as this restarts the raspberry when you want to shut it down. The normal watchdog should write V to /dev/watchdog when it is stopped, bud the hw watchdog is ignoring it with the option nowayout=1.

shavkaca
Posts: 3
Joined: Fri Mar 15, 2013 8:47 pm

Re: watchdog errors on startup

Mon Apr 01, 2013 3:53 pm

Hi,
I have the same problems with watchdog.
it shows as if it is working in status but log shows the following: "unable to disable oom handling".
Any working solution to this? (I would appreciate step-by step solution, as I am quite new to raspberry.
Thanks

fik
Posts: 7
Joined: Thu Jan 17, 2013 1:34 pm

Re: watchdog errors on startup

Fri Apr 12, 2013 10:22 am

that's just a warning, oom = out of memory, to get rid of it uncomment this line in /etc/watchdog.conf

Code: Select all

min-memory=1
if there is less than 1 page of free memory (=4k), then the watchdog will reboot the pi

thorcode
Posts: 1
Joined: Sun Nov 17, 2013 3:35 pm

Re: watchdog errors on startup

Sun Nov 17, 2013 3:43 pm

I too am in an infinite loop of watchdog killing the RPi after 10 seconds. How did you get it to stop this 10 second countdown so you could make these changes??

Thanks!
John

birdofprey
Posts: 1
Joined: Tue Nov 19, 2013 4:01 pm

Re: watchdog errors on startup

Tue Nov 19, 2013 4:22 pm

Hi John,

either you are really quick with your fingers on the keyboard or you do it from another machine on your network.

If you're quick: wait until the boot process finished, then login with your user and then type:
sudo mv /etc/watchdog.conf /etc/watchdog.bak

If you manage to do this within the 10 seconds, then at the next boot it will fail loading the config file and not run watchdog anymore.

I didn't make it, so I needed to use my windows machine with putty. On my Pi the sshd is active and so I wrote a windows batch file with quite the same command as above:
plink -ssh -pw MYPASSWORD MYUSER@MYPI sudo mv /etc/watchdog.conf /etc/watchdog.bak

It's then only necessary to wait until the Pi booted to the login prompt and in the remaining few seconds run this batch script.

Hope that helps!

Regards,
Ralf

isoma
Posts: 1
Joined: Thu Jan 02, 2014 4:27 pm

Re: watchdog errors on startup

Thu Jan 02, 2014 4:33 pm

I found that the BCM2708 watchdog has a maximum 15 second timeout.

To make the watchdog daemon start OK, add this line to /etc/watchdog.conf:

Code: Select all

watchdog-timeout	= 10
(or adjust to suit; 10 seconds is good for what I want).

Then run

Code: Select all

sudo service watchdog restart

Haydnrb7
Posts: 3
Joined: Sun Jan 05, 2014 12:15 am

Re: watchdog errors on startup

Sun Feb 02, 2014 7:02 am

I've been spending a while going over all the posts and I've done every modification but when I put the fork bomb in it either spits out something like: [3] 5468 . And stays responsive so I think that it didn't start panicking. Or it keeps sending out messages like: -bash: fork: retry: Resource Temporarily Unavailable Or. -bash: fork: retry: no child process . Any idea on what is going on? Like I said, every thing seems to work but and sometimes the pi will become unresponsive, but it will never shut itself off. Thanks!

underwood
Posts: 7
Joined: Tue Aug 07, 2012 5:48 pm

Re: watchdog errors on startup

Sun Jan 04, 2015 2:06 pm

How can I stop the watchdog for a clean shutdown?

Watchdog reboots the pi while shutdown.

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 8 guests