All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] TCP communication problem
@ 2012-05-31  8:08 Frederik Bayart
  2012-05-31  9:54 ` dietmar.schindler
  0 siblings, 1 reply; 6+ messages in thread
From: Frederik Bayart @ 2012-05-31  8:08 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 2445 bytes --]

Hallo,

When switching from xenomai 2.4.10 on linux 2.6.30.8 (x86) to xenomai
2.6.0 (stable) on linux 2.6.38.8, we noticed some TCP communication
problem between client and server in our application. We wrote a test
program and think this reproduces the problem.

First a short description of the test program :

When the client (rtest.c attached) connects to the server (rtestd.c
attached), the server starts sending packets to the client. Packets
are paired : first a header and then a corresponding data packet. The
payload of each packet starts with a sequence number (to match network
traces and logging), followed with hdr[A..Z])2222222...222hdr[A..Z]
for header and dat[A..Z]77777777...777dat[A..Z] for data packets.

The client can also sent request to server (using the same
connection). The server echoes these packets back.
Client requests are also paired : first a header and then a
corresponding data packet. The payload of each packet starts with a
sequence number (to match network traces and logging), followed with
fre[A..Z])3333333...333fre[A..Z] for header and
rik[A..Z]88888888...888rik[A..Z] for data packets.

Header and data packets have to arrive one after the oter. For that
reason, sending is protected by a mutex.
The send command used in the server is the normal send, so tasks are
switching from primary to secondary domain, but I think sending should
be protected by the mutex.
Also the task that echoes client requests has higher priority.

Client requests can be initiated to the client sending the TRAP signal, e.g

for i in {0..9000} ; do kill -TRAP <pid>;  done

where <pid> is the process id of the client process.

If you execute this some times after each other, we noticed that we
have lost some data.

In attached rtest.log, rule 6 , the tail of the packet
(...22222222hdrE) is lost.

This can also be seen in the network trace : packet 4 contains the
first part of the header, but packet 6 contains the start of the data
packet

Client and server are run on different hosts. The ip adress of the
server is given as argument to the client, so e.g.   ./rtest
192.168.0.40

At the moment it's not clear to us whether the problem is caused by
the new xenomai, or by the new kernel, so my question is :

Can the problem be caused by different behaviour of the new xenomai :
new scheduler, no mutex protection in the secondary domain,  ... ?

Frederik

[-- Attachment #2: rtest.zip --]
[-- Type: application/zip, Size: 4786 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-06-04 10:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31  8:08 [Xenomai] TCP communication problem Frederik Bayart
2012-05-31  9:54 ` dietmar.schindler
2012-06-04  9:33   ` Frederik Bayart
2012-06-04  9:53     ` Philippe Gerum
2012-06-04 10:03       ` Gilles Chanteperdrix
2012-06-04 10:05         ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.