The firmware execution falls into Idle Task

I increased the stack size for a few tasks. I didn’t see the hard fault ever since. But I saw the system hung. I ran the firmware from IAR. When the firmware is stuck, I hit the Pause button in IAR. It falls into the Idle task. Here is the call stack:

rm_freertos_port_sleep_preserving_lpm
vApplicationIdleHook
prvIdleTask
prvTaskExitError

I suspect there is a dead lock besides the stack size issue. I have a recursive mutex. Previously, I called “xSemaphoreTakeRecursive(myMutex, 0xFFFFFFFF)”. Now I change it to something like: xSemaphoreTakeRecursive(myMutex, pdMS_TO_TICKS(20000))
I’ll try this to see if it’ll help.
Let me know if you have any suggestions.
Thanks!