taskENTER_CRITICAL Guru meditation error StoreProhibited

nicolasmm
Posts: 7
Joined: Thu Sep 05, 2019 5:20 pm

taskENTER_CRITICAL Guru meditation error StoreProhibited

Postby nicolasmm » Thu Sep 05, 2019 7:03 pm

Hello,
I am using xEventGroups in a task, waiting for events to store some data in the sd card. But I keep having the same issue which happens after two to three hours of running the program, the output also tells me the error comes from xEventGroupWaitBits and other times says it si form xEventGroupSetBits.

I am currently using the latest version of the ESP-IDF in Ubuntu Linux, however, I have already tried the stable version in a failed attempt to solve the issue.

This is the line of code, for calling xEventGroupWaitBits, I have tryed both portMAX_DELAY and changing the delay but it keeps failing. This code is executing approximately three times every second when the delay is larger than the events:

Code: Select all

 EventBits_t mask_flags = BIT(0) | BIT(1);
EventBits_t flags = xEventGroupWaitBits(sis.flags_sd, mask_flags, pdTRUE, pdFALSE, portMAX_DELAY /* pdMS_TO_TICKS(1000) */);
This is the output that I get in the latest version:

Code: Select all

Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x4009a2fe  PS      : 0x00060333  A0      : 0x8009be53  A1      : 0x3ffd2de0
0x4009a2fe: uxPortCompareSet at /home/user/esp/esp-idf/components/freertos/include/freertos/portmacro.h:352
 (inlined by) vPortCPUAcquireMutexIntsDisabledInternal at /home/user/esp/esp-idf/components/freertos/portmux_impl.inc.h:86
 (inlined by) vPortCPUAcquireMutexIntsDisabled at /home/user/esp/esp-idf/components/freertos/portmux_impl.h:99
 (inlined by) vTaskEnterCritical at /home/user/esp/esp-idf/components/freertos/tasks.c:4201
A2      : 0x016cf46d  A3      : 0x00000001  A4      : 0x00060320  A5      : 0x0000cdcd
A6      : 0xb33fffff  A7      : 0x0000abab  A8      : 0x0000cdcd  A9      : 0x3ffd2de0
A10     : 0x00000003  A11     : 0x00060323  A12     : 0x00060320  A13     : 0x00000000
A14     : 0x00000000  A15     : 0x00000001  SAR     : 0x00000004  EXCCAUSE: 0x0000001d
EXCVADDR: 0x016cf46d  LBEG    : 0x4008ed05  LEND    : 0x4008ed15  LCOUNT  : 0xfffffffe
0x4008ed05: strlen at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/newlib/newlib/libc/machine/xtensa/strlen.S:84
0x4008ed15: strlen at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/newlib/newlib/libc/machine/xtensa/strlen.S:96

ELF file SHA256: ea33d5c560c667e101aa2db73b1b6f14a0406a6852e280c47fa4aa13044f5b1b

Backtrace: 0x4009a2fb:0x3ffd2de0 0x4009be50:0x3ffd2e10 0x400d72d3:0x3ffd2e40 0x4009958d:0x3ffd2ec0
0x4009a2fb: uxPortCompareSet at /home/user/esp/esp-idf/components/freertos/include/freertos/portmacro.h:352
 (inlined by) vPortCPUAcquireMutexIntsDisabledInternal at /home/user/esp/esp-idf/components/freertos/portmux_impl.inc.h:86
 (inlined by) vPortCPUAcquireMutexIntsDisabled at /home/user/esp/esp-idf/components/freertos/portmux_impl.h:99
 (inlined by) vTaskEnterCritical at /home/user/esp/esp-idf/components/freertos/tasks.c:4201
0x4009be50: xEventGroupWaitBits at /home/user/esp/esp-idf/components/freertos/event_groups.c:360 (discriminator 4)
0x400d72d3: tSD(void*) at /home/user/main/main.cpp:1052
0x4009958d: vPortTaskWrapper at /home/monitor/esp/esp-idf/components/freertos/port.c:143

Rebooting...
This is the output I get in the stable version, using the command: "make monitor >&1 | tee log.txt" to store the log, seeing the addres in backtrace with gdb, guide me to the same methods shown above:

Code: Select all

Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.^M
Core 0 register dump:^M
PC      : 0x4009013e  PS      : 0x00060c33  A0      : 0x80091d2f  A1      : 0x3ffd5050  ^M
A2      : 0xfafcf25c  A3      : 0x0000cdcd  A4      : 0xb33fffff  A5      : 0x00000001  ^M
A6      : 0x00060c20  A7      : 0x0000abab  A8      : 0x0000cdcd  A9      : 0x3ffd5050  ^M
A10     : 0x00000003  A11     : 0x00060c23  A12     : 0x00060c20  A13     : 0x00000001  ^M
A14     : 0x00060e20  A15     : 0x00000000  SAR     : 0x00000010  EXCCAUSE: 0x0000001d  ^M
EXCVADDR: 0xfafcf25c  LBEG    : 0x4009b8fc  LEND    : 0x4009b907  LCOUNT  : 0x00000000  ^M
^M
Backtrace: 0x4009013e:0x3ffd5050 0x40091d2c:0x3ffd5080 0x400dcc97:0x3ffd50a0 0x4008f3f9:0x3ffd6100^M

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: taskENTER_CRITICAL Guru meditation error StoreProhibited

Postby ESP_Sprite » Fri Sep 06, 2019 1:39 am

Hard to say, specifically without source code, but it looks like something is overwriting a pointer. Look at EXECVADDR in both examples; there should be an address (0x3Fxxxxxx ) in there, but there seems to be data in there. Can you try enabling heap debugging / canaries, see if that turns up something?

Who is online

Users browsing this forum: No registered users and 18 guests