Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - TCP Connection Termination Sequence Issue: (8 Items)
   
TCP Connection Termination Sequence Issue  
I am trouble-shooting with WireShark a TCP termination issue between an off-board service (remote host) running a mini-
TCP stack and a QNX client running 6.4.1 with io-pkt-v4. I have attached two traces that illustrate my issue. I was 
hoping a QNX expert could take a quick look and help me determine if both termination sequences are valid and help 
identify (if it exists) any issue with mini-stack. The sequences are very short and boil down to 3-4 frames that need 
examination.

The first trace (linux_client.pcap) shows a linux client (curl) connecting to the remote service, issuing an HTTP GET 
and then dropping the connection. The sequence behaves properly using the mini-TCP stack and the connection is 
successfully disconnected (see frames 4 - 11).

The second trace (qnx_client.pcap) involves the same client (curl) running under QNX and connecting to the same remote 
host.  The disconnection fails and the link goes into a perpetual FIN, FIN-ACK  sequence between the client and service.
 The pertinent frames are 7- 11.

The real difference I can see between the two traces is the fact that the Linux stack shows the following sequence:

Client (192.168.1.2)                          Server (192.168.1.1)
ACK
FIN-ACK
                                                            FIN
                                                            ACK

whereas the QNX stack does the following:

Client (192.168.1.2)                          Server (192.168.1.1)
FIN-ACK
                                                            the wheels fall off and we enter
                                                            and endless loop

Can someone please take pity on me and verify that QNX's connection termination sequence is legitimate and point out any
 obvious errors with the mini-TCP stack state machine. This is not my area of expertise but I hoped someone with a 
little better understanding on the TCP state transitions could provide some helpful advice.

Attachment: Compressed file qnx_traces.zip 1.46 KB
Re: TCP Connection Termination Sequence Issue  
Glenn,

I'm sorry, but I don't have the time to take a deep look right now. If 
you need a response quickly then please go through the support channels.

I'm not sure what you mean by mini-TCP stack? Is it running on QNX? What 
QNX version is this?

Without looking at the traces, it should be ok that the Client 
terminates the connection with a single FIN-ACK or the ACK, FIN-ACK 
sequence. Both should be legal.

What stack implementation is the Server running? Is it really an endless 
loop? Or is it just that it's timing out and resending the last segment? 
Then it will eventually stop...

/P

On 24/03/10 11:35 AM, Glenn Schmottlach wrote:
> I am trouble-shooting with WireShark a TCP termination issue between an off-board service (remote host) running a mini
-TCP stack and a QNX client running 6.4.1 with io-pkt-v4. I have attached two traces that illustrate my issue. I was 
hoping a QNX expert could take a quick look and help me determine if both termination sequences are valid and help 
identify (if it exists) any issue with mini-stack. The sequences are very short and boil down to 3-4 frames that need 
examination.
>
> The first trace (linux_client.pcap) shows a linux client (curl) connecting to the remote service, issuing an HTTP GET 
and then dropping the connection. The sequence behaves properly using the mini-TCP stack and the connection is 
successfully disconnected (see frames 4 - 11).
>
> The second trace (qnx_client.pcap) involves the same client (curl) running under QNX and connecting to the same remote
 host.  The disconnection fails and the link goes into a perpetual FIN, FIN-ACK  sequence between the client and service
. The pertinent frames are 7- 11.
>
> The real difference I can see between the two traces is the fact that the Linux stack shows the following sequence:
>
> Client (192.168.1.2)                          Server (192.168.1.1)
> ACK
> FIN-ACK
>                                                              FIN
>                                                              ACK
>
> whereas the QNX stack does the following:
>
> Client (192.168.1.2)                          Server (192.168.1.1)
> FIN-ACK
>                                                              the wheels fall off and we enter
>                                                              and endless loop
>
> Can someone please take pity on me and verify that QNX's connection termination sequence is legitimate and point out 
any obvious errors with the mini-TCP stack state machine. This is not my area of expertise but I hoped someone with a 
little better understanding on the TCP state transitions could provide some helpful advice.
>
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post50336
>    
Re: TCP Connection Termination Sequence Issue  
Patrick -

Thanks for at least reading the post and providing comments. I tried to keep the traces to the absolute minimum so if 
your time does free up, I'd really appreciate it if you can take a quick glimpse at them.

To answer your questions:

