Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lwip assertion: esp_add_netif: Double add #306

Open
szupi-ipuzs opened this issue Dec 17, 2024 · 0 comments · May be fixed by #309
Open

lwip assertion: esp_add_netif: Double add #306

szupi-ipuzs opened this issue Dec 17, 2024 · 0 comments · May be fixed by #309

Comments

@szupi-ipuzs
Copy link
Contributor

I've been running my cbu-based devboard for a few days continuously and logging via serial. Log configuration:

bk72xx:
  board: cb2s
  framework:
    sdk_silent: "none"
    loglevel: VERBOSE
    options:
      LT_DEBUG_ALL: 1
      LT_DEBUG_WIFI: 1
      LT_DEBUG_MDNS: 1
      LT_DEBUG_LWIP: 1
      LT_DEBUG_OTA: 1
      LT_DEBUG_LWIP_ASSERT: 1
      LT_DEBUG_CLIENT: 1
      LT_DEBUG_SERVER: 1
      #LT_LOGGER_CALLER: 1
      #LT_LOGGER_TASK: 1
      LT_LOGGER_TIMESTAMP: 0
      LT_LOGGER_CALLER: 0
      LT_LOGGER_TASK: 0
      LT_LOG_HEAP: 1

logger:
  level: VERY_VERBOSE

During this time I rebooted my router twice and after each time I observed the following assertion, followed by a WDT reset:

[2024-12-16 16:57:26.018] sm_deauth_handler
[2024-12-16 16:57:26.018] sm_deauth_handler reason=16,vif=0
[2024-12-16 16:57:26.018] sm_disconnect_process reason=16
[2024-12-16 16:57:26.023] me_set_ps_disable:869 0 0 1 0 9
[2024-12-16 16:57:26.023] me_set_ps_disable_req_handler 9!!
[2024-12-16 16:57:26.029] mm_set_vif_state_req_handler
[2024-12-16 16:57:26.029] mm_set_vif_state pass
[2024-12-16 16:57:26.035] SM_DISCONNECT_IND
[2024-12-16 16:57:26.035] mhdr_disconnect_ind reason_code=16
[2024-12-16 16:57:26.040] deassoc_evt_cb
[2024-12-16 16:57:26.040] D WIwpa_driver_deassoc_cb
[2024-12-16 16:57:26.040] FI: BK event 7
[2024-12-16 16:57:26.046] WLAN_EVENT_DISCONNECTED[W][wifi_lt:296]
[2024-12-16 16:57:26.052] sta_ip_down
[2024-12-16 16:57:26.052] D [wifievent]: EveMDNS: Netif changednt: Disconnected ssid='/added, starting mDNS on' bssid=00:00:00:00 netif 1
[2024-12-16 16:57:26.063] D :00:00 reason='ConnMDNS: Starting mDNS on D WIFI: Disconnecting from  (wifiOff=0)
[2024-12-16 16:57:26.074] bk_wlan_connection_loss vif:0
[2024-12-16 16:57:26.074] I Free heap: 27616
[2024-12-16 16:57:26.079] D WIFI: Disconnecting from  (wifiOff=0)
[2024-12-16 16:57:26.079] bk_wlan_connection_loss vif:0
[2024-12-16 16:57:26.086] I WIFI: Connecting to 9e:c9:eb:e9:06:80 
[2024-12-16 16:57:26.091] D WIFI: Data = (nil)
[2024-12-16 16:57:26.091] D WIFI: Using DHCP
[2024-12-16 16:57:26.096] D WIFI: Starting WiFi...
[2024-12-16 16:57:26.096] ection Failed'netif 1
[2024-12-16 16:57:26.103] ASSERT "mdns_r
[2024-12-16 16:57:26.103] esp_add_netif: Double add" - /config/.esphome/platformio/packages/library-lwip@src-c718385076ab23087e1f617d7cb3e11a/src/apps/mdns/mdns.c:2377

The log is scrambled a bit, but it seems that mdns_netif_ext_status_callback() incorrectly handles some combinations of "reason" parameters which eventually causes calling mdns_resp_add_netif (lwip function) twice for the same netif, which triggers an assertion. Possible that it was broken by #263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant