Reply
Thread Tools
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#1
While restoring my usual configuration via ssh, the watchdog (I guess so) decided that it's time to force reboot my N900.

For the command, take a look here: http://wiki.maemo.org/User:Marmistrz and find "WARNING". The reboot took place while configuring ogg-support.

Why is the watchdog so overzealous (the N900 seemed quite responsive)? And what's the best thing to do with it? I'll be currently trying to nice -n 19 it [third reflash in day!], but I'm not a fan of putting it before each and every command?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 
pichlo's Avatar
Posts: 6,447 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#2
I always wince whenever I visit any web site with pictures because any of them has a 50% chance of rebooting my phone. The photo competition threads on the voting day increase the chance to 100%. So yes, I would like to know that too.

Curiously, it seems rather random. Loading a page with a large picture triggers the watchdog. As does copying a big folder in any file manager. But copying the same folder with cp, compiling a large projject or a batch download in modRana does not, even though the latter makes the phone completely unresponsive and hot as hell.
 

The Following 6 Users Say Thank You to pichlo For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#3
@all,

I'll repeat this forever: R&D mode. All advantages, no disadvantages. Period.
 

The Following 4 Users Say Thank You to reinob For This Useful Post:
pichlo's Avatar
Posts: 6,447 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#4
I've seen that in another thread. But would like to know a bit more. What does it do? How? Do I just enable it in flasher and the world peace is automatically guaranteed? Do I need to do anything else? Information, data, please
 

The Following 4 Users Say Thank You to pichlo For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#5
Originally Posted by pichlo View Post
I've seen that in another thread. But would like to know a bit more. What does it do? How? Do I just enable it in flasher and the world peace is automatically guaranteed? Do I need to do anything else? Information, data, please
With N900/Maemo you have 3 watchdogs: hardware, external, and software. AFAIK the external is not used anyway.

The hardware watchdog is the one that reboots the device if it's not kicked for more than 30 seconds. The software watchdog is the "lifeguard reset" from DSME. This reboots the device essentially when a DSME-controlled daemon gets killed.

If you disable those two watchdogs your chances of getting into a reboot loop are seriously reduced. The disadvantage is that if something goes really crazy then your device will freeze or drain the battery or explode into a supernova, but at least you'll notice it instead of the usual "huh? did my N900 just reboot and I'll never know why?".

The rest of R&D flags are less important or unknown (to me):
- serial-console: not so useful unless you actually plug/solder a serial cable.
- no-usb-timeout: no idea
- sti-console: no idea
- no-charging: prevents charging. could be useful when testing a battery..
- force-power-key: when turning on the boot reason will be "pwr_key". Some startup scripts read it. I think I have it on for all my N900s, but I'm not sure how important this is.
 

The Following 6 Users Say Thank You to reinob For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#6
And which flags should be enabled?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#7
disadvantages for R&D mode:
* keyboard backlight is never turned off (even when keyboard is closed!)
* some internal maemo processes/libraries could have different behaviour

If (auto)reboot occures it is not always problem of system or not working watchdog kicker. Reboot can be invoked also by SW: lifeguard daemon or kernel oops/panic.

Watchdog kicking is implemented in DSME daemon at it should work... If not make sure if daemon is running and *nobody* stopping it for whatever reason.

Lifeguard daemon (which can do SW reboot) monitoring processes, free space and something other and if some daemon is crashing too many times or there is no free space in /tmp/... /var/tmp/... or no free memory it will reboot phone. This could fix freezed phone whithout damaging FS (as kernel correctly umount FSs and do clean reboot) but I understand that this is sometimes not good.

Btw, R&D flags are described in 0xFFFF manpage:

Code:
R&D flags
       no-omap-wd
              disable auto reboot by OMAP watchdog

       no-ext-wd
              disable auto reboot by external watchdog

       no-lifeguard-reset
              disable auto reboot by software lifeguard

       serial-console
              enable serial console

       no-usb-timeout
              disable usb timeout for flashing

       sti-console
              enable sti console

       no-charging
              disable battery charging

       force-power-key
              force omap boot reason to power key
Flags serial-console and sti-console does not make any sense for 99% people, no-charging will be probably ignored when using BME replacement and force-power-key setting bootreason to bootloader which propagate it to kernel.

I think that R&D mode is really not needed for normal usage. If some application crashing or rebooting phone without R&D mode then there *is* serious problem in Maemo system or in that application.

It would be great to start investigating that problem instead saying "there is no problem" (and enabling R&D mode with flags which basically disable protection mechanisms).
 

The Following 8 Users Say Thank You to pali For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#8
Originally Posted by pali View Post
If some application crashing or rebooting phone without R&D mode then there *is* serious problem in Maemo system or in that application.
Absolutely. The problem is there are just too many pieces of Maemo who "randomly" (from the PoV of the user) decide that a reboot is necessary. The very fact that a watchdog is present and active is an indication that things are known to fail. I've never had an active watchdog on a PC.

It would be great to start investigating that problem instead saying "there is no problem" (and enabling R&D mode with flags which basically disable protection mechanisms).
Enabling R&D is a workaround, not a solution. But the solution basically involves dumping Maemo and starting again. Not doable anytime soon. Perhaps some day we'll have a real "upstream" Linux with working phone (voice, sms, data). Then I'll be the first to dump Maemo for good.
 

The Following 4 Users Say Thank You to reinob For This Useful Post:
Posts: 2,290 | Thanked: 4,134 times | Joined on Apr 2010 @ UK
#9
Originally Posted by reinob View Post
I've never had an active watchdog on a PC.
Without a watchdog the device could eat battery until it dies. This wouldn't happen on a desktop.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#10
Modern Intel ISA bridge LPC Controllers have TCO watchdog. It can be enabled by driver iTCO_wdt.ko
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:27.