esp-idf: Wifi stack hangs (IDFGH-9724) (IDFGH-9725)

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

4.4 release, tried latest 4.4 latest as well

Operating System used.

Linux

How did you build your project?

Command line with Make

If you are using Windows, please specify command line type.

None

Development Kit.

ESP32-PICO-KIT

Power Supply used.

USB

What is the expected behavior?

Wifi connects every time

What is the actual behavior?

Sometimes (approximately 1 in hundreds to a thousand) the wifi stack gets into an inconsistent state and is unable to connect or scan properly. The tell-tale sign is appearance of W (67573) wifi:m f probe req l=0 messages on the console, and additionally, wifi can no longer be properly stopped, after 5 seconds of blocking it prints the following:

[Mar 24 09:26:53.884] W (19912322) wifi:TX Q not empty: 500, TXQ_BLOCK=0
[Mar 24 09:26:53.884] W (19912322) wifi:force witi stop
[Mar 24 09:26:53.890] I (19912322) wifi:flush txq
[Mar 24 09:26:53.890] I (19912332) wifi:stop sw txq
[Mar 24 09:26:53.897] I (19912332) wifi:lmac stop hw txq
[Mar 24 09:26:53.897] W (19912332) wifi:sw tx 0 state not idle, potential error!
[Mar 24 09:26:53.903] W (19912342) wifi:force sw tx 0 state to idle, ebuf flag=3009

restarting does not solve the issue, and deinit causes a core dump due to what looks like a double-free on some internal buffer:

[Mar 24 09:26:53.909] I (19912342) wifi:Deinit lldesc rx mblock:4
[Mar 24 09:26:53.915].
[Mar 24 09:26:53.915] assert failed: tlsf_free heap_tlsf.c:964 (!block_is_free(block) && "block already marked as free")

Steps to reproduce.

I have firmware that reboots 5 seconds after wifi connects and it will get into this state within an hour or two.

Debug Logs.

No response

More Information.

No response

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

No, that “duplicate” label is just a bug of our issue tracking system. Somehow two internal issues got created for this GitHub issue; the second one was marked as “duplicate”, and the resolution got synced back to this issue. I’ll clear the label.