stuck in _lwmem_get_next_block_internal()

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

stuck in _lwmem_get_next_block_internal()

1,733 Views
Mike_d
Contributor IV

What could get an exiting task stuck in the _lwmem_get_next_block_internal() loop?

pastedImage_0.png

0 Kudos
6 Replies

1,064 Views
maciejwdowiarz-
Contributor III

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.

0 Kudos

1,064 Views
m_bach
Contributor III

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

0 Kudos

1,064 Views
danielchen
NXP TechSupport
NXP TechSupport

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

0 Kudos

1,064 Views
Mike_d
Contributor IV

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

0 Kudos

1,064 Views
arielablumer
Contributor III

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

1,064 Views
Mike_d
Contributor IV

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 

0 Kudos