All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Xenomai-core] [PATCH] Fix stat overruns on 64-bit (was: [Xenomai-help] Kernel panic: not syncing)
@ 2008-08-13 15:48 Fillod Stephane
  2008-08-13 17:02 ` Gilles Chanteperdrix
  2008-08-13 17:53 ` Philippe Gerum
  0 siblings, 2 replies; 5+ messages in thread
From: Fillod Stephane @ 2008-08-13 15:48 UTC (permalink / raw)
  To: Jan Kiszka, xenomai-core

Jan Kiszka wrote:
>/proc/xenomai/stat output is strange. Probably some type cast error, 
> because 18446744071739514846 = 0xFFFFFFFF8A939FDE and the appropriate 
> value perhaps should be 0x000000008A939FDE = 2324930526.
[...]

Reminds me that other pending patch for /proc/xenomai/faults:
https://mail.gna.org/public/xenomai-core/2007-12/msg00064.html

-- 
Stephane


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [Xenomai-help] Kernel panic: not syncing
@ 2008-07-08  9:33 Jan Kiszka
  2008-07-09 15:19 ` Petr Cervenka
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2008-07-08  9:33 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Petr Cervenka, xenomai

Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>> 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.
> 
> When Xenomai has forwarded the tick to linux, Linux tick handler is
> executed upon resume to user-space, so, if the stack had to vanish, it
> would have to vanish upon execution of another interrupt handler before
> the tick handler. However, I believe that only do_exit can kill a task,
> and I am not sure if it can be called from an interrupt handler. As for
> the stack being swapped out, it is kmalloced memory, so, it is impossible.
> 

Yes, vanishing stack is unlikely, more probable is an invalid state
right from the beginning. I guess we need a full oops to say more.

Petr, any chance to attach a serial cable to your box and catch those
oopses completely via a second box? The register state would be telling,
but also, as Philippe already requested, a disassembly of the involved
function - in case it remain profile_pc: objdump -dS
linux-.../arch/x86/kernel/time_64.o.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-13 20:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-13 15:48 [Xenomai-core] [PATCH] Fix stat overruns on 64-bit (was: [Xenomai-help] Kernel panic: not syncing) Fillod Stephane
2008-08-13 17:02 ` Gilles Chanteperdrix
2008-08-13 20:50   ` Philippe Gerum
2008-08-13 17:53 ` Philippe Gerum
  -- strict thread matches above, loose matches on Subject: below --
2008-07-08  9:33 [Xenomai-help] Kernel panic: not syncing Jan Kiszka
2008-07-09 15:19 ` Petr Cervenka
2008-07-09 16:05   ` Philippe Gerum
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-08-13 11:01                   ` [Xenomai-core] [PATCH] Fix stat overruns on 64-bit (was: [Xenomai-help] Kernel panic: not syncing) Jan Kiszka

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.