gridrun
Posts: 46
Joined: Mon Feb 18, 2013 12:26 pm
Contact: Website

Watchdog rebooting w/o lock-up

Mon Feb 25, 2013 12:58 pm

I configured the hardware watchdog and am using watchdog package.

However since, the Pi spontaneously reboots once every 1..3 hours - even if there's no reason.

Anyone else seen this happening?
Find more info on Raspberry Pi, Virtualization and all things cloudy on my blog: http://niston.wordpress.com

User avatar
RaTTuS
Posts: 10558
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Watchdog rebooting w/o lock-up

Mon Feb 25, 2013 1:01 pm

what are you watching for ?
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

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

Re: Watchdog rebooting w/o lock-up

Mon Feb 25, 2013 1:43 pm

what is your configuration in /etc/watchdog.conf ? what parameters you pass to bcm2708_wdog? what is in your dmesg and /var/log/daemon.log ?

gridrun
Posts: 46
Joined: Mon Feb 18, 2013 12:26 pm
Contact: Website

Re: Watchdog rebooting w/o lock-up

Mon Feb 25, 2013 2:58 pm

I configured according to http://binerry.de/post/28263824530/rasp ... hdog-timer. Had to change the nowayout=1 parameter to get the watchdog working in the first place. Heartbeat parameter was (and is) 15 seconds.

I now ditched the watchdog package and speak to /dev/watchdog directly from my application. Time will tell if it the spontaneous rebooting persists-
Find more info on Raspberry Pi, Virtualization and all things cloudy on my blog: http://niston.wordpress.com

gridrun
Posts: 46
Joined: Mon Feb 18, 2013 12:26 pm
Contact: Website

Re: Watchdog rebooting w/o lock-up

Mon Feb 25, 2013 3:38 pm

gridrun wrote:Time will tell if it the spontaneous rebooting persists-
Unfortunately, yes. Even though I'm writing the string "bone" to /dev/watchdog every 3 seconds, I get spontaneous reboots every now and then (time to reboot is varying, but its always much more than the wd's 15s interval). Unless I disable the watchdog, that is.

Something's wrong with that dog :( Why doesn't it like the bones I'm throwing at it :?:

My /etc/modprobe.d/watchdog.conf:
options bcm2708_wdog nowayout=0 heartbeat=15
tail /var/log/dmesg:
[ 11.901202] bcm2835 ALSA CARD CREATED!
[ 11.931481] ### BCM2835 ALSA driver init OK ###
[ 11.993969] bcm2708 watchdog, heartbeat=15 sec (nowayout=0)
[ 19.776349] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
/etc/modules:
snd-bcm2835
bcm2708_wdog
Find more info on Raspberry Pi, Virtualization and all things cloudy on my blog: http://niston.wordpress.com

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

Re: Watchdog rebooting w/o lock-up

Mon Feb 25, 2013 3:54 pm

and what is in /var/log/daemon.log and /etc/watchdog.conf?

see my other post here: http://www.raspberrypi.org/phpBB3/viewt ... 46#p262646

I need to have nowayout=1, otherwise the hw watchdog is stopped by the watchdog daemon, as it has two stages and somehow going from the first to second stage stops it

I'm on raspbian and it works as expected for me on two raspberries :)

also I load the hw watchdog module via /etc/watchdog.conf and not via /etc/modules, i.e. a bit latter

gridrun
Posts: 46
Joined: Mon Feb 18, 2013 12:26 pm
Contact: Website

Re: Watchdog rebooting w/o lock-up

Mon Feb 25, 2013 4:13 pm

I'm not using the watchdog package anymore, so I don't have the /etc/watchdog.conf. Consequently, nothing concerning the watchdog daemon can be found in /var/log/daemon.log either.

However when I did use the watchdog package, I also had to set nowayout=1. The watchdog daemon left these messages in /var/log/daemon.log when I used it:
Feb 24 18:17:16 raspberrypi wd_keepalive[1413]: starting watchdog keepalive daemon (5.12):
Feb 24 18:17:16 raspberrypi wd_keepalive[1413]: int=10 alive=/dev/watchdog realtime=yes
Feb 24 18:17:16 raspberrypi wd_keepalive[1413]: hardware wartchdog identity: BCM2708
In fact, had I not tried with the watchdog package before, I'd say I have an error in my application. But if there's indeed a mistake in my coding, I cant find it. I even made a led blink whenever the application writes to /dev/watchdog for debugging purposes - and with the WD enabled, it flashes every 3 seconds, as is expected.

Oh well. Guess I'll try with another Pi board tomorrow or so.
Find more info on Raspberry Pi, Virtualization and all things cloudy on my blog: http://niston.wordpress.com

