Skip to content

lwip assertion: esp_add_netif: Double add #306

@szupi-ipuzs

Description

@szupi-ipuzs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions