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

Hardfault after 8-10 pings to IP every 200msec on ESP32-S2/S3 #6955

Closed
todbot opened this issue Sep 28, 2022 · 6 comments
Closed

Hardfault after 8-10 pings to IP every 200msec on ESP32-S2/S3 #6955

todbot opened this issue Sep 28, 2022 · 6 comments
Labels

Comments

@todbot
Copy link

todbot commented Sep 28, 2022

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.0 on 2022-08-18; Adafruit QT Py ESP32-S3 no psram with ESP32S3
Adafruit CircuitPython 8.0.0-beta.0 on 2022-08-18; S2Mini with ESP32S2-S2FN4R2
Adafruit CircuitPython 7.3.3 on 2022-08-29; S2Mini with ESP32S2-S2FN4R2
Adafruit CircuitPython 7.3.0-rc.1 on 2022-05-18; Adafruit QT Py ESP32-S3 no psram with ESP32S3

Code/REPL

import time
import wifi
import ipaddress
from secrets import secrets
ip_to_ping = "1.1.1.1"
print("connecting...")
wifi.radio.connect(ssid=secrets['ssid'],password=secrets['password'])

print("my IP addr:", wifi.radio.ipv4_address)
print("pinging ",ip_to_ping)
ip1 = ipaddress.ip_address(ip_to_ping)
while True:
    print("ping:", wifi.radio.ping(ip1))
    time.sleep(0.2)

Behavior

[18:05:04.211] Waiting for tty device..
[18:05:05.222] Connected
my IP addr: 192.168.42.189
pinging  1.1.1.1
ping: 0.0
ping: 0.0
ping: 0.017
ping: 0.026
ping: 0.037
ping: 0.048
ping: 0.017
ping: 0.013

[18:05:11.276] Disconnected
[18:05:12.293] Connected
Adafruit CircuitPython 8.0.0-beta.0 on 2022-08-18; Adafruit QT Py ESP32-S3 no psram with ESP32S3
>>>
soft reboot

Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Crash into the HardFault_Handler.
Please file an issue with the contents of your CIRCUITPY drive at
https://github.com/adafruit/circuitpython/issues

Press any key to enter the REPL. Use CTRL-D to reload.

Description

Above is the serial output via tio for one example run. You can ping about 8-10 times, then it HardFaults.

The same code with time.sleep(1) does not seem to crash.

This happens on both ESP32-S2 and ESP32-S3, on both 7.3.3 and 8.0.0-beta0.

Additional information

This was originally reported by @Wind-stormger here todbot/circuitpython-tricks#10

@todbot todbot added the bug label Sep 28, 2022
@todbot todbot changed the title Hardfault when after 8-10 pings to n IP every 200msec on ESP32-S2/S3 Hardfault when after 8-10 pings to IP every 200msec on ESP32-S2/S3 Sep 28, 2022
@todbot todbot changed the title Hardfault when after 8-10 pings to IP every 200msec on ESP32-S2/S3 Hardfault after 8-10 pings to IP every 200msec on ESP32-S2/S3 Sep 28, 2022
@Wind-stormger
Copy link

Thanks for testing again.

@anecdata
Copy link
Member

Is this distinct from #5980?

@todbot
Copy link
Author

todbot commented Sep 28, 2022

Yep, this is a dupe of 5980, with the only addition is that it is still a problem in 8.0 and on ESP32-S2 and ESP32-S3.

I will close this issue. Apologies, I didn't search hard enough in existing issues before submitting this one.

@todbot todbot closed this as completed Sep 28, 2022
@anecdata
Copy link
Member

Tod would you mind commenting with the updated findings?

There's an older ping issue on Espressif, but it's closed espressif/esp-idf#5202

@todbot
Copy link
Author

todbot commented Sep 28, 2022

You mean leave a comment in 5980 with 8.0 & S2/S3 info?

@anecdata
Copy link
Member

Please, yes, that would bring the comments up to date.

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

No branches or pull requests

3 participants