Stack overflow after heater tuning
-
I cannot tune my heaters as every time I do, I get a stack overflow error (except on some rare occasions when it just works, which is odd).
This occurs right at the end of the last cycle:
No heater config is printed for me to put in config-override.g so the entire tuning was a waste of like 15 minutes.
Here is the full M122 dump after the reset caused by the error:
M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.2.2 running on Duet Ethernet 1.02 or later + DueX5 Board ID: 08DGM-9T6BU-FG3SJ-6JTDJ-3SN6P-9SYZG Used output buffers: 3 of 24 (15 max) === RTOS === Static ram: 23460 Dynamic ram: 71864 of which 24 recycled Never used RAM 16732, free system stack 195 words Tasks: NETWORK(ready,167) HEAT(blocked,308) DUEX(blocked,31) MAIN(running,449) IDLE(ready,20) Owned mutexes: === Platform === Last reset 00:00:10 ago, cause: software Last software reset at 2021-04-27 21:09, reason: StackOverflow, Move spinning, available RAM 16732, slot 2 Software reset code 0x4104 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f80e BFAR 0xe000ed38 SP 0x2001ffc4 Task HEAT Freestk 30309 bad marker Stack: 200025d0 20002604 004554a5 2000460c 00454ad5 2000262c 2000460c 00000000 00f00000 e000ef34 c0000000 2000468c 00454c13 00454984 61000000 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff Error status: 0x00 Aux0 errors 0,0,0 MCU temperature: min 36.6, current 37.2, max 37.4 Supply voltage: min 24.3, current 24.3, max 24.4, under voltage events: 0, over voltage events: 0, power good: yes Driver 0: position 0, standstill, SG min/max not available Driver 1: position 0, standstill, SG min/max not available Driver 2: position 0, standstill, SG min/max not available Driver 3: position 0, standstill, SG min/max not available Driver 4: position 0, standstill, SG min/max not available Driver 5: position 0, standstill, SG min/max not available Driver 6: position 0, standstill, SG min/max not available Driver 7: position 0, standstill, SG min/max not available Driver 8: position 0, standstill, SG min/max not available Driver 9: position 0, standstill, SG min/max not available Driver 10: position 0 Driver 11: position 0 Date/time: 2021-04-27 21:09:13 Cache data hit count 14053254 Slowest loop: 6.19ms; fastest: 0.22ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 9 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest read time 3.3ms, write time 3.8ms, max retries 0 === Move === DMs created 83, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 === GCodes === Segments left: 0 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === Network === Slowest loop: 11.32ms; fastest: 0.02ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions HTTP sessions: 1 of 8 Interface state active, link 100Mbps full duplex === DueX === Read count 1, 5.53 reads/min
-
@vcapra1, thanks for your report. This may already be fixed in firmware 3.3beta3, but if not then I will increase the Heat task stack size further.
-
@dc42 Thanks for your reply. It still seems to be an issue in 3.3beta3:
M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3beta3 (2021-04-22 16:27:28) running on Duet Ethernet 1.02 or later + DueX5 Board ID: 08DGM-9T6BU-FG3SJ-6JTDJ-3SN6P-9SYZG Used output buffers: 1 of 24 (16 max) === RTOS === Static ram: 23156 Dynamic ram: 73736 of which 0 recycled Never used RAM 17524, free system stack 204 words Tasks: NETWORK(ready,24.1%,216) HEAT(delaying,0.0%,310) Move(notifyWait,0.1%,214) DUEX(notifyWait,0.0%,24) MAIN(running,74.0%,441) IDLE(ready,1.8%,19), total 100.0% Owned mutexes: === Platform === Last reset 00:00:11 ago, cause: software Last software reset at 2021-04-28 19:56, reason: StackOverflow, GCodes spinning, available RAM 17524, slot 0 Software reset code 0x4103 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f80e BFAR 0xe000ed38 SP 0x2001ffbc Task HEAT Freestk 28713 ok Stack: 20003ebc 20003ef0 0045acf9 00000000 20005958 000000c8 0045a385 20003f1c 20005958 00000000 00f00000 e000e000 c0000000 00000002 0045a4c1 0045a238 21000000 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff Error status: 0x00 Aux0 errors 0,0,0 Step timer max interval 0 MCU temperature: min 32.9, current 33.4, max 33.8 Supply voltage: min 24.3, current 24.4, max 24.4, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0 Driver 0: position 0, standstill, SG min/max not available Driver 1: position 0, standstill, SG min/max not available Driver 2: position 0, standstill, SG min/max not available Driver 3: position 0, standstill, SG min/max not available Driver 4: position 0, standstill, SG min/max not available Driver 5: position 0, standstill, SG min/max not available Driver 6: position 0, standstill, SG min/max not available Driver 7: position 0, standstill, SG min/max not available Driver 8: position 0, standstill, SG min/max not available Driver 9: position 0, standstill, SG min/max not available Driver 10: position 0 Driver 11: position 0 Date/time: 2021-04-28 19:57:09 Cache data hit count 455436309 Slowest loop: 5.58ms; fastest: 0.17ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 9 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest read time 3.3ms, write time 30.0ms, max retries 0 === Move === DMs created 83, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 === GCodes === Segments left: 0 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === DueX === Read count 1, 5.10 reads/min === Network === Slowest loop: 13.08ms; fastest: 0.02ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions HTTP sessions: 1 of 8 Interface state active, link 100Mbps full duplex
-
@vcapra1 Actually I just realized the stack size change was committed after 3.3beta3 was released, I'll try compiling the latest version and see if it helps
-
Ok with the latest updates it seems to be working, thanks!