NANO54415 locks up after a lot of TCP connect()s
Re: NANO54415 locks up after a lot of TCP connect()s
Good news. I added a high priority task, and it keeps running while everything else stops.
Re: NANO54415 locks up after a lot of TCP connect()s
Ok there is a diagnostic...
Step 1 go into nburn\include\predef.h
and make #define UCOS_STACKCHECK (1)
Active (IE uncomment it)
Step 2 rebuild EVERYTHING ie system, project, libraries etc...
Step 3 Add a call to OSDumpTasks( void );
In your high priority task...
It would be best if you only did this when it hung as OSDumTasks is an expensive call...
Paul
Step 1 go into nburn\include\predef.h
and make #define UCOS_STACKCHECK (1)
Active (IE uncomment it)
Step 2 rebuild EVERYTHING ie system, project, libraries etc...
Step 3 Add a call to OSDumpTasks( void );
In your high priority task...
It would be best if you only did this when it hung as OSDumTasks is an expensive call...
Paul
Re: NANO54415 locks up after a lot of TCP connect()s
I logged OSDumpTasks() from three lockups.
Edit: Am I interested in the TCP or the Esnd task stack?
4001c60c traces to C:\nburn\NANO54415\system/ethernet.cpp:297 which is "if (pb == NULL)"
4001c62c traces to C:\nburn\NANO54415\system/ethernet.cpp:310 which is "if ( RxBD.flags & RXBD_Error_Mask )"
Code: Select all
uc/OS Tasks
Prio State Ticks Call Stack
Idle|Ready |forever |at: 400076ec
Main|Ready |forever |4000784e->400045da->400076d0-><END>
TCP |Semaphore|forever |40007d72->40014b4a->400076d0-><END>
IP |Ready |forever |at: 4001199a
Esnd|Fifo | 32 |40008ad8->4001c60c->400076d0-><END>
1??|Running
42??|Semaphore|forever |at: 40007704
uc/OS Tasks
Prio State Ticks Call Stack
Idle|Ready |forever |at: 4000771c
Main|Ready |forever |4000786e->400045da->400076f0-><END>
TCP |Semaphore|forever |40007d92->40014b6a->400076f0-><END>
IP |Ready |forever |at: 400119ba
Esnd|Fifo | 32 |40008af8->4001c62c->400076f0-><END>
1??|Running
42??|Ready |forever |4000786e->400046c4->400076f0-><END>
uc/OS Tasks
Prio State Ticks Call Stack
Idle|Ready |forever |at: 400076fa
Main|Ready |forever |4000784e->400045f4->400076d0-><END>
TCP |Semaphore|forever |40007d72->40014b4a->400076d0-><END>
IP |Ready |forever |at: 4001199a
Esnd|Fifo | 22 |40008ad8->4001c60c->400076d0-><END>
1??|Running
42??|Ready |forever |4000784e->400046c4->400076d0-><END>
4001c60c traces to C:\nburn\NANO54415\system/ethernet.cpp:297 which is "if (pb == NULL)"
4001c62c traces to C:\nburn\NANO54415\system/ethernet.cpp:310 which is "if ( RxBD.flags & RXBD_Error_Mask )"
Re: NANO54415 locks up after a lot of TCP connect()s
Looks like its stuck in the IP task, ie the one task that is always READY....
Re: NANO54415 locks up after a lot of TCP connect()s
The address the IP task is sitting at comes back as:
HashSocketList::findsocket(unsigned short, unsigned short, unsigned long) const
C:\nburn\system/tcp.cpp:4443
Which is this line:
HashSocketList::findsocket(unsigned short, unsigned short, unsigned long) const
C:\nburn\system/tcp.cpp:4443
Which is this line:
Code: Select all
while ( ps != NULL )
Re: NANO54415 locks up after a lot of TCP connect()s
What is the content of
nburn\release_tag
(Trying to make sure you have the latest revision)
nburn\release_tag
(Trying to make sure you have the latest revision)
Re: NANO54415 locks up after a lot of TCP connect()s
This code stores TCP sockets in a linked list indexed by
a hash function to find the "Right" socket to process an incoming packet.
It looks like the linked list is getting corrupted....
1)Could be either a race condition between tasks...
2)Or some kind of steping on oneself memory problem (stack overflow wild pointer)
Please submit a support request and we'll try and get you a tcp.cpp
that might resolve issue 1) above....
a hash function to find the "Right" socket to process an incoming packet.
It looks like the linked list is getting corrupted....
1)Could be either a race condition between tasks...
2)Or some kind of steping on oneself memory problem (stack overflow wild pointer)
Please submit a support request and we'll try and get you a tcp.cpp
that might resolve issue 1) above....
Re: NANO54415 locks up after a lot of TCP connect()s
Resolved. I updated to NNDK 2.6.7 and haven't seen the issue since. Rookie mistake not updating the software first, I should have known better. On the plus side, I learned a lot about how the NB system works. Thanks for the assistance.