From: Philippe Gerum <rpm@xenomai.org>
To: Frederik Bayart <frederik.bayart@triphase.com>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] TCP communication problem
Date: Mon, 04 Jun 2012 11:53:06 +0200 [thread overview]
Message-ID: <4FCC8582.9080008@xenomai.org> (raw)
In-Reply-To: <CALH4Wdbq459W__cBmSsCGhBcE22UzsS1chSCC7xZpLAs--A8eA@mail.gmail.com>
On 06/04/2012 11:33 AM, Frederik Bayart wrote:
> Dietmar, thanks for hint. Indeed, I noticed that the number of bytes
> sent != bytes to send.
> If I wrap the send in a while lus, the problem is solved.
>
> Does anyone have a suggestion how to detect the interrupting signal
> (SIG_ALL doesn't exist)
>
Use strace.
It's likely SIGWINCH (aka SIGSHADOW for Xenomai), which we use internally.
> Frederik
>
> On 31 May 2012 11:54,<dietmar.schindler@manroland.com> wrote:
>> Hallo,
>>
>> Frederik wrote:
>>> 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.
>>> ...
>>> 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.
>>
>> Perhaps the hdr send() call has been interrupted by a signal; this would have gone unnoticed because the server does not compare the return value of the send() call (i. e. the number of characters sent) to the hdr message length.
>> If this is so, the question remains, which signal did occur?
>> --
>> Dietmar
>> ________________________________________
>> manroland web systems GmbH -- Managing Director: Uwe Lüders
>> Registered Office: Augsburg -- Trade Register: AG Augsburg -- HRB-No. 26816 -- VAT: DE281389840
>>
>> Confidentiality note:
>> This eMail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited. If you have received this eMail in error, please notify us immediately via info@manroland-web.com, then delete this eMail.
>>
>> - Please consider your environmental responsibility before printing this eMail
>> ________________________________________
>> _______________________________________________
>> Xenomai mailing list
>> Xenomai@xenomai.org
>> http://www.xenomai.org/mailman/listinfo/xenomai
>
>
>
--
Philippe.
next prev parent reply other threads:[~2012-06-04 9:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2012-06-04 10:03 ` Gilles Chanteperdrix
2012-06-04 10:05 ` Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FCC8582.9080008@xenomai.org \
--to=rpm@xenomai.org \
--cc=frederik.bayart@triphase.com \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.