1) The "mini-TCP" stack is written in Java and is running on a Blackberry. It is not using the regular BB network stack 
but rather a small custom one that can be used (with SLIP) to communicate over a serial port between the phone and the 
QNX device. I do not have access to the source code for this stack.

2) It sure seems like an endless loop. I've waited  several minutes before and it appears to keep going and going. 
Perhaps I didn't wait long enough ;-)

Honestly, I'm hoping to collect enough detail to point a finger at the vendor. They claim it works fine with Linux 
(which it does) so that leaves me with proving why it doesn't work with QNX's NetBSD based stack. Any ammunition you 
could provide would be greatly appreciated.

Glenn
Re: TCP Connection Termination Sequence Issue  
On Wed, Mar 24, 2010 at 11:35:15AM -0400, Glenn Schmottlach wrote:
> I am trouble-shooting with WireShark a TCP termination issue between an off-board service (remote host) running a mini
-TCP stack and a QNX client running 6.4.1 with io-pkt-v4. I have attached two traces that illustrate my issue. I was 
hoping a QNX expert could take a quick look and help me determine if both termination sequences are valid and help 
identify (if it exists) any issue with mini-stack. The sequences are very short and boil down to 3-4 frames that need 
examination.
> 
> The first trace (linux_client.pcap) shows a linux client (curl) connecting to the remote service, issuing an HTTP GET 
and then dropping the connection. The sequence behaves properly using the mini-TCP stack and the connection is 
successfully disconnected (see frames 4 - 11).
> 
> The second trace (qnx_client.pcap) involves the same client (curl) running under QNX and connecting to the same remote
 host.  The disconnection fails and the link goes into a perpetual FIN, FIN-ACK  sequence between the client and service
. The pertinent frames are 7- 11.
> 
> The real difference I can see between the two traces is the fact that the Linux stack shows the following sequence:
> 
> Client (192.168.1.2)                          Server (192.168.1.1)
> ACK
> FIN-ACK
>                                                             FIN
>                                                             ACK
> 
> whereas the QNX stack does the following:
> 
> Client (192.168.1.2)                          Server (192.168.1.1)
> FIN-ACK
>                                                             the wheels fall off and we enter
>                                                             and endless loop
> 
> Can someone please take pity on me and verify that QNX's connection termination sequence is legitimate and point out 
any obvious errors with the mini-TCP stack state machine. This is not my area of expertise but I hoped someone with a 
little better understanding on the TCP state transitions could provide some helpful advice.
> 

Their sending the fin without the ack flag set which we ignore.
There's no set behaviour for this but it's often a symptom
of someone trying to probe sequence numbers.  tcpdump seems to
know something's odd as it displays the sequence number of the
fin as an absolute, rather than relative value.

Regards,

-seanb
Re: TCP Connection Termination Sequence Issue  
Hi

I need wireshark software for QNX 6.4, so can you please tell from where I can get it and How to install it on QNX 6.4


 Thanks
Re: TCP Connection Termination Sequence Issue  
Wireshark doesn't run on QNX. What you do is use tcpdump (which runs under QNX) to capture a trace and write it to a 
file that ends in "*.pcap". Transfer that file to your PC and open it with Wireshark.

I think the command I usually use is something like:

tcpdump -i en0 -s 65535 -w trace.pcap

Hope that helps.

Glenn
Re: TCP Connection Termination Sequence Issue  
Thanks Glenn, I didn't realize you had already answered.

PS. snap length zero can also be used.

On 10-12-08 08:01 AM, Glenn Schmottlach wrote:
> Wireshark doesn't run on QNX. What you do is use tcpdump (which runs
> under QNX) to capture a trace and write it to a file that ends in
> "*.pcap". Transfer that file to your PC and open it with Wireshark.
>
> I think the command I usually use is something like:
>
> tcpdump -i en0 -s 65535 -w trace.pcap
>
> Hope that helps.
>
> Glenn
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77760
>
Re: TCP Connection Termination Sequence Issue  
Hi,

There's no Wireshark port for QNX AFAIK, but you can use tcpdump to grab 
a pcap file on target. Then you can use Wireshark on another OS to read 
the capture.

Hope this helps!
/P

On 10-12-08 04:40 AM, swati jaiswal wrote:
> Hi
>
> I need wireshark software for QNX 6.4, so can you please tell from where
> I can get it and How to install it on QNX 6.4
>
>
> Thanks
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77752
>