Assertion fails while freeing IOBs.
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
I constantly get the following assertion to fail:
`mm/iob/iob_free.c:100`
```c
/* Copy and decrement the total packet length, being careful to
* do nothing too crazy.
*/
if (iob->io_pktlen > iob->io_len)
{
/* Adjust packet length and move it to the next entry */
next->io_pktlen = iob->io_pktlen - iob->io_len;
DEBUGASSERT(next->io_pktlen >= next->io_len);
}
```
At least for me, the failure seems to be triggered while I am using a custom TCP server (mostly when connections are closed).
I haven't been able to find any specific commit that is suspicious.
Unfortunately, I am also not able to reproduce the issue reliably.
It randomly happens, sometimes almost immediately when connections are closed, sometimes everything seems fine for extended periods of time.
I would appreciate any hint as to what to look for to fix this.
---
As a reference, this is the stack trace at the moment of the failure:

*(Moved from the apps repo, [where](https://github.com/apache/nuttx-apps/issues/1562) I accidentally opened the issue.)*
Contributor guide
Assessment
This issue has not been assessed yet.