From: Jan Kiszka <jan.kiszka@domain.hid>
To: Stephan Zimmermann <s.zimmermann@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Kernel crash during queue create/destroy
Date: Wed, 15 Nov 2006 22:01:10 +0100 [thread overview]
Message-ID: <455B8016.2020605@domain.hid> (raw)
In-Reply-To: <200611151544.00429.s.zimmermann@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 2465 bytes --]
Stephan Zimmermann wrote:
> Am Mittwoch, 15. November 2006 14:19 schrieb Dmitry Adamushko:
>> Hello,
>>
>> I got some trouble with the native skin and queues, when creating /
>> deleting
>>
>>> queues, my Kernel sometimes (actually very often...) crashes, leading to
>>> a frozen system, with my Xenomai program continuing until it returns. I
>>> tried
>>> to isolate / reproduce the problem, which lead me to the following
>>> demo-code.
>> it looks like there is some "misunderstanding" between
>>
>> (1) rt_queue_delete() -> xnregistry_remove()
>>
>> and
>>
>> (2) registry_proc_callback() which crushes in remove_proc_entry().
>>
>> You may follow the logic in ksrc/nucleus/registry.c.
>>
>> rt_queue_create() -> xnregistry_enter() -> ... -> registry_proc_callback()
>>
>> rt_queue_delete() -> xnregistry_remove() -> ... registry_proc_unexport()
>>
>> I don't have enough time to investigate further right now, but
>> nevertheless, could you apply the following patch and let us know of the
>> outcome?
>
> Thanks for your fast response. I just applied (and recompiled everything...)
> the patch you attached to your last Post. It doesn't seem to change anything
> for me. I attached the entries from syslog the test produced.
>
/me unfortunately failed to reproduce your problem here. Instead, I
found a regression in SVN head - different story for a different thread.
I have another debugging suggestion:
Enable CONFIG_IPIPE_TRACE_MCOUNT (under Kernel Hacking) and patch the
kernel as follows:
--- arch/i386/mm/fault.c.orig
+++ arch/i386/mm/fault.c
@@ -515,6 +515,8 @@ no_context:
bust_spinlocks(1);
+ ipipe_trace_freeze(0);
+
if (oops_may_print()) {
#ifdef CONFIG_X86_PAE
if (error_code & 16) {
Then recompile it and let your test run. After (and if...) it crashed,
you should look at /proc/ipipe/trace/frozen. This will contain a
back-trace around the crash. Tune the output via, e.g.,
echo 1000 > /proc/ipipe/trace/back_trace_points
(see also our wiki on more information about the tracer)
so that at least the path from the previous rt_queue_create up to the
crash is visible. This will give a call history (not just a stack
back-trace), as the tracer records all function calls in the kernel. May
help us to understand if we hit an unexpected function schedule here. It
all sounds like some rare race to me. I hope the trace will not make it
vanish...
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2006-11-15 21:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-15 10:21 [Xenomai-help] Kernel crash during queue create/destroy Stephan Zimmermann
2006-11-15 13:19 ` Dmitry Adamushko
2006-11-15 14:44 ` Stephan Zimmermann
2006-11-15 21:01 ` Jan Kiszka [this message]
2006-11-15 22:22 ` Philippe Gerum
2006-11-15 22:36 ` Jan Kiszka
2006-11-15 22:43 ` Jan Kiszka
2006-11-15 22:46 ` Philippe Gerum
2006-11-15 22:52 ` Jan Kiszka
2006-11-15 22:44 ` Philippe Gerum
2006-11-16 11:57 ` Philippe Gerum
2006-11-16 12:59 ` Stephan Zimmermann
2006-11-16 13:26 ` Philippe Gerum
2006-11-16 15:35 ` Stephan Zimmermann
2006-11-16 15:44 ` Jan Kiszka
2006-11-17 12:38 ` Stephan Zimmermann
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=455B8016.2020605@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=s.zimmermann@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.