esp_pm_lock_create causes panic because of an failed assertion

bbinet
Posts: 6
Joined: Tue Jun 22, 2021 10:36 pm

esp_pm_lock_create causes panic because of an failed assertion

Postby bbinet » Tue Oct 01, 2024 10:31 am

Hello,

I'm trying to use esp_pm apis to prevent esp to enter light sleep, but when I call esp_pm_lock_create, it generate a panic because of an failed assertion, see below:

Code: Select all

I (833) sensornode: Entering wave task
E (833) sensornode: >>> before esp_pm_lock_create

assert failed: prvNotifyQueueSetContainer queue.c:3272 (pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength)
Core  0 register dump:
MEPC    : 0x403806ca  RA      : 0x4038de5a  SP      : 0x3fca9d50  GP      : 0x3fc99800
Stack dump detected
0x403806ca: panic_abort at /home/bruno/dev/esp/esp-idf/components/esp_system/panic.c:452

0x4038de5a: esp_vApplicationIdleHook at /home/bruno/dev/esp/esp-idf/components/esp_system/freertos_hooks.c:43

TP      : 0x3fc612e0  T0      : 0x53657565  T1      : 0x61737365  T2      : 0x75517870
S0/FP   : 0x00000001  S1      : 0x3fca9eef  A0      : 0x3fca9da8  A1      : 0x3fc9b3a1
A2      : 0x00000001  A3      : 0x00000029  A4      : 0x00000001  A5      : 0x3fca1000
A6      : 0x69746961  A7      : 0x57736567  S2      : 0x00000048  S3      : 0x3fca9da8
S4      : 0x3fca9da8  S5      : 0x3c1024ee  S6      : 0x00000000  S7      : 0x00000000
S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000
T3      : 0x4d78753e  T4      : 0x2d72656e  T5      : 0x6961746e  T6      : 0x6f437465
MSTATUS : 0x00001801  MTVEC   : 0x40380001  MCAUSE  : 0x00000007  MTVAL   : 0x00000000
0x40380001: _vector_table at ??:?

MHARTID : 0x00000000


Backtrace:


panic_abort (details=details@entry=0x3fca9da8 "assert failed: prvNotifyQueueSetContainer queue.c:3272 (pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength)") at /home/bruno/dev/esp/esp-idf/components/esp_system/panic.c:452
452         *((volatile int *) 0) = 0; // NOLINT(clang-analyzer-core.NullDereference) should be an invalid operation on targets
#0  panic_abort (details=details@entry=0x3fca9da8 "assert failed: prvNotifyQueueSetContainer queue.c:3272 (pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength)") at /home/bruno/dev/esp/esp-idf/components/esp_system/panic.c:452
#1  0x4038de5a in esp_system_abort (details=details@entry=0x3fca9da8 "assert failed: prvNotifyQueueSetContainer queue.c:3272 (pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength)") at /home/bruno/dev/esp/esp-idf/components/esp_system/port/esp_system_chip.c:84
#2  0x40395d02 in __assert_func (file=<optimized out>, file@entry=0x3c1024ee "", line=<optimized out>, func=<optimized out>, expr=<optimized out>) at /home/bruno/dev/esp/esp-idf/components/newlib/assert.c:81
#3  0x4038e1a6 in prvNotifyQueueSetContainer (pxQueue=<optimized out>, pxQueue@entry=0x3fca9c10) at /home/bruno/dev/esp/esp-idf/components/freertos/FreeRTOS-Kernel/queue.c:3272
#4  0x4038e668 in xQueueGenericSend (xQueue=0x3fca9c10, pvItemToQueue=pvItemToQueue@entry=0x0, xTicksToWait=<optimized out>, xTicksToWait@entry=0, xCopyPosition=xCopyPosition@entry=0) at /home/bruno/dev/esp/esp-idf/components/freertos/FreeRTOS-Kernel/queue.c:917
#5  0x40381848 in lock_release_generic (lock=lock@entry=0x3fca10bc <s_list_lock>, mutex_type=mutex_type@entry=1 '\001') at /home/bruno/dev/esp/esp-idf/components/newlib/locks.c:192
#6  0x403818b4 in _lock_release (lock=lock@entry=0x3fca10bc <s_list_lock>) at /home/bruno/dev/esp/esp-idf/components/newlib/locks.c:198
#7  0x42060106 in esp_pm_lock_create (lock_type=lock_type@entry=ESP_PM_NO_LIGHT_SLEEP, arg=arg@entry=0, name=name@entry=0x3c10e184 "", out_handle=out_handle@entry=0x3fca9f24) at /home/bruno/dev/esp/esp-idf/components/esp_pm/pm_locks.c:72
#8  0x4200ee00 in wave_task (param=0x3fca863c) at ../components/sensornode/src/core/sensornode.c:1314
#9  0x00000000 in ?? ()
Backtrace stopped: frame did not save the PC
ELF file SHA256: aac93af9289a223b

Rebooting...
Is there anything to do before calling esp_pm_lock_create, on something to configure in my sdkconfig?

Thanks in advance for your help.

Who is online

Users browsing this forum: No registered users and 72 guests