All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] Bug in rt_task_sleep() ?
@ 2009-11-27 22:15 Michael Löffler
  2009-11-28  8:25 ` Jan Kiszka
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Löffler @ 2009-11-27 22:15 UTC (permalink / raw)
  To: xenomai

Hello List!

I have an application running rt_task_sleep() in a loop. After a more or
less random number of loops, something up to 5000 cycles, the system
reboots with the following error message:

Kernel panic - not syncing:
BUG!
<4>BUG: failure at kernel/ipipe/core.c:319/__ipipe_restore_root()!

For me it's not a bigger issue, as I can replace it with usleep() and
everything works fine, but maybe it's something, someone could have a
closer look at. On my system (blackfin537-stamp, uclinux2008, xenomai
2.4.0) it can be reproduced with the following code:

#include <stdio.h>
#include <unistd.h>
#include <rtdm/rtdm.h>
#include <native/task.h>
#include <linux/delay.h>

RT_TASK _rtTask;

int main(int argc, char *argv[]) {
    rt_task_shadow(&_rtTask, "whatever", 1, 0);
    rt_task_set_mode(0, T_PRIMARY, NULL); // primary

    uint32_t n = 0;
    while (1) {
        printf("Loop %u OK. Waiting....\n", n++);
        rt_task_sleep(100000000); // 500MHZ -> 0.2s
        //usleep(100000);
    }
}



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

* Re: [Xenomai-core] Bug in rt_task_sleep() ?
  2009-11-27 22:15 [Xenomai-core] Bug in rt_task_sleep() ? Michael Löffler
@ 2009-11-28  8:25 ` Jan Kiszka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2009-11-28  8:25 UTC (permalink / raw)
  To: Michael Löffler; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]

Michael Löffler wrote:
> Hello List!
> 
> I have an application running rt_task_sleep() in a loop. After a more or
> less random number of loops, something up to 5000 cycles, the system
> reboots with the following error message:
> 
> Kernel panic - not syncing:
> BUG!
> <4>BUG: failure at kernel/ipipe/core.c:319/__ipipe_restore_root()!
> 
> For me it's not a bigger issue, as I can replace it with usleep() and

usleep means that your RT task leaves real-time space for the execution
of this Linux service. So you effectively avoid the permanent switch
between primary and secondary mode that your demo currently triggers due
to rt_task_sleep vs. printf.

> everything works fine, but maybe it's something, someone could have a
> closer look at. On my system (blackfin537-stamp, uclinux2008, xenomai
> 2.4.0) it can be reproduced with the following code:

Already tried with a non-outdated Xenomai release, namely 2.4.10 or 2.5
git? It makes no sense hunting already fixed bugs.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

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

end of thread, other threads:[~2009-11-28  8:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-27 22:15 [Xenomai-core] Bug in rt_task_sleep() ? Michael Löffler
2009-11-28  8:25 ` 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.