From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Ronny Meeus <ronny.meeus@gmail.com>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Xenomai-forge: thread using 100% cpu load
Date: Thu, 28 Feb 2013 21:35:58 +0100 [thread overview]
Message-ID: <512FBFAE.1080005@xenomai.org> (raw)
In-Reply-To: <CAMJ=MEeO8P2tjcBR8bb907j5JOOXCY=n0=wcxUZALqDp-4JRJw@mail.gmail.com>
On 02/28/2013 09:30 PM, Ronny Meeus wrote:
> On Thu, Feb 28, 2013 at 9:10 PM, Gilles Chanteperdrix
> <gilles.chanteperdrix@xenomai.org> wrote:
>> On 02/28/2013 08:19 PM, Ronny Meeus wrote:
>>
>>> Hello
>>>
>>> we are using the PSOS interface of Xenomai forge, running completely
>>> in user-space using the mercury code.
>>> We deploy our application on different processors, one product is
>>> running on PPC multicore (P4040, P4080, P4034) and another one on
>>> Cavium (8 core device).
>>> The Linux version we use is 2.6.32 but I would assume that this is not
>>> so relevant.
>>>
>>> Our Xenomai application is running on one of the cores (affinity is
>>> set), while the other cores are running other code.
>>>
>>> On both architectures we recently start to see issues that one thread
>>> is consuming 100% of the core on which the application is pinned.
>>> The thread that monopolizes the core is the thread internally used to
>>> manage the timers, running at the highest priority.
>>> The trigger for running into this behavior is currently unclear.
>>> If we only start a part of the application (platform management only),
>>> the issue is not observed.
>>> We see this on both an old version of Xenomai and a very recent one
>>> (pulled from the git repo yesterday).
>>>
>>> I will continue to debug this issue in the coming days and try isolate
>>> the code that is triggering it, but I can use hints from the
>>> community.
>>> Debugging is complex since once the load starts, the debugger is not
>>> reacting anymore.
>>> If I put breakpoints in the functions that are called when the timer
>>> expires (both oneshot and periodic), the process starts to clone
>>> itself and I endup with tens of them.
>>>
>>> Has anybody seen an issue like this before or does somebody has some
>>> hints on how to debug this problem?
>>
>>
>> First enable the watchdog. It will send a signal to the application when
>> detecting a problem, then you can use the watchdog to trigger an I-pipe
>> tracer trace when the bug happens. You will probably have to increase
>> the watchdog polling frequency, in order to have a meaningful trace.
>>
>> --
>> Gilles.
>
> Gilles,
>
> We are running completely in user-space (mercury) .
cobalt also runs in user-space.
> I thought that the watchdog and I-pipe tracer are only relevant when
> using the cobalt code.
> In case my assumption is wrong, please correct me and let me know how
> to enable it.
Yes, if you are using plain linux, there are even more tools to debug
the problem:
- you can enable RT throttling to avoid the machine lockup by the buggy
thread
- you can enable the kernel detection for just your case
(CONFIG_LOCKUP_DETECTOR)
- if you are on x86 you can use the NMI watchdog
- you can use FTRACE instead of the I-pipe tracer
- or you can decide to compile the kernel with CONFIG_IPIPE and
CONFIG_IPIPE_TRACE to use the I-pipe tracer without Xenomai.
- maybe xenomai-forge's "slackspot" tool works for mecury?
--
Gilles.
prev parent reply other threads:[~2013-02-28 20:35 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 19:19 [Xenomai] Xenomai-forge: thread using 100% cpu load Ronny Meeus
2013-02-28 20:10 ` Gilles Chanteperdrix
2013-02-28 20:22 ` Thomas De Schampheleire
2013-02-28 20:27 ` Gilles Chanteperdrix
2013-03-01 8:22 ` Philippe Gerum
2013-03-01 8:26 ` Gilles Chanteperdrix
2013-03-01 8:30 ` Philippe Gerum
2013-03-01 8:30 ` Gilles Chanteperdrix
2013-03-01 8:41 ` Philippe Gerum
2013-03-02 11:13 ` Ronny Meeus
2013-03-05 12:43 ` Ronny Meeus
2013-03-05 13:28 ` Philippe Gerum
2013-03-05 14:08 ` Philippe Gerum
2013-03-05 14:25 ` Ronny Meeus
2013-03-05 14:47 ` Philippe Gerum
2013-03-05 14:53 ` Ronny Meeus
2013-03-06 10:55 ` Ronny Meeus
2013-03-06 11:09 ` Philippe Gerum
2013-03-06 11:18 ` Philippe Gerum
2013-03-06 13:24 ` Philippe Gerum
2013-03-06 13:49 ` Philippe Gerum
2013-03-06 14:32 ` Ronny Meeus
2013-03-06 15:49 ` Philippe Gerum
2013-03-07 10:02 ` Ronny Meeus
2013-03-07 10:32 ` Philippe Gerum
2013-03-07 15:56 ` Philippe Gerum
2013-03-07 19:51 ` Ronny Meeus
2013-03-08 7:44 ` Ronny Meeus
2013-02-28 20:30 ` Ronny Meeus
2013-02-28 20:35 ` Gilles Chanteperdrix [this message]
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=512FBFAE.1080005@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=ronny.meeus@gmail.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.