ESP32 Devkit - Guru Meditation Error: Core 1 panic'ed (LoadProhibited)

Hi everyone,

I can’t get my ESP32 Devkitt with OMG 0.9.11 to work.
Seconds after boot, I got a kernel panic and the ESP restarts. It configure itself without problems, gets WLAN and MQTT connection and publish the system-status-message over MQTT properly (I receive the message on an other machine).

I used different types of flash-methods (online-tool, with configuration over the WLAN-AP and manual over the Arduino IDE with modified config-files). I’m using the ZgatewayRF-module.

I almost tried different ESP’s to check if it is a hardware-problem. I’m using an ESP32-Devkit-V1 and an ESP32-Devkitc-V4. Both with the same error.

Over the command
esptool.py -p /dev/tty.usbserial-0001 --chip esp32 erase_flash
I erased the flash-memory in case it was corrupted. It didn’t help.

I even tried different versions of OMG, starting with 0.9.9 up to 0.9.11.
Back in February I started using OMG. I think it was version 0.9.10 I installed initially - and it works pretty well for about two month. No problems, No panics. Then - by mistake - I erased the ESP and wanted to set it up again. That was the moment, where the problems start. Every install attempt ends up in a boot-loop.

Here the logfile (log level = trace) - this comes over and over again. Reboot, Panic at the same point, Reboot, …:

************* WELCOME TO OpenMQTTGateway **************
N: OpenMQTTGateway Version: version_tag
T: mounting FS...
T: mounted file system
*WM: [1] Free heap:        202180
*WM: [1] ESP-IDF version:  v3.3.5-1-g85c43024c
*WM: [3] allocating params bytes: 20
*WM: [2] Added Parameter: server
*WM: [2] Added Parameter: port
*WM: [2] Added Parameter: user
*WM: [2] Added Parameter: pass
*WM: [2] Added Parameter: secure
*WM: [3] Updated _max_params: 10
*WM: [3] re-allocating params bytes: 40
*WM: [2] Added Parameter: cert
*WM: [2] Added Parameter: name
*WM: [2] Added Parameter: topic
N: Attempting Wifi connection with saved AP: 0
N: Attempting Wifi connection with saved AP: 1
E (877) wifi:sta is connecting, return error
N: Attempting Wifi connection with saved AP: 2
E (1378) wifi:sta is connecting, return error
N: Attempting Wifi connection with saved AP: 3
E (1879) wifi:sta is connecting, return error
N: Attempting Wifi connection with saved AP: 4
E (2380) wifi:sta is connecting, return error
N: Connect your phone to WIFI AP: OpenMQTTGateway with PWD: your_password
*WM: [1] AutoConnect 
*WM: [2] ESP32 event handler enabled 
*WM: [1] AutoConnect: ESP Already Connected 
*WM: [1] STA static IP:
*WM: [2] setSTAConfig static ip not set 
*WM: [1] AutoConnect: SUCCESS 
*WM: [1] STA IP Address: 192.168.2.57
T: OpenMQTTGateway mac: ******************
T: OpenMQTTGateway ip: 192.168.2.57
T: Port: 1883
T: Mqtt server: 192.168.2.56
N: RF_EMITTER_GPIO: 12 
N: RF_RECEIVER_GPIO: 27 
T: ZgatewayRF command topic: home/OpenMQTTGateway/commands/MQTTto433
T: ZgatewayRF setup done
T: enableActiveReceiver: 2
N: Switching to RF Receiver
T: mqtt_max_packet_size: 1024
N: OpenMQTTGateway modules: ["RF"]
N: ************** Setup OpenMQTTGateway end **************
W: MQTT connection...
N: Connected to broker
T: [ OMG->MQTT ] topic: home/OpenMQTTGateway/LWT msg: online 
T: [ OMG->MQTT ] topic: home/OpenMQTTGateway/version msg: version_tag 
T: Subscription OK to the subjects home/OpenMQTTGateway/commands/#
T: retrieving value of system characteristics Uptime (s):4
N: Send on /SYStoMQTT msg {"uptime":4,"version":"version_tag","freemem":254940,"mqttport":"1883","mqttsecure":false,"freestack":5848,"rssi":-48,"SSID":"********","ip":"192.168.2.57","mac":"***********","actRec":2,"modules":["RF"]}
T: jsonPubl - ON
T: [ OMG->MQTT ] topic: home/OpenMQTTGateway/SYStoMQTT msg: {"uptime":4,"version":"version_tag","freemem":255360,"mqttport":"1883","mqttsecure":false,"freestack":5848,"rssi":-48,"SSID":"********","ip":"192.168.2.57","mac":"*********","actRec":2,"modules":["RF"]} 
T: Hey I got a callback home/OpenMQTTGateway/commands/MQTTtoSYS/config
N: [ MQTT->OMG ]: {"discovery":true}
T: MQTTtoSYS json
T: Hey I got a callback home/OpenMQTTGateway/commands/433toMQTT
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x400d161d  PS      : 0x00060030  A0      : 0x800d1c60  A1      : 0x3ffb1ae0  
A2      : 0x00000014  A3      : 0x3f400606  A4      : 0x00000009  A5      : 0x99999999  
A6      : 0xffffffff  A7      : 0x00000014  A8      : 0x00000000  A9      : 0x00000000  
A10     : 0x3ffba5ad  A11     : 0x3ffba5ac  A12     : 0x00060020  A13     : 0x00000000  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000018  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000020  LBEG    : 0x4000c349  LEND    : 0x4000c36b  LCOUNT  : 0xffffffff  

ELF file SHA256: 0000000000000000

Backtrace: 0x400d161d:0x3ffb1ae0 0x400d1c5d:0x3ffb1b00 0x400d26f6:0x3ffb1b20 0x400d6482:0x3ffb1b40 0x400d65cb:0x3ffb1f10 0x40186103:0x3ffb1f30 0x400d71a6:0x3ffb1f50 0x400d42cd:0x3ffb1f90 0x400eb28c:0x3ffb1fb0 0x40089c7e:0x3ffb1fd0

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6388
entry 0x400806b4

Does somebody have a hint, what I’m doing wrong? It seems like I’m the only person who runs into this problems…

Thanks everybody!

Hello,
Seems that OMG is getting a callback just after the connection.
Could you connect to your broker and delete all the retained message on home/OpenMQTTGateway.
Also check if there is another software publishing to this topic.

1 Like

You are amazing! I already had the feeling that I could be related to the MQTT-Broker… But that there are retained messages that cause the kernel panic - never thought about it.

Problem solved within seconds!

On the MQTT-Broker-Host I simple did the following:

sudo systemctl stop mosquitto.service

sudo rm /var/lib/mosquitto/mosquitto.db

sudo systemctl start mosquitto.service

That’s it! I flashed version 0.9.11 again an everything works like a charm.
Thanks for the reply! Great support, great software.

Have a nice weekend!

1 Like

Glad that it worked. Thanks have a nice week end too