TCP child task gets stuck at send()

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

TCP child task gets stuck at send()

558 Views
alvaro_oliveira
Contributor I

MQX ver. 4.1.1.

I made a daemon server to treat incoming TCP connections as suggested in many posts by NXP mods. I set a limit of connections to 5 using my own solution and that's working alright. The problem i have tho is that sometimes (it's not always and i have to make multiple tests to make it happen) all the child tasks that have a socket each gets stuck at send().

my socket options:

#define TESTSOCKET_BUFFER_SIZE 256
#define TESTSOCKET_NOWAIT FALSE
#define TESTSOCKET_SEND_TIMEOUT 10000
#define TESTSOCKET_CONNECT_TIMEOUT 1000
#define TESTSOCKET_TIMEWAIT_TIMEOUT 1000

i'm using a shell script to check if my packages are being recieved:

  for((i=1;i<=5;i++))
  do
    echo msg | netcat 192.168.41.100 22222 > ${i}.log&
  done 

my test child task will send 10 messages in sequence and then shutdown.

sometimes the child tasks will get stuck, after about 3min it gets unstuck and it returns the error 0x1635 which means TCP: Software caused connection abort.

Looking further in wireshark, when the stuck occurs it seems the device sends a TCP Zero Window, it seems the device does not have what it takes to send all the messages in a short time, but is there a way to circumvent this?

0 Kudos
1 Reply

455 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Alvaro:

This issue is very similar to below issue

pastedImage_1.png

This issue is fixed in MQX 4.2.0.2.

I would suggest you update to MQX 4.2.0 and patched with mqx 4.2.0.2.   This version fixed some RTCS issues.

Regards

Daniel

0 Kudos