watchdogTimeout not set


#1

Hi all,

I tried to set an initial watchdog Timeout in my .adef file by doing :

version: 1.0.0
sandboxed:false
watchdogAction: reboot
watchdogTimeout: 20000

I have set le_wdog.api in the require section of my .cdef

My problem is that the timeout is not properly set at the beginning of the app : it seems like watchdogTimeout: 20000 does nothing, because on the first call of le_wdog_Kick I get the following warning :

Jan 27 14:48:54 | Legato | m2msmartbox[25217]/framework T=main | le_wdog_client.c le_wdog_Timeout() 606 | Sending message to server and waiting for response : 4 bytes sent
Jan 27 14:48:54 | Legato | watchdog[508]/watchdog T=main | watchdog.c GetConfigKickTimeoutInterval() 425 | Unknown app with uid 0 requested watchdog - using default timeout 30000 ms

Then if I hard code the timeout at the initialisation by calling le_wdog_Timeout() in COMPONENT_INIT, I get the same warning.

What can I do to get rid of this Warning and set my Timeout properly?

Additional info:
warning happens only the first time I call a le_wdog function (le_wdog_Kick() or le_wdogTimeout) : I can cheat by calling le_wdog_Timeout twice (first won’t work and display the Warning, and second will set my timeout correctly)

Thanks


#2

That does look like a bug, could you create an issue on https://github.com/legatoproject/legato-af so we can track the resolution?
Also it’s open-source so if you want to give a shot at solving the problem, feel free to do a pull request with your contribution!


#3

Please put the output of this command in your bug report: config get /apps/yourAppName/watchdogTimeout. I would expect that the “30000” should be displayed. Also, make sure you specify which version of the Legato framework you are using.

Thanks!


#4

The bug only occurs when the app is not sandboxed.

I have posted a proof of concept app here: https://github.com/dpfrey/legato_watchdog_bug