gridrun
Posts: 46
Joined: Mon Feb 18, 2013 12:26 pm
Contact: Website

Re: Watchdog rebooting w/o lock-up

Mon Feb 25, 2013 6:26 pm

RaTTuS wrote:what are you watching for ?
I built a monitoring probe around a Pi and a PiFace digital board (see http://niston.wordpress.com/2013/02/24/ ... ring-probe for details). Since this sort of device is supposed to be always up, I figured why not make use of the watchdog.
Find more info on Raspberry Pi, Virtualization and all things cloudy on my blog: http://niston.wordpress.com

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: Watchdog rebooting w/o lock-up

Tue Feb 26, 2013 9:24 am

Are you sure it's the watchdog rebooting the Pi.
An easy test would be running it without the watchdog.
The reason I am asking is because I am currently testing a 3G modem.
I also notice reboots, and I don't use the watchdog.
My TP1 - TP2 voltage is 4.98V, even with the stick operating.

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

Re: Watchdog rebooting w/o lock-up

Tue Feb 26, 2013 9:38 am

gridrun wrote: Feb 24 18:17:16 raspberrypi wd_keepalive[1413]: int=10 alive=/dev/watchdog realtime=yes
I think the interval 10s is too big, when timeout is only 15s. It may happen, that the busy raspberry misses one or two writes to hw watchdog and then you'll get a restart. Better would be interval of 2-3s, I'm using 2s now with heartbeat=15. It's a shame the hardware doesn't support higher timeouts, as 5-15 minutes :(

Also the watchdog daemon runs at real-time priority, maybe your program runs normal priority and at high loads misses some writes, which results in reboot?

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

Re: Watchdog rebooting w/o lock-up

Tue Feb 26, 2013 9:58 am

sorry if it's obvious, but have you done rpi-update?

gridrun
Posts: 46
Joined: Mon Feb 18, 2013 12:26 pm
Contact: Website

Re: Watchdog rebooting w/o lock-up

Tue Feb 26, 2013 10:21 am

fik wrote:I think the interval 10s is too big, when timeout is only 15s. It may happen, that the busy raspberry misses one or two writes to hw watchdog and then you'll get a restart. Better would be interval of 2-3s, I'm using 2s now with heartbeat=15. It's a shame the hardware doesn't support higher timeouts, as 5-15 minutes :(
I agree, the 15 seconds max seems too constrained.
fik wrote:Also the watchdog daemon runs at real-time priority, maybe your program runs normal priority and at high loads misses some writes, which results in reboot?
Neither watchdog daemon nor my own application worked properly. Also, my application uses little CPU (between 3 and 8%), and the wd was rebooting even when my application would feed it a string every 3 seconds (as evidenced by blinking a led on the piface at the same time). Reboots would occur nonetheless.

Oddly enough, I tried with a different Raspi board and the spontaneous reboots are gone. So I figure I've got a faulty board here with a broken watchdog.
Find more info on Raspberry Pi, Virtualization and all things cloudy on my blog: http://niston.wordpress.com

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: Watchdog rebooting w/o lock-up

Tue Feb 26, 2013 1:11 pm

Maybe just a broken board that would even reboot without the watchdog being involved?
My 3g reboots are probably caused by RF inteference between the stick and the Pi.
If I add a cable between the Pi usb port and the stick, it works more stable. (still testing)
It's unrelated to your issues, I know.
Sorry for hijaacking your thread, but since you found what caused your reboots.....

gridrun
Posts: 46
Joined: Mon Feb 18, 2013 12:26 pm
Contact: Website

Re: Watchdog rebooting w/o lock-up

Tue Feb 26, 2013 6:03 pm

Yeah, the problem actually dazzles me. What are the chances of ending up with a board that has broken silicon on it, and then it affects only a minor subsystem of the chip?

Nil, I'd say.

On the other hand: Without the watchdog, that particular board works fine.
Find more info on Raspberry Pi, Virtualization and all things cloudy on my blog: http://niston.wordpress.com

smith9
Posts: 7
Joined: Thu Jan 03, 2013 12:45 am

Re: Watchdog rebooting w/o lock-up

Thu Jul 25, 2013 10:41 pm

does anyone know how to disable the watchdog?

I added one but it is rebooting my pi and I only get about 10-15 seconds to type commands before it reboots

FlashT
Posts: 64
Joined: Fri Jul 24, 2015 3:51 pm

Re: Watchdog rebooting w/o lock-up

Thu May 12, 2016 7:33 pm

I would also like to know (having all 3 problems)

1. Did you fix the problem with watchdog rebooting Raspberry randomly?
2. Did you fix the problem with reboots while 3G modem is active?
3. Do you know how to disable watchdog totally once it was enabled?

Return to “Troubleshooting”