Skip to content

esp8266 crashes on WiFi disconnect #21558

@benpicco

Description

@benpicco

Description

When the WiFi connection is lost (reason 204 (HANDSHAKE_TIMEOUT) or reason 8 (ASSOC_LEAVE)) the system crashes with a LoadStoreAlignmentCause exception.

Steps to reproduce the issue

  • connect to a WiFi
  • reboot appears to trigger it, but also can happen spontaneously (when the WiFi connection is lost)

Expected results

No crash

Actual results

2025-06-23 13:57:19,639 # Iface  10  HWaddr: 84:F3:EB:0F:43:6D  Channel: 6  Link: up 
2025-06-23 13:57:19,644 #           L2-PDU:1500  MTU:1500  HL:64  Source address length: 6
2025-06-23 13:57:19,647 #           Link type: wireless
2025-06-23 13:57:19,653 #           inet6 addr: fe80::86f3:ebff:fe0f:436d  scope: link  VAL
2025-06-23 13:57:19,655 #           inet6 group: ff02::1
2025-06-23 13:57:19,662 #           inet6 group: ff02::1:ff0f:436d

2025-06-23 13:58:16,647 # reboot
2025-06-23 13:58:16,653 # WiFi disconnected from ssid Springfield, reason 8 (ASSOC_LEAVE)
2025-06-23 13:58:16,755 # EXCEPTION!! exccause=9 (LoadStoreAlignmentCause) @40211899 excvaddr=4025e12b
2025-06-23 13:58:16,756 # processes:
2025-06-23 13:58:16,763 # 	pid | name                 | state    Q | pri | stack  ( used) ( free) | base addr  | current     
2025-06-23 13:58:16,772 # 	  - | isr_stack            | -        - |   - |   2048 ( 1108) (  940) | 0x3ffe8000 | 0x3ffe8800
2025-06-23 13:58:16,783 # 	  1 | ppT                  | bl mutex _ |   2 |   3640 ( 1320) ( 2320) | 0x3fff7470 | 0x3fff8110 
2025-06-23 13:58:16,791 # 	  2 | pmT                  | bl mutex _ |   4 |   1080 (  380) (  700) | 0x3fff82f0 | 0x3fff85c0 
2025-06-23 13:58:16,800 # 	  3 | rtT                  | bl mutex _ |   3 |   2104 ( 1100) ( 1004) | 0x3fff8730 | 0x3fff8e00 
2025-06-23 13:58:16,808 # 	  4 | esp_events           | bl mutex _ |   5 |   2104 (  924) ( 1180) | 0x3fff95a0 | 0x3fff9c40 
2025-06-23 13:58:16,816 # 	  5 | idle                 | running  Q |  31 |   1024 (  244) (  780) | 0x3ffee580 | 0x3ffee8a0 
2025-06-23 13:58:16,825 # 	  6 | main                 | bl mutex _ |  15 |   3072 ( 1344) ( 1728) | 0x3ffee980 | 0x3ffef310 
2025-06-23 13:58:16,833 # 	  7 | event                | bl anyfl _ |  14 |   2048 (  296) ( 1752) | 0x3fff16c4 | 0x3fff1db0 
2025-06-23 13:58:16,842 # 	  8 | ipv6                 | bl rx    _ |  12 |   1536 (  808) (  728) | 0x3fff1f08 | 0x3fff2390 
2025-06-23 13:58:16,850 # 	  9 | udp                  | bl rx    _ |  13 |   1472 (  356) ( 1116) | 0x3fff4080 | 0x3fff44f0 
2025-06-23 13:58:16,858 # 	 10 | netif-esp-wifi       | bl anyfl _ |  10 |   1536 (  844) (  692) | 0x3ffefd48 | 0x3fff0230 
2025-06-23 13:58:16,866 # 	    | SUM                  |            |     |  21664 ( 8724) (12940)
2025-06-23 13:58:16,866 # 
2025-06-23 13:58:16,875 # /home/[email protected]/dev/RIOT/cpu/esp_common/syscalls.c:206 => *** RIOT kernel panic:
2025-06-23 13:58:16,875 # FAILED ASSERTION.
2025-06-23 13:58:16,875 # 
2025-06-23 13:58:16,883 # 	pid | name                 | state    Q | pri | stack  ( used) ( free) | base addr  | current     
2025-06-23 13:58:16,894 # 	  - | isr_stack            | -        - |   - |   2048 ( 1284) (  764) | 0x3ffe8000 | 0x3ffe8800
2025-06-23 13:58:16,902 # 	  1 | ppT                  | bl mutex _ |   2 |   3640 ( 1320) ( 2320) | 0x3fff7470 | 0x3fff8110 
2025-06-23 13:58:16,911 # 	  2 | pmT                  | bl mutex _ |   4 |   1080 (  380) (  700) | 0x3fff82f0 | 0x3fff85c0 
2025-06-23 13:58:16,919 # 	  3 | rtT                  | bl mutex _ |   3 |   2104 ( 1100) ( 1004) | 0x3fff8730 | 0x3fff8e00 
2025-06-23 13:58:16,927 # 	  4 | esp_events           | bl mutex _ |   5 |   2104 (  924) ( 1180) | 0x3fff95a0 | 0x3fff9c40 
2025-06-23 13:58:16,935 # 	  5 | idle                 | running  Q |  31 |   1024 (  244) (  780) | 0x3ffee580 | 0x3ffee8a0 
2025-06-23 13:58:16,944 # 	  6 | main                 | bl mutex _ |  15 |   3072 ( 1344) ( 1728) | 0x3ffee980 | 0x3ffef310 
2025-06-23 13:58:16,952 # 	  7 | event                | bl anyfl _ |  14 |   2048 (  296) ( 1752) | 0x3fff16c4 | 0x3fff1db0 
2025-06-23 13:58:16,960 # 	  8 | ipv6                 | bl rx    _ |  12 |   1536 (  808) (  728) | 0x3fff1f08 | 0x3fff2390 
2025-06-23 13:58:16,969 # 	  9 | udp                  | bl rx    _ |  13 |   1472 (  356) ( 1116) | 0x3fff4080 | 0x3fff44f0 
2025-06-23 13:58:16,977 # 	 10 | netif-esp-wifi       | bl anyfl _ |  10 |   1536 (  844) (  692) | 0x3ffefd48 | 0x3fff0230 
2025-06-23 13:58:16,985 # 	    | SUM                  |            |     |  21664 ( 8900) (12764)
2025-06-23 13:58:16,986 # 
2025-06-23 13:58:16,986 # *** halted.

Versions

2025.07-devel-423-g15cc7

Metadata

Metadata

Assignees

Labels

Platform: ESPPlatform: This PR/issue effects ESP-based platformsType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions