Skip to content

Hard Fault after mDNS Query and Deep Sleep #10197

Open
@aaron97neu

Description

@aaron97neu

CircuitPython version and board name

Adafruit CircuitPython 9.2.6 on 2025-03-23; Adafruit Feather ESP32S2 with ESP32S2

Code/REPL

#!/usr/bin/env python3
import wifi
import mdns

import alarm

import time
import os

ssid = os.getenv("WIFI_SSID")
password = os.getenv("WIFI_PASSWORD")

wifi.radio.connect(ssid, password)

mdns_svr = mdns.Server(wifi.radio)
services = mdns_svr.find(service_type="_mqtt", protocol="_tcp", timeout=5)

wake_alarm = alarm.time.TimeAlarm(monotonic_time=time.monotonic() + 300)
alarm.exit_and_deep_sleep_until_alarms(wake_alarm)

Behavior

0;🐍Wi-Fi: No IP | main.py | 9.2.60;🐍192.168.50.199 | Done | 9.2.6
Code done running.
Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Hard fault: memory access or instruction error.                                                                
Please file an issue with your program at github.com/adafruit/circuitpython/issues.                            
Press reset to exit safe mode.                                                                                 
                                                                                                               
Press any key to enter the REPL. Use CTRL-D to reload.  

Confirmed after storage.erase_filesystem() reset with no libraries loaded

Description

Running without services = mdns_svr.find(service_type="_mqtt", protocol="_tcp", timeout=5) results in expected behavior, have not tested with alternate sleep modes

Additional information

Specifically ESP32S2 w/ BME280 sensor and 2.13" HD Tri-Color eInk display attached. However, these devices are not interacted with when triggering the fault

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions