Restart if Guru Meditation Error

jensknudsen
Posts: 4
Joined: Fri Nov 01, 2019 2:03 pm

Restart if Guru Meditation Error

Postby jensknudsen » Fri Nov 01, 2019 2:13 pm

Is it possible to automatically restart the ESP if it experiences a Guru Meditation Error?

Sometimes my ESP freezes and the serial monitor shows Guru Meditation Error (+some description). This of course needs debugging in itself, but it happens quite rarely and I find it hard to recreate those bugs. So for now, it would be extremely useful if the ESP restarted instead of freesing.

Any clues? :)

ESP_Dazz
Posts: 147
Joined: Fri Jun 02, 2017 6:50 am

Re: Restart if Guru Meditation Error

Postby ESP_Dazz » Fri Nov 01, 2019 5:46 pm

In menuconfig, the config option CONFIG_ESP32_PANIC should allow you to set the panic behavior to:
  • Print registers and halt
  • Print registers and reboot
  • Silent reboot
  • Invoke GDBStub

jensknudsen
Posts: 4
Joined: Fri Nov 01, 2019 2:03 pm

Re: Restart if Guru Meditation Error

Postby jensknudsen » Fri Nov 01, 2019 6:01 pm

Thank you for your reply!

I forgot to mention that I am using Arduino to compile.. Do you know how to configure this using Arduino?

ESP_Dazz
Posts: 147
Joined: Fri Jun 02, 2017 6:50 am

Re: Restart if Guru Meditation Error

Postby ESP_Dazz » Mon Nov 04, 2019 9:43 am

It should already be configured to print and reboot on Arduino, at least according to the sdkconfig file. Could you paste the serial output of the Guru Meditation error you're seeing?

jensknudsen
Posts: 4
Joined: Fri Nov 01, 2019 2:03 pm

Re: Restart if Guru Meditation Error

Postby jensknudsen » Mon Nov 04, 2019 9:59 am

Hi,
Yes, that seems to correct, is there any way of editing this?

Here is the output I got:
Gu Meditation Error: Core panic'ed (Interrupt wdt timeout on CPU1
The missing letters and formatting might suggest problems with power(??). However I did not get any brownout detection.

ESP_Dazz
Posts: 147
Joined: Fri Jun 02, 2017 6:50 am

Re: Restart if Guru Meditation Error

Postby ESP_Dazz » Mon Nov 04, 2019 11:29 am

If configured to print and reboot, the log output should look something like this (notice how it prints "Rebooting" at the end).

Code: Select all

Hello World
Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x400d395c  PS      : 0x00060630  A0      : 0x800d0ab1  A1      : 0x3ffb4f10
A2      : 0x00000001  A3      : 0x00000001  A4      : 0x00000001  A5      : 0x00000001
A6      : 0x00060021  A7      : 0x00060023  A8      : 0x00000000  A9      : 0x3ffb4ef0
A10     : 0x0000000a  A11     : 0x8001f880  A12     : 0x06ff1ff8  A13     : 0x00000000
A14     : 0x3ffaffe0  A15     : 0x3ffb6870  SAR     : 0x00000014  EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffc

ELF file SHA256: 65fb33f22df59b8c8dd3dfcc1623e455b128afd6ea5d49090eb4dcafd83d2c2a
Backtrace: 0x400d3959:0x3ffb4f10 0x400d0aae:0x3ffb4f30 0x40086fd5:0x3ffb4f50

Rebooting...
If configured to print and halt, the log output should look something like this:

Code: Select all

Hello World
Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x400d395c  PS      : 0x00060630  A0      : 0x800d0ab1  A1      : 0x3ffb4f10
A2      : 0x00000001  A3      : 0x00000001  A4      : 0x00000001  A5      : 0x00000001
A6      : 0x00060021  A7      : 0x00060023  A8      : 0x00000000  A9      : 0x3ffb4ef0
A10     : 0x0000000a  A11     : 0x8001f880  A12     : 0x06ff1ff8  A13     : 0x00000000
A14     : 0x3ffaffe0  A15     : 0x3ffb6870  SAR     : 0x00000014  EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffc

ELF file SHA256: cb4f0853599e287873217f5050ca938ed45b0455011a4c37633b9138593bdb1a
Backtrace: 0x400d3959:0x3ffb4f10 0x400d0aae:0x3ffb4f30 0x40086fd9:0x3ffb4f50
CPU halted.
If you see the log output print "Rebooting" and the ESP32 is not rebooting, then it could be an entirely different issue.

jensknudsen
Posts: 4
Joined: Fri Nov 01, 2019 2:03 pm

Re: Restart if Guru Meditation Error

Postby jensknudsen » Mon Nov 11, 2019 11:02 am

Ok, I will have to do some more testing. Thanks for your reply:)

idahowalker
Posts: 132
Joined: Wed Aug 01, 2018 12:06 pm

Re: Restart if Guru Meditation Error

Postby idahowalker » Mon Nov 11, 2019 8:16 pm

You might want to hunt down and install the "esp exception decoder arduino", it could provide some help with hunting down the issue.

Who is online

Users browsing this forum: No registered users and 6 guests