Skip to content

dump processor stack trace on crashes to help debug #9383

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

Closed
aguaviva opened this issue Jun 28, 2024 · 3 comments
Closed

dump processor stack trace on crashes to help debug #9383

aguaviva opened this issue Jun 28, 2024 · 3 comments

Comments

@aguaviva
Copy link

aguaviva commented Jun 28, 2024

Please dump a stack trace info (both python and the processor stack) to help pin down where the error happened

This is what I got but couldn't tell why or how to proceed to debug things:

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!
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.
@bill88t
Copy link

bill88t commented Jun 28, 2024

Debug builds do that.
Build circuitpython with DEBUG=1 and you'll get a dump when crashing.
Then (at least for espressif), you can then get it decoded with tools/decode_backtrace.py.

@tannewt
Copy link
Member

tannewt commented Jun 28, 2024

Hard faults can often be due to memory corruption so we try to do as little as possible. We already have related bugs as well #8704 and #7490.

@tannewt tannewt closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2024
@aguaviva
Copy link
Author

Then I suggest having an error message that is a bit more actionable and explains what the next step it, in this case something along the lines: "please build circuitpython with DEBUG=1 to get an extended debug trace and include it in the bug report"

Thanks for your great work!

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

No branches or pull requests

3 participants