[En-Nut-Discussion] Race condition and stack overflow in tcpsm.c

Philipp Burch phip at hb9etc.ch
Fri Nov 14 18:04:19 CET 2014


Me again. More debugging showed that:

1. 388 for tcpsm is still too less, I managed to make it use up to 664
bytes and hence increased the stack space to 1024 bytes.
2. The DHCP thread overflowed as well, I had to set this to 1024 bytes
as well.

With these changes, I still managed to crash the system after some time,
but it looks like a different problem this time, as all stacks should
still be intact.

My testing is as follows:
- Copy a file of some Megabytes to the SD card using FTP.
- Send 2'000'000 flooding pings to the board with a preload of 10.
- Issue 100'000 commands over three Telnet connections in parallel.

All of these tests are performed simultaneously, so the MCU is quite busy.

Always increasing the stacks doesn't seem like an appropriate solution
however, I'd rather like to find out why the whole thing needs so much
more space than on other platforms. Does anyone have an idea?

Thanks and best regards,
Philipp


More information about the En-Nut-Discussion mailing list