lost data on infoming TCP connection

Can anyone help with this problem?

We are seeing the following behaviour at a customer site:

We have a single threaded program running on 6.21A which has a TCP socket
connection to an external system. We are currently running the
npm-tcpip-v4.so but we have also seen this with the -v6 stack.

We (intermittently) see the following behaviour:

  • Packet arrives inbound on socket with Push flag set (verified by network
    sniffer). It contains a payload of 260 bytes of ASCII data.
  • The TCP/IP stack sends an ACK for this packet (verified by network
    sniffer)
  • ionotify( sd, _NOTIFY_ACTION_POLLARM, _NOTIFY_COND_INPUT, &evt ) returns
    immediately with _NOTIFY_COND_INPUT set
  • BUT ioctl( sd, FIONREAD, &count ) says there is nothing to read
  • AND any attempt to read() from the socket blocks/returns 0 bytes
    (depending on whether non-blocking io has been set)

Can anyone offer any insight as to what might be going on? Normally this
scenario would indicate that the remote end has closed the socket
connection but this is definitely not the case here (as verified by the
network sniffer).


Rob Rutherford
Ruzz Technology
PS What has happened to the qdn.private.standard newsgroup?

On Thu, 18 Aug 2005 09:32:48 +0200, Robert Rutherford
<mail@NoSpamPlease.ruzz.com> wrote:

PS What has happened to the qdn.private.standard newsgroup?

I’m seeing the same thing:
nntp.qnx.com
411 No such group qdn.private.standard
Since yesterday, I think.

\

Using Opera’s revolutionary e-mail client: http://www.opera.com/m2/

There was an issue where running ‘sin’, ‘psin’
as a non root user could cause a false wakeup.
There is a patch to the 6.3 stack on myqnx for
this.

Regards,

-seanb

Robert Rutherford <mail@nospamplease.ruzz.com> wrote:

Can anyone help with this problem?

We are seeing the following behaviour at a customer site:

We have a single threaded program running on 6.21A which has a TCP socket
connection to an external system. We are currently running the
npm-tcpip-v4.so but we have also seen this with the -v6 stack.

We (intermittently) see the following behaviour:

  • Packet arrives inbound on socket with Push flag set (verified by network
    sniffer). It contains a payload of 260 bytes of ASCII data.
  • The TCP/IP stack sends an ACK for this packet (verified by network
    sniffer)
  • ionotify( sd, _NOTIFY_ACTION_POLLARM, _NOTIFY_COND_INPUT, &evt ) returns
    immediately with _NOTIFY_COND_INPUT set
  • BUT ioctl( sd, FIONREAD, &count ) says there is nothing to read
  • AND any attempt to read() from the socket blocks/returns 0 bytes
    (depending on whether non-blocking io has been set)

Can anyone offer any insight as to what might be going on? Normally this
scenario would indicate that the remote end has closed the socket
connection but this is definitely not the case here (as verified by the
network sniffer).



Rob Rutherford
Ruzz Technology
PS What has happened to the qdn.private.standard newsgroup?

On 18 Aug 2005 13:21:40 GMT, Sean Boudreau wrote:

There was an issue where running ‘sin’, ‘psin’
as a non root user could cause a false wakeup.
There is a patch to the 6.3 stack on myqnx for
this.

Actually we found a bug/race condition in our code that explains what we
were seeing. But this is also possibly relevant in other situations, thanks
for mentioning it.

Rob Rutherford