Modify

Opened 6 years ago

Closed 5 years ago

Last modified 4 years ago

#11724 closed defect (fixed)

brcm47xx: watchdog gracefull kill wont stop the timers

Reported by: Damian Kaczkowski <damian.kaczkowski@…> Owned by: hauke
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

Hello.

According to what jow said here:

https://forum.openwrt.org/viewtopic.php?id=37208

Exactly, if you gracefully kill the watchdog it will actually stop the timer and tears down cleanly. However in the case of a system error, e.g. an out of memory condition, the watchdog wil lget killed hard (similar to kill -9) so the timer remains active and the system will eventually reset.

Killing or stopping watchdog gracefully should stop the timers and the board should not reset. This is true for ar71xx but not for brcm47xx.

Executing

/etc/init.d/watchog stop
or
kill <watchdog_pid>

on brcm47xx, triggers reboot:

2012-06-20 12:45:10     1cbdb9b5f38f    kern.crit       [  530.468000] bcm47xx_wdt: Unexpected close, not stopping watchdog!
2012-06-20 12:46:09     1cbdb9b5f38f    kern.crit       [  589.476000] bcm47xx_wdt: Watchdog will fire soon!!!

Executing

/etc/init.d/watchog stop
or
kill <watchdog_pid>

on ar71xx, kills watchdog gracefully and the board remains online.

Tested on r32463, WRT54GL and TL-WR1043ND.

-

There was even a patch to deal with this problem:
http://patchwork.openwrt.org/patch/61/

reverted in r21341, because busybox should deal with it by itself
/changeset/21341.html

Do we have a bug here or we just can't stop the watchdog on brcm47xx?

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by florian

  • Owner changed from developers to hauke
  • Status changed from new to assigned

The bcm47xx watchdog driver seems to handle correctly the situation where we pass it 'V' and will then expect a close and stop the watchdog. I don't see a big difference in the logic handling this for ar71xx. Hauke, can you look at this? I don't have a bcm47xx-based board ready for testing.

comment:2 Changed 6 years ago by Scott Shambarger <scott-openwrt@…>

This is probably not a bug, but a configure option.

If CONFIG_WATCHDOG_NOWAYOUT is configured for the kernel, then even gracefully killing the watchdog process (which sends the magic char to the device) WONT stop the watchdog.

You can check if this is on with dmesg | grep Watchdog -- if you get something like

BCM47xx Watchdog Timer enabled (30 seconds, nowayout)

then you have the feature on. It can be disabled with a kernel cmdline option bcm47xx_wdt.nowayout=0, (or module parameter) or disabling it in menuconfig (if you're building the kernel).

Since openwrt has the init script to stop the watchdog, the default kernels really shouldn't have this feature on by default :)

comment:3 Changed 5 years ago by hauke

  • Resolution set to fixed
  • Status changed from assigned to closed

This is fixed in r34324.

comment:4 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.