From: Philippe Gerum <rpm@xenomai.org>
To: Henri Roosen <henriroosen@domain.hid>
Cc: Andreas Glatz <andi.glatz@domain.hid>, xenomai@xenomai.org
Subject: Re: [Xenomai-help] New scheduler class
Date: Tue, 28 Jun 2011 11:33:03 +0200 [thread overview]
Message-ID: <1309253583.2101.48.camel@domain.hid> (raw)
In-Reply-To: <BANLkTik=+QLYg_cde_QSPMz3aE2emJk2=A@mail.gmail.com>
On Tue, 2011-06-28 at 11:26 +0200, Henri Roosen wrote:
> Hi,
>
> We enabled CONFIG_XENO_OPT_DEBUG_NUCLEUS and get the following fatal bug:
>
> [ 26.208785] Xenomai: fatal: bug at
> kernel/xenomai/nucleus/synch.c:723 (xnthread_get_rescnt(lastowner) <
> 0)
>
This is a known bug, fix pending here.
> This occurs at different places in our code, one of which is in the
> rt-serial driver 16550A.c in line 1076. I don't think the code of this
> driver is using the out_lock in a wrong way, so any idea what can be
> wrong then?
>
> We use Xenomai 2.5.6 on Linux 2.6.32.15 x86 with auto-relax patches from 'head':
> http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=b75cec19387e561f82ac55595db8c993b049f071
> to
> http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=6653a9e8eb7339b749989bd74adc3ac3bd29e4da
> and
> http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=82200f0b66908a5366a72355b3b70472031d68fb
> http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=becb13774ab687d016857f6a972f4124fbd10c44
>
> Thanks,
> Henri.
>
> On Thu, May 5, 2011 at 4:40 PM, Henri Roosen <henriroosen@domain.hid> wrote:
> > On Thu, May 5, 2011 at 3:55 PM, Philippe Gerum <rpm@xenomai.org> wrote:
> >> On Mon, 2011-05-02 at 10:58 +0200, Henri Roosen wrote:
> >>> Hi Philippe,
> >>>
> >>> Thanks for the patch! Unfortunately this does not resolve the 'stuck
> >>> in primary of prio 0 after rt_task_send'.
> >>>
> >>> I'll attach the basic test application that reproduces it. All prints
> >>> should contain secondary mode because all tasks are prio 0 and the
> >>> auto-relax patches are compiled in.
> >>>
> >>> The producer which does the rt_task_send() call does not auto-relax to
> >>> secondary mode.
> >>
> >> Your example code works with this added patch on top of both 2.5.x and
> >> -head:
> >> http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=82200f0b66908a5366a72355b3b70472031d68fb
> >>
> >
> > Hi Philippe!
> > I tried this patch and can confirm it results in expected behaviour of
> > the prio 0 scheduling now, also in our main application.
> >
> > Thanks a lot!
> > Henri
> >
> >>>
> >>> Thanks,
> >>> Henri.
> >>>
> >>> On Sun, May 1, 2011 at 5:01 PM, Philippe Gerum <rpm@xenomai.org> wrote:
> >>> > On Mon, 2011-03-28 at 12:56 +0200, Henri Roosen wrote:
> >>> >> Hi,
> >>> >>
> >>> >> We are using the back-ported auto-relax patches of Xenomai-head on the
> >>> >> 2.5.6 release on Linux 2.6.32.15.
> >>> >>
> >>> >> We noticed that our prio-0 shadowed task is not always auto-relaxed
> >>> >> and traced it back to a problem with rt_task_send/receive/reply. The
> >>> >> rt_task_send/receive/reply mechanism uses the xnsynch primitive to
> >>> >> implement its PIP. However, this mechanism only acquires the xysynch
> >>> >> primitive without releasing it. This results in the resource counter
> >>> >> never be 0 anymore and thus breaking the auto-relaxed which is based
> >>> >> on this resource counter.
> >>> >>
> >>> >> I guess releasing the xnsynch resets the owner, which is not wanted either..
> >>> >> Any idea for a fix?
> >>> >
> >>> > Could you give a try at this one? TIA,
> >>> > http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=becb13774ab687d016857f6a972f4124fbd10c44
> >>> >
> >>> >>
> >>> >> Thanks,
> >>> >> Henri.
> >>> >>
> >>> >>
> >>> >> On Tue, Oct 12, 2010 at 9:16 AM, Henri Roosen <henriroosen@domain.hid> wrote:
> >>> >> > That was a problem with our build environment.
> >>> >> >
> >>> >> > Patches work and the base-prio 0 task nicely switches to the Linux
> >>> >> > domain and competes with the Linux threads for the processor. Now we
> >>> >> > don't loose TCP connection to our target anymore.
> >>> >> >
> >>> >> > Thanks!
> >>> >> >
> >>> >> > Henri
> >>> >> >
> >>> >> > On Mon, Oct 11, 2010 at 5:35 PM, Henri Roosen <henriroosen@domain.hid> wrote:
> >>> >> >> Thanks for the patches Philippe. I applied them to xenomai 2.5.5.
> >>> >> >> Tests with a basic application look good, however our bigger project
> >>> >> >> doesn't. I checked already if we release all mutexes; the base prio 0
> >>> >> >> thread thread released all of them but stays in primary domain after a
> >>> >> >> xenomai call.
> >>> >> >>
> >>> >> >> I'll setup a clean environment, just to be sure, and will investigate
> >>> >> >> further tomorrow.
> >>> >> >>
> >>> >> >> On Mon, Oct 11, 2010 at 11:31 AM, Andreas Glatz <andi.glatz@domain.hid> wrote:
> >>> >> >>>
> >>> >> >>>>
> >>> >> >>>> The auto-relax feature is now available from -head (upcoming
> >>> >> >>>> 2.6.x). You
> >>> >> >>>> will need all commits from
> >>> >> >>>> http://git.xenomai.org/?p=xenomai-
> >>> >> >>>> head.git;a=commit;h=b75cec19387e561f82ac55595db8c993b049f071
> >>> >> >>>> to
> >>> >> >>>> http://git.xenomai.org/?p=xenomai-
> >>> >> >>>> head.git;a=commit;h=6653a9e8eb7339b749989bd74adc3ac3bd29e4da
> >>> >> >>>>
> >>> >> >>>> --
> >>> >> >>>> Philippe.
> >>> >> >>>>
> >>> >> >>>>
> >>> >> >>>
> >>> >> >>> Very nice. Will try it out soon on my G4 PB Aluminium.
> >>> >> >>>
> >>> >> >>> Andreas
> >>> >> >>>
> >>> >> >>>
> >>> >> >>> _______________________________________________
> >>> >> >>> Xenomai-help mailing list
> >>> >> >>> Xenomai-help@domain.hid
> >>> >> >>> https://mail.gna.org/listinfo/xenomai-help
> >>> >> >>>
> >>> >> >>
> >>> >> >
> >>> >
> >>> > --
> >>> > Philippe.
> >>> >
> >>> >
> >>> >
> >>
> >> --
> >> Philippe.
> >>
> >>
> >>
> >
--
Philippe.
next prev parent reply other threads:[~2011-06-28 9:33 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.6356.1286778008.12503.xenomai@xenomai.org>
2010-10-11 9:31 ` [Xenomai-help] New scheduler class Andreas Glatz
2010-10-11 15:35 ` Henri Roosen
2010-10-12 7:16 ` Henri Roosen
2011-03-28 10:56 ` Henri Roosen
2011-03-28 11:44 ` Philippe Gerum
2011-05-01 15:01 ` Philippe Gerum
2011-05-02 8:58 ` Henri Roosen
2011-05-05 13:55 ` Philippe Gerum
2011-05-05 14:40 ` Henri Roosen
2011-06-28 9:26 ` Henri Roosen
2011-06-28 9:33 ` Philippe Gerum [this message]
2010-04-01 23:08 Andreas Glatz
2010-04-02 0:08 ` Jan Kiszka
2010-04-02 0:11 ` Gilles Chanteperdrix
2010-04-02 7:58 ` Henri Roosen
2010-04-02 8:06 ` Gilles Chanteperdrix
2010-04-02 8:27 ` Gilles Chanteperdrix
2010-04-02 9:18 ` Jan Kiszka
2010-04-02 9:24 ` Jan Kiszka
2010-04-02 9:27 ` Gilles Chanteperdrix
2010-04-02 9:32 ` Henri Roosen
2010-04-02 9:34 ` Gilles Chanteperdrix
2010-04-02 9:43 ` Henri Roosen
2010-04-02 10:07 ` Jan Kiszka
2010-04-04 23:04 ` Andreas Glatz
2010-04-06 6:45 ` Jan Kiszka
2010-04-15 0:19 ` Andreas Glatz
2010-04-15 9:02 ` Philippe Gerum
2010-04-20 14:12 ` Andreas Glatz
2010-04-23 10:54 ` Philippe Gerum
2010-09-30 12:52 ` Henri Roosen
2010-09-30 13:29 ` Gilles Chanteperdrix
2010-10-04 11:02 ` Philippe Gerum
2010-10-04 13:14 ` Henri Roosen
2010-10-10 21:17 ` Philippe Gerum
2010-04-15 10:46 ` Philippe Gerum
2010-04-15 12:36 ` Andreas Glatz
2010-04-15 12:40 ` Gilles Chanteperdrix
2010-04-15 12:59 ` Andreas Glatz
2010-04-15 13:15 ` Gilles Chanteperdrix
2010-04-16 15:29 ` Andreas Glatz
2010-04-16 15:57 ` Gilles Chanteperdrix
2010-04-02 10:00 ` Jan Kiszka
2010-04-02 10:02 ` Gilles Chanteperdrix
2010-04-02 8:26 ` Jan Kiszka
2010-04-02 8:29 ` Gilles Chanteperdrix
2010-04-02 8:58 ` Jan Kiszka
2010-04-02 9:03 ` Jan Kiszka
2010-04-02 9:24 ` Gilles Chanteperdrix
2010-04-02 10:02 ` Jan Kiszka
2010-04-02 10:05 ` Gilles Chanteperdrix
2010-04-02 10:12 ` Jan Kiszka
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=1309253583.2101.48.camel@domain.hid \
--to=rpm@xenomai.org \
--cc=andi.glatz@domain.hid \
--cc=henriroosen@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.