Heap Corruption while Publishing Shadow Update

I notice a heap corruption rarely. Not reproduceable everytime while publishing a shadow update. The current set up has a Shadow task which deletes itself after reporting the default device status.

When I turned on the heap debugging in ESP32, I noticed some of the logs which I find difficult to comprehend. Does this mean the heap corruption is caused because of lack enough memory allocated to the task or something else has already corrupted the heap before it comes down the shadow update?

Thanks in Advance.

These messages come from ESP-IDF and likely indicate some sort of heap corruption. Try these suggestions from Espressif - Heap Memory Debugging - ESP32 - — ESP-IDF Programming Guide latest documentation