2009-11-27 05:10:34     Ipipe error running a rt task

Document created by Aaronwu Employee on Aug 19, 2013
Version 1Show Document
  • View in full screen mode

2009-11-27 05:10:34     Ipipe error running a rt task

Michael Löffler (GERMANY)

Message: 82811   

 

Hi,

 

currently I'm struggling with an quite randomly appearing error resulting in an reboot of the system. The last thing printed to the console before the reboot of the system is this:

 

Kernel panic - not syncing: BUG!                                              

<4>BUG: failure at kernel/ipipe/core.c:319/__ipipe_restore_root()!            

icache_enable

 

I'm running 2008-stable with the xenomai patch. The program itself is running as an rtdm task in the secondary domain and is calling rt_dev_ioctl() in a loop. The device driver itself worked stable so far. Now it sometimes takes several hundred loops, or even several thousand, but then this error happens. I found the corresponding line in the kernel source, but I'm not sure if removing it will cause even worse debuggable problems. Did I forget some special settings in the kernel config or are there some things setting up the rt task, that can go wrong?

TranslateQuoteReplyEditDelete

 

 

2009-11-27 05:18:17     Re: Ipipe error running a rt task

Yi Li (CHINA)

Message: 82812   

 

Michael,

 

Could you also report this issue to the xenomai mailing list? Also can you reproduce this bug on 2009R1 release?

 

-Yi

QuoteReplyEditDelete

 

 

2009-11-27 14:25:25     Re: Ipipe error running a rt task

Michael Löffler (GERMANY)

Message: 82817   

 

I put together a little code snippet to demonstrate the error. Unfortunately, I can't test it under 2009R1, as the provided adeos patch does not work for me. As suggested, I'll also have a look at the xenomai list. Here is the snippet. It runs something from 500 to 5000 cycles, and then crashes with the already mentioned error message. The problem seems to be rt_task_sleep(). When I replace it with usleep(), it seems to work fine (10000+ cycles).

 

#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);

    }

}

TranslateQuoteReplyEditDelete

 

 

2009-11-29 21:34:53     Re: Ipipe error running a rt task

Yi Li (CHINA)

Message: 82875   

 

Sorry, we don't support 2008R1.5 release now.

 

-Yi

QuoteReplyEditDelete

 

 

2009-11-30 12:31:34     Re: Ipipe error running a rt task

Robin Getz (UNITED STATES)

Message: 82894   

 

Michael:

 

What is the exact problem with the 2009R1 & ADEOS patch? Doesn't it apply?

 

-Robin

Attachments

    Outcomes