All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Vincent Levesque <vleves@domain.hid>
Cc: xenomai@xenomai.org, andrewg@domain.hid
Subject: Re: [Xenomai-help] -110 error on rt_task_send... bug?
Date: Wed, 09 Aug 2006 00:12:17 +0200	[thread overview]
Message-ID: <44D90C41.5070307@domain.hid> (raw)
In-Reply-To: <44D7EDCF.9010409@domain.hid>

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

Vincent Levesque wrote:
> Hello,
> 
> I'm having some problems with rt_task_send/receive/reply in the native
> skin. The code attached at the end of this email works fine on Xenomai
> 2.1 but rt_task_send() fails with error message -110 on Xenomai 2.2.0
> and today's subversion trunk. I checked the error values of all other
> calls (removed for clarity) and everything seems to be ok. The -110
> error code is returned either when rt_task_send() times out or when
> rt_task_reply() is called, whichever comes first. If I set it to
> TM_INFINITE, rt_task_send() never returns and the system hangs when I
> press control-c. I've reproduced this behavior on two computers.
> 
> Am I doing something wrong that was tolerated by 2.1? Is this a bug in
> Xenomai 2.2?

Nothing. This looks like a good catch of a regression in 2.2.

I'm not that deep into rt_task_send/receive design, but this problem
seems to be related to some heavy disagree between xnsynch_sleep_on and
rt_task_send about the correct ownership of the receiver's send queue.

Reading this comment [1] and then looking at that piece of code [2],
something must go utterly wrong wrt/ message passing in Xenomai 2.2. [1]
says the owner of task->msendq will always be "task" and never "sender"
(the current thread), so the test in [2] will always fail. The
lock-steeling code was introduced with 2.2, so this effect did not occur
with 2.1.

I have no idea yet how to solve it cleanly. Maybe Philippe finds some
time to comment on this before he'll be away for the next week. In the
meantime message passing users of the native skin may better stay on 2.1.x.

Jan


[1]http://www.rts.uni-hannover.de/xenomai/lxr/source/ksrc/skins/native/task.c#L1750
[2]http://www.rts.uni-hannover.de/xenomai/lxr/source/ksrc/nucleus/synch.c#L212


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

  reply	other threads:[~2006-08-08 22:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-08  1:50 [Xenomai-help] -110 error on rt_task_send... bug? Vincent Levesque
2006-08-08 22:12 ` Jan Kiszka [this message]
2006-08-09  9:35   ` Dmitry Adamushko
2006-08-09 11:42     ` [Xenomai-core] " Dmitry Adamushko
2006-08-09 15:09       ` Ulrich Schwab
2006-08-09 15:42         ` Dmitry Adamushko
2006-08-10 18:14           ` Vincent Levesque
2006-08-10 18:18             ` Dmitry Adamushko
2006-08-10  8:25         ` Jan Kiszka
2006-08-10 10:11           ` Dmitry Adamushko
2006-08-10 22:13     ` Philippe Gerum
2006-08-11  7:50       ` Dmitry Adamushko
2006-08-12 10:33       ` Dmitry Adamushko
2006-08-12 21:14         ` Philippe Gerum
2006-08-13 14:47           ` Philippe Gerum
2006-08-13 20:24             ` 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=44D90C41.5070307@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=andrewg@domain.hid \
    --cc=vleves@domain.hid \
    --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.