-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
no return from panic_abort(const char *details) (IDFGH-14221) #15018
Comments
Hi @ves011, Could you check if you have the the reboot behavior enabled for the panic handler? Make sure you have either the |
Yes. |
If you have a debugger attached then this behavior is expected. The system would set a breakpoint and let users probe for the faults. You can read about the configuration option CONFIG_ESP_DEBUG_OCDAWARE. |
The issue shows up without debugger attached. |
Could you provide us the following information -
|
target is ESP32S3 WROOM1N4R2
While in receive loop tcp_server() task is blocked on recv() and only send_task() is active sending continuously messages to the connected client. In some rare cases, the logs show the error pop up during both recv() and send() and in some of these rare cases the issue pop-up, which makes to module to get stuck |
looking at all the above i think will be easier for you to creade a small test app with my sdkconfig and target and force it ending in *void IRAM_ATTR attribute((noreturn, no_sanitize_undefined)) panic_abort(const char details) |
@ves011 I was not successful in reproducing the problem that you see. May I ask, if you see the panic banner being printed and any core-dump/register-dump on the console? It is strange that the panic handler does not reboot the chip. The fact that the problem occurs occasionally could indicate a memory corruption somewhere leading to a hang. So it is hard to say what is the cause here. |
Sorry for late reply, was disturbed by other tasks. The issue is quite annoying and pops up on 2 different modules. Not likely to be a memory issue. |
Hi @ves011, |
There is something wrong in my code? Definiteley yes. No piece of code should end in a panic handler. |
Hi @ves011, If it is the former, then it is rather strange that the panic handler does not reboot the system occasionally. Usually, such issues should be consistently reproducible. The only suspicion I have currently is that some memory corruption might be happening which is causing the panic_handler to misbehave. Which is why it might be prudent to narrow down to the problematic part by running a reduced set of the app code, if possible. Another way we could rule out any bugs with the panic_abort() code would be to induce the abort() at other stages of the application to see if the behavior is consistent. Nevertheless, could you also try the below options and let me know the results?
|
Hello @ves011 , I also suspect that you have a memory corruption, it's hard to tell without a reproducible example but from the snippet you wrote above I can see a potential corruption:
Here, you are trying to send your message in multiple chunks, but you did a mistake in the cast. I think what you wanted to do is cast the In your case, the size of You will only have issues if your |
@o-marshmallow, thanks for pointing that, its already fixed, together with others. I’m sure there are still a lot to be fixed. *A piece of crap code ends in I can give you a way to reproduce the issue, which I agree is not trivial, but don’t ask me to debug an IDF problem which with the current version of the code i'm working, is no longer reproducible. |
Answers checklist.
General issue report
I have an application which ends in
*void IRAM_ATTR attribute((noreturn, no_sanitize_undefined)) panic_abort(const char details)
in panic.c line 449, and get stuck here.
Is there any reason why restart is not triggered?
The comment in user execption vector in xtensa_vectors.S line 623 is
/ never returns here - call0 is used as a jump (see note at top) /
But we need a way to recover from this situation without pressing reset button. A restart, like any other panic handlers, should be a reasonable option.
Are there other panic handlers which are not triggering restart?
The text was updated successfully, but these errors were encountered: