Skip to content

tests/drivers/watchdog/wdt_basic_api fails on Quark SE / x86 and esp32 #8097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
inakypg opened this issue Jun 1, 2018 · 16 comments
Closed
Assignees
Labels
area: Watchdog Watchdog bug The issue is a bug, or the PR is fixing a bug platform: ESP32 Espressif ESP32 priority: medium Medium impact/importance bug
Milestone

Comments

@inakypg
Copy link
Contributor

inakypg commented Jun 1, 2018

Toolchain: ZEPHYR_GCC_VARIANT=zephyr

Commit 43553da

Testcase seems to never complete after restarting the system

Error Console Log on quark_se_c1000/x86:

***** delaying boot 1000ms (per build configuration) *****
***** Booting Zephyr OS 1.12.0-rc2 (delayed boot 1000ms) *****
Running test suite wdt_basic_test
===================================================================
starting test - test_wdt
Testcase: test_wdt_no_callback
***** delaying boot 1000ms (per build configuration) *****
***** Booting Zephyr OS 1.12.0-rc2 (delayed boot 1000ms) *****
Running test suite wdt_basic_test
===================================================================
starting test - test_wdt
Testcase: test_wdt_no_callback

Error Console Log on esp32:

***** Booting Zephyr OS v1.12.0-831-g5b8e4ae (delayed boot 1000ms) *****
Running test suite wdt_basic_test
===================================================================
starting test - test_wdt
Testcase: test_wdt_no_callback
 ** FATAL EXCEPTION
 ** CPU 0 EXCCAUSE 20 PS 0x00060120 PC 0x00000000 VADDR 0x00000000
 **  A0 0x80082419  SP 0x3ffb1b70  A2 0x00000000  A3 0x00000000
 **  A4 0x3ffb0000  A5 0x3ffb0208  A6 0x3ffb0208  A7 0x00000000
 **  A8 0x8008099f  A9 0x3ffb1b20 A10 0x3ffb0000 A11 0x3ffb1280
 ** A12 0x3ffb036f A13 0x3ffb26e0 A14 0x3ffb021c A15 0x3ffb14c0
 ** LBEG 0x00000000 LEND 0x00000000 LCOUNT 0x00000000
 ** SAR 0x00000000
Current thread ID = 0x3ffb021c
Faulting instruction address = 0xdeaddead
Fatal fault in ISR! Spinning...
@inakypg inakypg added bug The issue is a bug, or the PR is fixing a bug area: Watchdog Watchdog labels Jun 1, 2018
@MaureenHelm MaureenHelm added the priority: medium Medium impact/importance bug label Jun 1, 2018
@tbursztyka tbursztyka assigned nashif and unassigned tbursztyka Jun 4, 2018
@tbursztyka
Copy link
Collaborator

tbursztyka commented Jun 4, 2018

I don't know why this was assigned to me, but running a git bisect (I put the good point on 1.11) points to commit 7a5ff13

@nashif Can you check?

That said, while running the git bisect, I realized that test (which is made only for qmsi... that sucks, moreover it's supposed to test the generic API but anyway) gives a slight different output on success sometimes: sometime it resets and pass, sometime it does not reset but still passes.
Sometimes it fails and loops over and over on the callback...

@nashif
Copy link
Member

nashif commented Jun 4, 2018

@nashif Can you check?

i just hit this commit with bisect myself, looking

@nashif nashif assigned punitvara and unassigned nashif Jul 13, 2018
@pswarnak pswarnak changed the title tests/drivers/watchdog/wdt_basic_api fails on Quark SE / x86 tests/drivers/watchdog/wdt_basic_api fails on Quark SE / x86 and esp32 Jul 19, 2018
@nashif
Copy link
Member

nashif commented Jul 24, 2018

@punitvara status update please? any fix in sight?

@ManojSubbarao
Copy link

@punitvara Please take a quick look and drive this issue to closure. This is pending from long time without any updates.

@SavinayDharmappa
Copy link
Contributor

@nashif I did some intial analysis, the watch dog timer for qmsi and esp32 are not moved to new interfaces introduced . But application uses newly introduced interface for which the QMSI and esp32 WDT driver are not compaitable. This reason why esp32 crashes. Still wondering why null pointer derefercing of QMSI driver is not showing crash log instead just hangs.

@markusr
Copy link

markusr commented Aug 31, 2018

I also have a problem with watchdog example on STM32 (nucleo_l432kc).

***** Booting Zephyr OS v1.13.0-rc2-1-g19b7eaa *****
***** USAGE FAULT *****
  Illegal use of the EPSR
***** Hardware exception *****
Current thread ID = 0x2000022c
Faulting instruction address = 0x80200288
Fatal fault in essential thread! Spinning...
***** Booting Zephyr OS v1.13.0-rc2-1-g19b7eaa *****
***** USAGE FAULT *****
  Illegal use of the EPSR
***** Hardware exception *****
Current thread ID = 0x2000022c
Faulting instruction address = 0x80200288
Fatal fault in essential thread! Spinning...

@SavinayDharmappa
Copy link
Contributor

@nashif @ManojSubbarao Modified wdt driver to new interfaces defined in watchdog.h. As of now only no callback test case is passing other two test cases are failing. I am still debugging the issue.

@SavinayDharmappa
Copy link
Contributor

After wdt qmsi driver changes , test cases for watchdog are passing. I have tested it on quark_se_c1000 board. I will work on esp32 driver changes as this driver also needs to be migrated for new wdt API interfaces.

@SavinayDharmappa
Copy link
Contributor

Implemented new wdt api interface for esp32. After that test case are failing, because global data are re-initialized upon system reset due watchdog time expiry. I am still debugging. This not the case for quark_se_c100.

@SavinayDharmappa
Copy link
Contributor

#9872

@ManojSubbarao
Copy link

@SavinayDharmappa please look into this issue

@SavinayDharmappa
Copy link
Contributor

SavinayDharmappa commented Feb 11, 2019

This issue is reproduced only in quark d2000 and arc of quark_se_c1000 . The driver changes for x86 quark_se_c1000 works fine, still debugging to find the root cause.

@SavinayDharmappa
Copy link
Contributor

In case of quark_d2000 watchdog reset is triggered , but variable defined in the app_noinit section also getting reinitialized during watchdog reset, which not the case for other platforms. Because of which "test_wdt_no_callback" repeats indefinitely.

@SavinayDharmappa
Copy link
Contributor

After further debugging it clear from status register reset is triggered by watchdog only but ram contents are being lost in that reset. Because of which test is going repeated loop. I think we have bypass this testcase for quark_d2000 @nashif

@SavinayDharmappa
Copy link
Contributor

#13659

@ManojSubbarao
Copy link

Closed via #13659

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Watchdog Watchdog bug The issue is a bug, or the PR is fixing a bug platform: ESP32 Espressif ESP32 priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

8 participants