Linux watchdog driver is broken.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-17 6:55 PM
Hi,
I have already post a similar issue in the previous post.
I'm using initramfs shell using initramfs-framework in Yocto environment.
I found that watchdog reboots after some time (the default is 32 seconds) if the initramfs doesn't fully boot the system by entering systemd.
The weird thing is though, this happens even WATCHDOG_HANDLE_BOOT_ENABLED is set correctly.
According to the source code of watchdog_dev.c in Linux Kernel if WATCHDOG_HANDLE_BOOT_ENABLED=y is set the kernel watchdog thread should handle watchdog correctly until a userspace program (systemd?) takes over /dev/watchdog. However, watchdog still reboots the board.
https://elixir.bootlin.com/linux/v4.14/source/drivers/watchdog/watchdog_dev.c#L1124
I set similar yocto environments (with WATCHDOG_HANDLE_BOOT_ENABLED=y) in Raspberry Pi 3 and Beaglebone Black, and their kernel seems to handle watchdog correctly as they don't reboot in initramfs environment for a long time. Only STM32MP1 seems to have problems with watchdog.
- Labels:
-
OpenSTLinux
-
STM32MP15 Lines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-18 6:03 AM
Hi @Bumsik Kim​
Your post has been escalated internally for analyze.
Keep you posted.
BR,
Olivier
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-19 8:00 AM
Hi @Bumsik Kim​
Issue reproduced internally by decreasing the watchdog timeout value to occur during kernel boot.
Waiting a correction, I would propose to increase the timeout value to be high than the boot duration :
https://wiki.st.com/stm32mpu/wiki/IWDG_device_tree_configuration#DT_configuration_-28board_level-29
In that case, don't forget to align the userland timeout value in /etc/systemd/system.conf:
RuntimeWatchdogSec=<your new timeout value>
BR,
Christophe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-19 8:10 PM
Thanks for the quick update!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-24 12:39 AM
Hi @Bumsik Kim​
Actually, we did not reproduce the issue.
Our test on DK2 with both SDCard or ramfs boot decreasing the IDWG watchdog to 1s never trig any reboot during kernel boot.
Could you please share more detail on your context and full log of the failing boot sequence ?
Thanks,
Olivier
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-04 4:34 PM
@Community member​
@Christophe Guibout​
Hi, sorry for a long silent.
I reproduced the problem on OpenSTLinux.
The easiest way to reproduce the problem is just disable systemd userland watchdog. Just delete the two lines in /etc/systemd/system.conf:
RuntimeWatchdogSec=30
ShutdownWatchdogSec=5min
Or just delete systemd-conf.bbappend and 0001-Enable-hardware-watchdog-inside-systemd.patch in layers/meta-st/meta-st-stm32mp/recipes-core/systemd in OpenSTLinux. You don't need this systemd-conf.bbappend if the kernel driver is implemented correctly.
As I mentioned earlier the kernel must take care of the watchdog when systemd watchdog is disabled, however, you will experience infinite reboot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-06 7:13 AM
Hi,
I am also facing the same issue. I am also booting kernel with ramdisk by passing rdinit=/bin/sh on command line but after 32sec by target(STM32MP157A-EV1) is calling reset and reason watchdog as mentioned in log below. I tried to disable the watchdog timer also but it is not working. Please suggest any pointer to fix this issue.
INFO: Reset reason (0x214):
INFO: IWDG2 Reset (rst_iwdg2)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-06 7:21 AM
Thanks @Bumsik Kim​ for update and @PPand.4​ to raise the point.
The topic has been reassigned internally.
Keep you posted.
Olivier
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-06 7:57 AM
Hi,
I found some quick fix. After booting from ramdisk please execute below mentioned commands:-
# mknod /dev/watchdog c 10 130
# watchdog -t 30 /dev/watchdog
Hope it will help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-09 7:22 PM
Hi,
Is there any update on this? I saw the changelog of the latest 1.2.0 but I see no mention about the watchdog.
