Error: FreeRTOS uxTaskNumber seems to be corrupted!

Hi, I using freeRTOS in esp32. actully I want to do the Proactive Process Switching(which you can find in the manual of esp32 chapter 28). so when i do from privileged to unprivileged pid(kernal mode to user mode). I got an error over there.

Error: FreeRTOS uxTaskNumber seems to be corrupted!
Error: Error: null stack pointer in thread
Error: RTOS: failed to get register list
Error: Error: null stack pointer in thread
Error: RTOS: failed to get register list
Error: Error: null stack pointer in thread
Error: RTOS: failed to get register list
Error: Error: null stack pointer in thread
Error: RTOS: failed to get register list

after that i thought maybe i need to create a task and run this function inside it. no as soon the debuging start i got below error. any idea how to fix these issue

Error: FreeRTOS uxTaskNumber seems to be corrupted!
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1816 ms). Workaround: increase “set remotetimeout” in GDB

The following 2 seems related:

Can you please check your version of GDB and OpenOCD? Do you see these errors when not using GDB?