From: Philippe Gerum <rpm@xenomai.org>
To: "Stoidner, Christoph" <c.stoidner@arvero.de>,
Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] "inconsistent lock state" on boot-up
Date: Mon, 17 Nov 2014 12:30:28 +0100 [thread overview]
Message-ID: <5469DC54.20005@xenomai.org> (raw)
In-Reply-To: <586e7083cd014fcfb15447028fa02840@EX132MBOX1B.de2.local>
On 11/17/2014 12:13 PM, Stoidner, Christoph wrote:
>
>>>
>>> Now the problem "scheduling while atomic" does not occur anymore
>>> within API calls of our own skin. However, after some run-time
>>> (about 5 minutes or more) it seems to appear in gatekeeper-thread
>>> (see below).
>>>
>>> What is not clear to me is the ipipe_raise_irq() call in backtrace
>>> below. I could not identify any according call from within
>>> gatekeeper_thread(). Do I overlook something?
>>>
>>> What I also do not understand is the timestamp of kernel message.
>>> As mentioned the messages do appear about 5 minutes after kernel
>>> start. However the message's timestamp are from about 40 seconds
>>> after boot? Could it happen that messages are delayed? Or is the
>>> timestamp wrong?
>>
>> This would probably mean an issue with the tsc emulation, have you
>> tried running the "tsc" program, from xenomai regression testsuite
>> with the -w option ? I remember than the imx28 tsc emulation is a
>> bit weird, the hardware sometimes returns wrong values, and the
>> support answer was "read it twice, until you get twice the same
>> value". But I never found this really satisfactory: what if reading
>> it twice returns the same wrong value twice ?
>>
>> The tsc test should see if the tsc wrapping is doing fine. You can
>> try to run it several time, or even in parallel to your tests, to
>> see if it does not detect any problem.
>
> There are some other kernel message whose's timestamp seems to be correct. E.g. when creating a semaphore (as below):
>
> [ 17.336237] Xenomai: registered exported object @CGI (semaphores)
> [ 17.344122] Xenomai: registered exported object LOG (msgx)
>
> I would expect these message on program start which would also match the shown timestamp. However these message are also outputted late after 5 minutes run-time, exact same time when "scheduling while atomic" is showed. So now I am assuming the timestamp is valid but messages are delayed shown. However I feel this has nothing to do with my main problem: the program crash. So maybe I should open a new thread for "delayed kernel message or wrong time stamp".
>
> Back to topic: Do you have any idea why "scheduling while atomic" is thrown by gatekeeper_thread(), based on the backtrace? Or do you know on which place ipipe_raise_irq() is called from gatekeeper thread respectively if that would be legal/expected?
>
You seem to be running a preempt-rt patched kernel, but the Xenomai core
acts as if it was built for a regular preemption kernel. This virq is
triggered by some code in the Xenomai rescheduling when the caller runs
in secondary mode, which the gatekeeper always does. This code is
correct, the way it is handled by the APC code in Xenomai due to this
apparent build mismatch is not.
--
Philippe.
next prev parent reply other threads:[~2014-11-17 11:30 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-09 10:07 [Xenomai] "inconsistent lock state" on boot-up Stoidner, Christoph
2014-11-09 15:53 ` Gilles Chanteperdrix
2014-11-10 9:08 ` Stoidner, Christoph
2014-11-10 12:33 ` Stoidner, Christoph
2014-11-10 12:44 ` Gilles Chanteperdrix
2014-11-10 12:43 ` Gilles Chanteperdrix
2014-11-10 14:52 ` Jan Kiszka
2014-11-10 15:56 ` Gilles Chanteperdrix
2014-11-10 18:29 ` Jan Kiszka
2014-11-10 19:46 ` Gilles Chanteperdrix
2014-11-10 19:51 ` Gilles Chanteperdrix
2014-11-10 19:55 ` Jan Kiszka
2014-11-10 20:00 ` Gilles Chanteperdrix
2014-11-10 20:02 ` Jan Kiszka
2014-11-10 20:06 ` Gilles Chanteperdrix
2014-11-10 20:10 ` Jan Kiszka
2014-11-10 20:14 ` Gilles Chanteperdrix
2014-11-10 20:17 ` Jan Kiszka
2014-11-10 20:18 ` Gilles Chanteperdrix
2014-11-10 20:22 ` Jan Kiszka
2014-11-10 20:23 ` Gilles Chanteperdrix
2014-11-10 20:28 ` Jan Kiszka
2014-11-10 20:37 ` Gilles Chanteperdrix
2014-11-10 20:42 ` Jan Kiszka
2014-11-10 20:55 ` Gilles Chanteperdrix
2014-11-10 21:58 ` Gilles Chanteperdrix
2014-11-12 17:27 ` Gilles Chanteperdrix
2014-11-17 16:48 ` Jan Kiszka
2014-11-17 16:59 ` Gilles Chanteperdrix
2014-11-17 17:11 ` Jan Kiszka
2014-11-17 17:33 ` Gilles Chanteperdrix
2014-11-17 19:07 ` Jan Kiszka
2014-11-17 19:24 ` Gilles Chanteperdrix
2014-11-18 6:19 ` Jan Kiszka
2014-11-18 6:28 ` Gilles Chanteperdrix
2014-11-11 17:33 ` Stoidner, Christoph
2014-11-11 17:46 ` Gilles Chanteperdrix
2014-11-11 18:04 ` Philippe Gerum
2014-11-17 10:01 ` Stoidner, Christoph
2014-11-17 10:22 ` Gilles Chanteperdrix
2014-11-17 11:13 ` Stoidner, Christoph
2014-11-17 11:30 ` Philippe Gerum [this message]
2014-11-17 13:16 ` Gilles Chanteperdrix
2014-11-17 11:49 ` Philippe Gerum
2014-11-17 11:51 ` Philippe Gerum
2014-11-17 13:10 ` Gilles Chanteperdrix
2014-11-17 13:33 ` 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=5469DC54.20005@xenomai.org \
--to=rpm@xenomai.org \
--cc=c.stoidner@arvero.de \
--cc=gilles.chanteperdrix@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.