Skip to content

examples/gnrc_border_router: esp_wifi crashes on disconnect  #14679

@benpicco

Description

@benpicco

Description

When operating as a border router with an esp_now client, the border router will crash after a while with what seems like a disconnect event that is not handled correctly.

Steps to reproduce the issue

Follow the steps described in RIOT-OS/Release-Specs#185:

  • flash the border router

    make -C examples/gnrc_border_router BOARD=esp8266-esp-12x UPLINK=wifi WIFI_SSID='your_ssd' WIFI_PASS='your_password' PORT=/dev/ttyUSB0 flash term
    
  • flash the esp_now client

      make -C examples/gnrc_networking BOARD=esp8266-esp-12x PORT=/dev/ttyUSB1 flash term
    

It seems like the client node is crucial for this bug to occur.
With the second node disconnected, the border router did not crash.

Expected results

The border router keeps operating continuously.

Actual results

After a while (~10 Minutes) the border router crashes and reboots.

2020-08-02 20:40:50,865 # scandone
2020-08-02 20:41:00,866 # scandone
2020-08-02 20:41:10,868 # scandone
2020-08-02 20:41:14,377 # LmacRxBlk:0
2020-08-02 20:41:15,378 # LmacRxBlk:0
2020-08-02 20:41:16,379 # LmacRxBlk:0
2020-08-02 20:41:17,380 # LmacRxBlk:0
2020-08-02 20:41:18,381 # LmacRxBlk:0
2020-08-02 20:41:19,162 # bcn_timout,ap_probe_send_start
2020-08-02 20:41:19,382 # LmacRxBlk:0
2020-08-02 20:41:20,383 # LmacRxBlk:0
2020-08-02 20:41:21,384 # LmacRxBlk:0
2020-08-02 20:41:21,666 # ap_probe_send_over, rest wifi status to disassoc
2020-08-02 20:41:21,669 # state: 5 -> 0 (100)
2020-08-02 20:41:21,669 # rm 0
2020-08-02 20:41:21,675 # WiFi disconnected from ssid beersperminute, reason 200 (BEACON_TIMEOUT)
2020-08-02 20:41:21,770 # EXCEPTION!! exccause=9 (LoadStoreAlignmentCause) @40228c38 excvaddr=40249fbb
2020-08-02 20:41:21,771 # processes:
2020-08-02 20:41:21,779 # 	pid | name                 | state    Q | pri | stack  ( used) ( free) | base addr  | current     
2020-08-02 20:41:21,787 # 	  - | isr_stack            | -        - |   - |   2048 ( 1092) (  956) | 0x3ffe8410 | 0x3ffe8c10
2020-08-02 20:41:21,798 # 	  1 | ppT                  | bl rx    _ |   2 |   3640 ( 1320) ( 2320) | 0x3fff7480 | 0x3fff8150 
2020-08-02 20:41:21,806 # 	  2 | pmT                  | bl rx    _ |   4 |   1080 (  328) (  752) | 0x3fff8300 | 0x3fff8600 
2020-08-02 20:41:21,814 # 	  3 | rtT                  | bl mutex _ |   3 |   2104 ( 1356) (  748) | 0x3fff8740 | 0x3fff8e80 
2020-08-02 20:41:21,823 # 	  4 | esp_events           | bl rx    _ |   5 |   2104 (  892) ( 1212) | 0x3fff95b0 | 0x3fff9c80 
2020-08-02 20:41:21,831 # 	  5 | idle                 | pending  Q |  31 |   1024 (  236) (  788) | 0x3ffef18c | 0x3ffef4b0 
2020-08-02 20:41:21,839 # 	  6 | main                 | bl mutex _ |  15 |   3072 ( 1484) ( 1588) | 0x3ffef58c | 0x3ffeff40 
2020-08-02 20:41:21,848 # 	  7 | 6lo                  | pending  Q |  11 |   1024 (  568) (  456) | 0x3fff2d38 | 0x3fff2f30 
2020-08-02 20:41:21,856 # 	  8 | ipv6                 | pending  Q |  12 |   1536 (  800) (  736) | 0x3fff05d0 | 0x3fff0980 
2020-08-02 20:41:21,865 # 	  9 | udp                  | bl rx    _ |  13 |   1024 (  492) (  532) | 0x3fff351c | 0x3fff3790 
2020-08-02 20:41:21,873 # 	 10 | netif-esp-now        | running  Q |  10 |   2560 (  948) ( 1612) | 0x3fff4124 | 0x3fff4930 
2020-08-02 20:41:21,881 # 	 11 | netif-esp-wifi       | bl rx    _ |   9 |   1024 (  932) (   92) | 0x3fff4cf4 | 0x3fff4f40 
2020-08-02 20:41:21,892 # 	 12 | dhcpv6-client        | bl anyfl _ |  13 |   1024 (  800) (  224) | 0x3fff01cc | 0x3fff04a0 
2020-08-02 20:41:21,898 # 	    | SUM                  |            |     |  23264 (11248) (12016)
2020-08-02 20:41:21,898 # 
2020-08-02 20:41:21,900 # *** RIOT kernel panic:
2020-08-02 20:41:21,901 # FAILED ASSERTION.
2020-08-02 20:41:21,901 # 
2020-08-02 20:41:21,909 # 	pid | name                 | state    Q | pri | stack  ( used) ( free) | base addr  | current     
2020-08-02 20:41:21,917 # 	  - | isr_stack            | -        - |   - |   2048 ( 1236) (  812) | 0x3ffe8410 | 0x3ffe8c10
2020-08-02 20:41:21,926 # 	  1 | ppT                  | bl rx    _ |   2 |   3640 ( 1320) ( 2320) | 0x3fff7480 | 0x3fff8150 
2020-08-02 20:41:21,937 # 	  2 | pmT                  | bl rx    _ |   4 |   1080 (  328) (  752) | 0x3fff8300 | 0x3fff8600 
2020-08-02 20:41:21,945 # 	  3 | rtT                  | bl mutex _ |   3 |   2104 ( 1356) (  748) | 0x3fff8740 | 0x3fff8e80 
2020-08-02 20:41:21,953 # 	  4 | esp_events           | bl rx    _ |   5 |   2104 (  892) ( 1212) | 0x3fff95b0 | 0x3fff9c80 
2020-08-02 20:41:21,962 # 	  5 | idle                 | pending  Q |  31 |   1024 (  236) (  788) | 0x3ffef18c | 0x3ffef4b0 
2020-08-02 20:41:21,970 # 	  6 | main                 | bl mutex _ |  15 |   3072 ( 1484) ( 1588) | 0x3ffef58c | 0x3ffeff40 
2020-08-02 20:41:21,978 # 	  7 | 6lo                  | pending  Q |  11 |   1024 (  568) (  456) | 0x3fff2d38 | 0x3fff2f30 
2020-08-02 20:41:21,987 # 	  8 | ipv6                 | pending  Q |  12 |   1536 (  800) (  736) | 0x3fff05d0 | 0x3fff0980 
2020-08-02 20:41:21,995 # 	  9 | udp                  | bl rx    _ |  13 |   1024 (  492) (  532) | 0x3fff351c | 0x3fff3790 
2020-08-02 20:41:22,004 # 	 10 | netif-esp-now        | running  Q |  10 |   2560 (  948) ( 1612) | 0x3fff4124 | 0x3fff4930 
2020-08-02 20:41:22,012 # 	 11 | netif-esp-wifi       | bl rx    _ |   9 |   1024 (  932) (   92) | 0x3fff4cf4 | 0x3fff4f40 
2020-08-02 20:41:22,020 # 	 12 | dhcpv6-client        | bl anyfl _ |  13 |   1024 (  800) (  224) | 0x3fff01cc | 0x3fff04a0 
2020-08-02 20:41:22,029 # 	    | SUM                  |            |     |  23264 (11392) (11872)
2020-08-02 20:41:22,029 # 
2020-08-02 20:41:22,030 # *** halted.

0x40228c38 points to core/mutex.c:75 which is not very enlightening.

Versions

RIOT master

Metadata

Metadata

Labels

Area: examplesArea: Example ApplicationsArea: networkArea: NetworkingPlatform: ESPPlatform: This PR/issue effects ESP-based platformsType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions