Guru Medication Error on using Uart

Ritu21
Posts: 123
Joined: Sat Aug 04, 2018 9:58 am

Guru Medication Error on using Uart

Postby Ritu21 » Thu Feb 28, 2019 12:49 pm

Hi,

I have made an application in which rfid card read is sent to the server. There are two tasks running in the application: one for receiving rfid data and another for sending data to the server

When the card is continously read for 8-10 minutes, it gives Guru Medication Error as below

Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x400ebeb8 PS : 0x00060133 A0 : 0x800ed525 A1 : 0x3ffcf0f0
A2 : 0x3ffb4af4 A3 : 0x00000004 A4 : 0x3ffb129c A5 : 0x3ffb474c
A6 : 0x00003030 A7 : 0x00003030 A8 : 0x33413141 A9 : 0xcd04c504
A10 : 0x0d0193cc A11 : 0x3ffcd284 A12 : 0x00000001 A13 : 0x00000001
A14 : 0x00060120 A15 : 0x00008d42 SAR : 0x00000010 EXCCAUSE: 0x0000001c
EXCVADDR: 0x0d0193cc LBEG : 0x4000c349 LEND : 0x4000c36b LCOUNT : 0xffffffff

Backtrace: 0x400ebeb8:0x3ffcf0f0 0x400ed522:0x3ffcf120 0x400d5b46:0x3ffcf170

Entering gdb stub now.
$T0b#e6+$#00

I tried back tracing the error but didn't get what it is saying:

0x400ebeb8 in uart_pattern_queue_update (uart_num=<optimized out>, diff_len=4)
at D:/Ritu/ESP32/ESP32-WROMM-32/esp-idf/components/driver/uart.c:403
403 p_pos->data[rd] -= diff_len;
(gdb) bt
#0 0x400ebeb8 in uart_pattern_queue_update (uart_num=<optimized out>,
diff_len=4)
at D:/Ritu/ESP32/ESP32-WROMM-32/esp-idf/components/driver/uart.c:403
#1 0x400ed525 in uart_read_bytes (uart_num=UART_NUM_1,
buf=0x3ffb4748 <rx_data_buff> "08005A6ECCF0", length=12,
ticks_to_wait=100)
at D:/Ritu/ESP32/ESP32-WROMM-32/esp-idf/components/driver/uart.c:1199
#2 0x400d5b49 in rx_task ()
at D:/Ritu/ESP32/ESP32-WROMM-32/esp-idf/examples/smartAttendance/main/smartAttendance.c:247
(gdb)

Please help and decipher the above statement!!!

Thanks
R.

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

Re: Guru Medication Error on using Uart

Postby ESP_Dazz » Thu Feb 28, 2019 5:15 pm

LoadProhibited means the CPU was attempting to load a value from an illegal address, being EXCVADDR: 0x0d0193cc from the log you provided. The offending instruction that caused the illegal load is p_pos->data[rd] -= diff_len; in uart_pattern_queue_update().

The backtrace shows a the following callflow

Code: Select all

1. rx_task();
2. uart_read_bytes(UART_NUM_1, 0x3ffb4748, 12, 100);	//Called by rx_task() in smartAttendance.c:247
3. uart_pattern_queue_update(?, 4);		//Called by uart_read_bytes() in esp-idf/components/driver/uart.c:1199
4. p_pos->data[rd] -= diff_len;		//Called by uart_pattern_queue_update() in esp-idf/components/driver/uart.c:403
My guess is that the int *data pointer of p_pos is corrupted as an address of 0x0d0193cc makes it seem unlikely that this out of bounds memory access is due to a bad rd index. Do you reset your queue patterns at any point? If not then it could be due to memory corruption.

Ritu21
Posts: 123
Joined: Sat Aug 04, 2018 9:58 am

Re: Guru Medication Error on using Uart

Postby Ritu21 » Fri Mar 01, 2019 8:25 am

Hi,

Thanks for the reply. I am not resetting any queue patterns. It could be the memory corruption issue but I really dont understand how to resolve this issue.

Could you please help me on this???

Thanks
R.

Who is online

Users browsing this forum: No registered users and 60 guests