While transmitting data in Urgent Mode at the socket layer:
- Urgent mode is initiated using send(…, MSG_OOB),
- Current outgoing queue is longer than MTU
- Several packets are sent out with the URG flag set.
The Urgent Pointer field in the TCP header is not updated correctly. Instead, it stays the same.
The receiving end interprets this as a new urgent message inserted further in the stream. Then it sends multiple SIGURG entries to the other end (server) reads the urgent data. This is just the way it is expected to be.
Since the receiving end does not see that the TCP header had the urgent pointer field set, it just reads the dummy data (sent along with the MSG_OOB flag). This would confuse the receiving part of the application.
This is due to Linux Kernel Bugzilla 12014
This behavior had been intermittently noticed with SLES10 which has 2.6.16 kernel. The bug has not yet been fixed as of November 27, 2008.
If the fix for Linux Kernel Bugzilla 12014 is not yet available (for your Linux kernel version) try working the problem around by disabling MSG_OOB use:
- Modify / configure your server application (which is to send the MSG_OOBflagged socket requests) to disable the use of out-of-band breaks (the use of urgent mode).