[Rtai] can't init usermode tasks

Paolo Mantegazza mantegazza at aero.polimi.it
Fri May 16 09:24:36 CEST 2008


Chris Cole wrote:
> Hey all,
> I've just installed the linux-image-2.6.24-16-rtai package which is in
> the linuxcnc archive and I had a couple (I think easy?) questions.
> 
> I go into /usr/realtime-2.6.24-16-rtai/testsuite/user/latency (as a
> normal user), I type ./run and I get:
> 
> CANNOT INIT MASTER TASK
> 
> but when I run this as root I get successful output.
> 
> I also made a really simple c++ program to test this:
> // file test.cc
> #include <rtai_lxrt.h>
> #include <iostream>
> #include <cstdlib>
> using namespace std;
> 
> int main()
> {
>   RT_TASK *foo = rt_task_init(nam2num("test"), 0, 0, 0);
>   if (!foo)
>     {
>       cout << "can't init realtime task" << endl;
>       exit(1);
>     }
>   return 0;
> }
> 
> 
> compiling and running this above example yields:
> 
> ccole at darter:~$ uname -r
> 2.6.24-16-rtai
> ccole at darter:~$ g++ test.cc -I/usr/realtime-2.6.24-16-rtai/include -o test
> ccole at darter:~$ ./test
> can't init realtime task
> ccole at darter:~$ sudo ./test
> Segmentation fault
> 
> So, in short I'm confused -- why should I be able to run the latency
> test as root, but then have something as simple as rt_init_task
> segfault? Also, unless I'm mistaken, shouldn't I be able to run these
> tasks as myself (not root)? I've tried this on two different hardware
> platforms now with the same results. Maybe someone could provide me with
> insight on where to start tracing things out when they fail?
> 

RTAI modules loaded?

Paolo.

> 
> Chris
> 
> 
> _______________________________________________
> Rtai mailing list
> Rtai at rtai.org
> https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai
> 




More information about the Rtai mailing list