[Ovmsdev] NetManTask created twice
Mark Webb-Johnson
mark at webb-johnson.net
Tue Mar 20 14:41:40 HKT 2018
The NetManTask is actually mongoose (or the task that runs the mongoose event loop from within netmanager).
There should only be one running at any one time. But it can be started/stopped many times. That task delivers mongoose events to users, so the memory allocations could also be in response to those events.
Note that there was a logic problem with this, that was definitely causing issues. I fixed that this morning. Is it repeatable still for you? Happy if you want to add the AddTaskToMap to ovms_netmanager, or tell me how it should go in and I’ll do it.
With current code, you can stop NetManTask by stopping ALL network interfaces (modem, wifi ap and client). You can start NetManTask by creating one or more network interfaces (start a modem or wifi ap or client).
Regards, Mark.
> On 20 Mar 2018, at 2:34 PM, Stephen Casner <casner at acm.org> wrote:
>
> Mark,
>
> I'm looking for the memory allocated to nonexistant tasks. In my code
> I added a call to AddTaskToMap() after the creation of the NetManTask.
> Now I see that the nonexistant task holding 264 bytes was an earlier
> instance of NetManTask. Do you expect it to be created, killed, and
> created again?
>
> I'm considering making a public function that will query the task list
> to populate the TaskMap, same as what is done now when the module
> memory or module tasks command is invoked. Then I would add some
> calls to that function at one or more places in system startup to try
> to capture the other unnamed task while it exists. Any suggestions
> for where to make such a call?
>
> The output below is with the aforementioned AddTaskToMap() call added
> plus some changes in ovms_module to list the tasks in module memory in
> task number order so the order is consistent from one run to the next
> and with the nonexistent ones first and marked with asterisk. I can
> commit these changes if that is OK at this point.
>
> -- Steve
>
> Free 8-bit 31760/283148, 32-bit 27588/55864, SPIRAM 0/0
> --Task-- Total DRAM D/IRAM IRAM SPIRAM +/- DRAM D/IRAM IRAM SPIRAM
> no task * 5276 0 0 0 +5276 +0 +0 +0
> main * 40076 0 0 0 +40076 +0 +0 +0
> 3FFE5CDC * 0 1396 0 0 +0 +1396 +0 +0
> NetManTask * 0 264 0 0 +0 +264 +0 +0
> esp_timer 55112 0 644 0 +55112 +0 +644 +0
> eventTask 0 7620 0 0 +0 +7620 +0 +0
> ipc0 10848 0 0 0 +10848 +0 +0 +0
> ipc1 12 0 0 0 +12 +0 +0 +0
> Tmr Svc 0 27808 0 0 +0 +27808 +0 +0
> Housekeeping 17488 50384 0 0 +17488 +50384 +0 +0
> tiT 128 1640 0 0 +128 +1640 +0 +0
> AsyncConsole 0 20 27488 0 +0 +20 +27488 +0
> mdns 0 112 0 0 +0 +112 +0 +0
> wifi 0 1612 0 0 +0 +1612 +0 +0
> NetManTask 4 2200 0 0 +4 +2200 +0 +0
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
More information about the OvmsDev
mailing list