[Ovmsdev] Frequent Crashes

Michael Balzer dexter at expeedo.de
Tue Aug 11 19:19:07 HKT 2020


Derek,

this may be the kind of watchdog trigger currently left on my mystery list.

The crash debug info (you can also check "boot" for this) tells you the
watchdog was triggered by the DukTape task, and the event system had
been processing the "ticker.1" event scripts for 59 seconds.

That may be caused either by a bug in your script leading to a loop, or
(more likely) by another, higher priority task running a busy loop and
eating all available CPU cycles.

Please check your script for a potential loop, but I've seen similar
crashes without event scripts on my module. I.e. no event scripts
installed, but watchdog triggered during a ticker.1 handling in the
EventScript function -- that lead me to think that may be a bug in the
filesystem layer, as the function always scans the script directories.
But the WDT also gets triggered while the scripting system is in another
context.

That's why I currently think this must be some networking related issue.

DukTape runs at priority level 3 on core 1. Higher priority tasks on
core 1 are:

  * OVMS Console (pri 5)
  * OVMS NetMan (pri 5)
  * OVMS Events (pri 8 -- unlikely, as waiting for DukTape here)
  * OVMS Vehicle (pri 10, vehicle CAN processing)
  * tiT (LwIP, pri 18)
  * ipc1 (system core IPC, pri 24)


I currently run a test build on my module having the OVMS Events task
running at pri=19. That's a wild guess we may need to react to some
network event to stop the LwIP task from busy looping. The system event
handler is placed at pri=20 so would normally get CPU time prior to the
LwIP task. No issues with that test build up to now, but has only been
running for three days now, so not conclusive as a counter measure.

As you see this issue frequently, please try raising the Events task
priority from 8 to 19. That's set in ovms_events.cpp, line 163.

  xTaskCreatePinnedToCore(EventLaunchTask, "OVMS Events", 8192,
(void*)this, _*19*_, &m_taskid, CORE(1));

Please report if that helps.

Thanks & regards,
Michael


Am 11.08.20 um 12:41 schrieb Derek Caudwell:
> Hi all,
>
> Firstly, thank you Michael for your patience and help in getting the
> static ip changes/framework to a point they could be incorporated into
> the master. 
>
> With the edge build I appear to be getting frequent crashes, am I
> correct in interpreting from the crash logs that these are caused by
> DukTape? I currently have a simple js
> in /store/events/system.wifi.sta.disconnected/10-test.js to see how
> js/events engine works.
> 2020-08-11 22:02:37 NZST I (178142) ovms-server-v2: Send MP-0 h1,-166,*-OVM-DebugCrash,0,2592000,3.2.014-42-g6c884ce/ota_0/edge (build idf v3.3.2-881-g22d636b Aug 10 2020 00:01:35),23,Crash,12,12,23,0,abort(),0,,0x4008e627 0x4008e8c1 0x400e6edc 0x40083f6a ,6,Task watchdog,ticker.1,EventScript,59,OVMS DukTape
>
> 2020-08-11 22:07:06 NZST I (21202) ovms-server-v2: Send MP-0
> h1,-10,*-OVM-DebugCrash,0,2592000,3.2.014-42-g6c884ce/ota_0/edge
> (build idf v3.3.2-881-g22d636b Aug 10 2020
> 00:01:35),25,Crash,12,12,25,0,abort(),0,,0x4008e627 0x4008e8c1
> 0x400e6edc 0x40083f6a ,6,Task
> watchdog,ticker.10,EventScript,60,IDLE1|OVMS DukTape 
>
> Kind regards
> Derek
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20200811/d709402e/attachment.htm>


More information about the OvmsDev mailing list