mongoose-os icon indicating copy to clipboard operation
mongoose-os copied to clipboard

Fail in softAP mode

Open VaclavVejrosta opened this issue 4 years ago • 8 comments

Hi,

since I have updated my mos to version 2.19 I can see a quite new bug. It happens during pairing of my "smart device". First of all the device creates an AP and I connect to it with my mobile. Then the device gets the data about the current wifi network and then it tries to connet to wifi. But when disconnecting the softAP mode an error occures and the device is restarted. However, the device is connected to wifi correctly after reboot.

Please see log: Log.txt

The problem never occured with mos 2.18. By the way, how can I downgrade my mos back to 2.18? I used command mos update version 2.18.0 but it fails.

VaclavVejrosta avatar Jan 25 '21 14:01 VaclavVejrosta

Hi, although I cannot help you with the actual issue. You can add these lines to your mos.yml to pin the build to a specific version. Put 2.18.0 instead of ${mos.version}

DrBomb avatar Jan 25 '21 14:01 DrBomb

Hi, although I cannot help you with the actual issue. You can add these lines to your mos.yml to pin the build to a specific version. Put 2.18.0 instead of ${mos.version}

Fine, thank you!

VaclavVejrosta avatar Jan 25 '21 14:01 VaclavVejrosta

"Stack canary watchpoint triggered" - this suggests stack overflow, and that is a huge stack,indeed. looks like you're sending logs to websocket, and that log entry is emitted from networking stack itself... i think the problem might be because between 2.18 and 2.19 we redirected IDF logging to the mos logging handler, and now it goes through all the other logging handlers. try turning off fancy logging, does it still happen?

rojer avatar Jan 26 '21 20:01 rojer

I have disabled the ws logs and it helped. The problem disappeared. However I use the ws logs in my products so unfortunately this is not the solution for me.

VaclavVejrosta avatar Jan 28 '21 14:01 VaclavVejrosta

i see. i think the task mentioned is the timer task, can you increase CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH from 4096 to, say. 6144 and see if that helps?

build_vars:
  ESP_IDF_SDKCONFIG_OPTS: >
    ${build_vars.ESP_IDF_SDKCONFIG_OPTS}
    CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=6144

rojer avatar Jan 28 '21 22:01 rojer

I tried to increase the value up to 16 384 and it didn't help.

VaclavVejrosta avatar Jan 29 '21 13:01 VaclavVejrosta

Have you got any other ideas?

VaclavVejrosta avatar Feb 08 '21 14:02 VaclavVejrosta

i might, let me think about it some more...

rojer avatar Feb 08 '21 15:02 rojer