What could get an exiting task stuck in the _lwmem_get_next_block_internal() loop?
I've got the same error with _lwmem_get_next_block_internal() - it remain in loop forever, because block_ptr->BLOCKSIZE is zero.
I've tried the solution with patching tack.c file as Martin suggested in lwmem error problem however it didn't help.
The only working workaround is to escape the loop for BLOCKSIZE = 0.
I'm also looking for root cause, I suspect memory leak maybe is the problem.
Hi Mike,
I think I have reported a very similar problem:lwmem error ?
I hope we can find the root cause for this.
cheers,
Martin
Hi Michael:
It is not easy to find the root cause from your information, maybe it is a tcp ip task memory issue,
I suggest your try to modifying the initial RTCS parameters as follows to see whether it helps
/* runtime RTCS configuration */
_RTCSPCB_init = 12;
_RTCSPCB_grow = 2;
_RTCSPCB_max = 20;
_RTCS_msgpool_init = 12;
_RTCS_msgpool_grow = 2;
_RTCS_msgpool_max = 20;
_RTCS_socket_part_init = 12;
_RTCS_socket_part_grow = 2;
_RTCS_socket_part_max = 20;
Regards
Daniel
Hi Daniel,
I made the changes to the RTCS parameters but still end up with the same issue. This time it is an HTTP server session that is suck here. What kind of information will help find the root cause?
-Mike
Hi Michael,
I encountered a similar problem.
Check the value of block_ptr->BLOCKSIZE, I believe you'll find it equals 0 which explains why the loop never ends.
The problem in my case was sporadic and the trace wasn't of any help so I just added a work around; in case (0 == block_ptr->BLOCKSIZE) I simply break out of the loop.
It's far from being a perfect solution and I probably loose memory and hide a real problem but as it happened very rarely it's good enough for me at the moment.
Hope you find and share the root cause.
Good luck,
Ariela
Hi Ariela,
Your suspicion was correct, the block size was 0. I added the work around and the project runs as expected. Hopefully we can get to the root cause and correct it.
Thanks,
-Mike