Interrupt WDT when call heap_caps_dump(MALLOC_CAP_8BIT)

NathanJPhillips
Posts: 8
Joined: Thu Jan 23, 2020 3:53 pm

Interrupt WDT when call heap_caps_dump(MALLOC_CAP_8BIT)

Postby NathanJPhillips » Tue May 25, 2021 3:28 pm

I haven't been able to reproduce this in an empty project yet and probably won't have time to do so for a while but thought I'd post anyway and see if anyone else has seen `heap_caps_dump(MALLOC_CAP_8BIT)` cause the interrupt WDT to panic? I get it every time from my complex project, both from the main task and from other tasks. If anyone else has seen it then I'd be grateful for any hints about what causes it.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Interrupt WDT when call heap_caps_dump(MALLOC_CAP_8BIT)

Postby ESP_Angus » Wed May 26, 2021 2:06 am

Hi Nathan,

Heap code is executed in a critical section (interrupts off), and dumping the heap is slow (a lot of memory access but more importantly a lot of serial output which is usually a bottleneck). So the INT WDT is triggering for a valid reason (interrupts off for an extended) but there is no easy solution.

Unfortunately we don't provide a way to temporarily disable INT WDT at runtime, so the best option is to increase the timeout value to a high enough value that the dump can complete.

Angus

NathanJPhillips
Posts: 8
Joined: Thu Jan 23, 2020 3:53 pm

Re: Interrupt WDT when call heap_caps_dump(MALLOC_CAP_8BIT)

Postby NathanJPhillips » Wed May 26, 2021 5:21 pm

That makes sense. I guess the thing to do is to increase the timeout while debugging memory problems and then bring it back again once everything is stable to catch any interrupt problems.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Interrupt WDT when call heap_caps_dump(MALLOC_CAP_8BIT)

Postby ESP_Angus » Wed May 26, 2021 11:15 pm

Unfortunately, yes. The other thing that can help is increasing the console baud rate, so the heap dump output doesn't take as long.

Who is online

Users browsing this forum: No registered users and 214 guests