From: Jochen Behnke <JK.Behnke@domain.hid>
To: rpm@xenomai.org
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] App with pthreads using rt_task_shadow locks up
Date: Fri, 16 Mar 2007 08:12:22 +0100 [thread overview]
Message-ID: <452619176@domain.hid> (raw)
Philippe,
the workaround for the native skin is OK for me.
Thanks for your help :-)
Regards
Jochen
> On Thu, 2007-03-15 at 19:34 +0100, Jochen Behnke wrote:
> > Hello Philippe,
> >
> > thanks for your response.
> >
> > > On Thu, 2007-03-15 at 17:17 +0100, Jochen Behnke wrote:
> > > > Hello,
> > > >
> > > > after hours of searching, I have finally found the problem.
> > > > It was a bug in my "SimpleRPC" library. The thread function, responsible for the "lockup", mainly constists of an endless loop ( while(pObj->nRun) ) that polls a request queue. This was not a problem as long as this thread was a standard pthread. Turning this thread into a real-time task by adding a call to rt_task_shadow at the beginning of the thread function (before the while loop) resulted in a frozen linux system.
> > > >
> > > > I used to work with the following system
> > > > Gentoo Linux
> > > > Linux Kernel 2.6.17 (IPIPE 1.4)
> > > > Xenomai 2.2.3
> > > >
> > > > Now that I know, that upgrading to Xenomai 2.3.0 is not a problem, I plan to upgrade to the 2.3.x branch.
> > > >
> > >
> > > You may detect such kind of issues switching on the
> > > CONFIG_XENO_OPT_WATCHDOG option in the kernel configuration. Normally,
> > > this would pull the brake after more than 4 seconds of uninterrupted
> > > real-time activity in primary mode (i.e. without yielding control to the
> > > regular Linux activities).
> >
> > That's great. I will check this out.
> >
> > BTW, is there an easy way, other than reboot, to release xenomai ressources (mutexes,...) that have not been freed after an application crash ?
> >
>
> This depends on the skin being used. The native one does not free the
> resources upon application exit yet (this feature is on the todo list
> for the upcoming 2.4 though), OTOH the POSIX skin does. A work-around
> with the native skin is to use constructs like the following one in your
> app to recycle the left overs; not pretty, but works, until we provide
> an automated support:
>
> if (rt_mutex_bind("some_mutex", &mutex_desc, ...) == 0) {
> rt_mutex_delete(&mutex_desc);
> }
> err = rt_mutex_create("some_mutex", &mutex_desc);
>
> --
> Philippe.
>
>
>
_______________________________________________________________________
Viren-Scan für Ihren PC! Jetzt für jeden. Sofort, online und kostenlos.
Gleich testen! http://www.pc-sicherheit.web.de/freescan/?mc=022222
next reply other threads:[~2007-03-16 7:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-16 7:12 Jochen Behnke [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-03-15 18:34 [Xenomai-help] App with pthreads using rt_task_shadow locks up Jochen Behnke
2007-03-15 18:51 ` Philippe Gerum
2007-03-15 16:17 Jochen Behnke
2007-03-15 16:47 ` Philippe Gerum
2007-03-13 19:03 Jochen Behnke
[not found] <448721993@domain.hid>
2007-03-13 18:12 ` Gilles Chanteperdrix
2007-03-12 16:02 Jochen Behnke
2007-03-12 16:09 ` Gilles Chanteperdrix
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=452619176@domain.hid \
--to=jk.behnke@domain.hid \
--cc=rpm@xenomai.org \
--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.