From: Jan Kiszka <jan.kiszka@domain.hid>
To: rpm@xenomai.org
Cc: Petr Cervenka <grugh@domain.hid>, xenomai@xenomai.org
Subject: Re: [Xenomai-help] Kernel panic: not syncing
Date: Tue, 08 Jul 2008 10:38:43 +0200 [thread overview]
Message-ID: <48732793.7090605@domain.hid> (raw)
In-Reply-To: <48723D5D.6020008@domain.hid>
Philippe Gerum wrote:
> Petr Cervenka wrote:
>> Hello,
>> I'm not sure if I'm not off topic.
>> We use Linux 2.6.24 and Xenomai 2.4.1. Occasionally (once in few days) we get an kernel panic and I don't know If it's our fault or a problem of kernel/xenomai/adeos/configuration/hw/...
>> If you have any questions, i'll try to answer them. Any help is welcome.
>
> It is an I-pipe issue, probably. We have to somewhat forge the register frame
> passed to the Linux tick handler, since we may delay that call. Some register
> values the profiling code attempts to dereference to find the preempted code may
> be wrong in our case.
>
> Could you 1) send back a disassembly of the profile_tick routine in your kernel
> image, then apply the following patch to check whether it improves the situation
> as well? TIA,
>
> --- 2.6.24-x86-2.0-03/arch/x86/kernel/ipipe.c~ 2008-02-11 10:48:24.000000000 +0100
> +++ 2.6.24-x86-2.0-03/arch/x86/kernel/ipipe.c 2008-07-07 17:55:36.000000000 +0200
> @@ -933,12 +933,7 @@
> tick_regs->eip = regs.eip;
> tick_regs->ebp = regs.ebp;
> #else /* !CONFIG_X86_32 */
> - tick_regs->ss = regs->ss;
> - tick_regs->rsp = regs->rsp;
> - tick_regs->eflags = regs->eflags;
> - tick_regs->cs = regs->cs;
> - tick_regs->rip = regs->rip;
> - tick_regs->rbp = regs->rbp;
> + *tick_regs = *regs;
> #endif /* !CONFIG_X86_32 */
I'm fairly sure that this won't make a difference. According to Petr's
first dump we crash in profile_pc, and there the kernel pokes around on
the stack of the interrupted context (Petr, you are running SMP,
right?). The question is if this stack may have vanished or may have
been swapped out after capturing the registers. Or the test
"!user_mode(regs) && in_lock_functions(pc)" returns an invalid result
(Petr, do you run Xenomai kernel tasks?).
I do not yet see the scenario behind it, but a workaround for a
vanishing stack could be to cache sp[0] and sp[1] (as accessed in
profile_pc) and let a faked regs->rsp point to that cache. Nevertheless,
understanding the actual reason should remain a goal at the same time
(to avoid papering over an even more serious issue).
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2008-07-08 8:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-07 15:45 [Xenomai-help] Kernel panic: not syncing Petr Cervenka
2008-07-07 15:59 ` Philippe Gerum
2008-07-08 8:31 ` Petr Cervenka
2008-07-08 8:38 ` Jan Kiszka [this message]
2008-07-08 9:21 ` Gilles Chanteperdrix
2008-07-08 9:33 ` Jan Kiszka
2008-07-09 15:19 ` Petr Cervenka
2008-07-09 16:05 ` Philippe Gerum
2008-07-10 13:45 ` Petr Cervenka
2008-07-11 13:18 ` Petr Cervenka
2008-07-15 14:42 ` Petr Cervenka
2008-07-15 15:03 ` Jan Kiszka
2008-07-16 8:39 ` Petr Cervenka
2008-07-17 10:21 ` Jan Kiszka
2008-07-21 10:58 ` Petr Cervenka
2008-07-21 11:26 ` Jan Kiszka
2008-07-31 16:14 ` [Xenomai-help] Segmentation error by heavy dynamic RT_QUEUE usage Petr Cervenka
2008-08-12 14:37 ` Philippe Gerum
2008-08-13 11:01 ` [Xenomai-core] [PATCH] Fix stat overruns on 64-bit (was: [Xenomai-help] Kernel panic: not syncing) Jan Kiszka
2008-08-13 15:29 ` [Xenomai-core] [PATCH] Fix stat overruns on 64-bit 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=48732793.7090605@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=grugh@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.