some basic test from the showroom crashes badly

Diez B. Roggisch deets at web.de
Fri Nov 30 17:02:18 CET 2007


Hi,

I'm trying to wet my feet with RTAI again after 2 1/2 years of 
abstinence. Seems as if much things changed...


I'm using RTAI-3.6-test with kernel 2.6.23 on a Pentium 3/650MHz, GCC:4.1.2

I just tried 2.6.19 with 3.5 - kernel panic.

The running 2.6.23 + 3.6-test setup seems to work. I can run the 
latency-tests both in user/kernelspace. They seem to be ok, with only a 
bit of jitter added when adding WIFI-stress.

Now I'm trying to get my control loop running - ultimately, this is a 
bout a 1ms control loop for my robot. I plan to run it in user-space so far.

As the old code from back then doesn't compile anymore, and I'm planning 
to make everything shinier and better anyway, I took the

http://cvs.gna.org/cvsweb/showroom/v3.x/user/threaded/?cvsroot=rtai

threaded example from the CVS and created an executable. After loading 
the necessary modules

insmod ./rtai_hal.ko
insmod ./rtai_lxrt.ko
insmod ./rtai_sem.ko
insmod ./rtai_tasklets.ko
insmod ./rtai_usi.ko
insmod ./rtai_fifos.ko


I ran the exectuable. My SSH-session then looks like this:


brain:/home/deets/hades/libbruce# ./rtai_test
MASTER INIT: name = 2102370924, address = 0xc897e220.
THREAD INIT: index = 0, name = 1000, address = 0xc897ea20.
THREAD INIT: index = 1, name = 1001, address = 0xc8980220.
THREAD INIT: index = 2, name = 1002, address = 0xc8980a20.
THREAD INIT: index = 3, name = 1003, address = 0xc8981220.
THREAD INIT: index = 4, name = 1004, address = 0xc8981a20.
THREAD INIT: index = 5, name = 1005, address = 0xc8982220.
THREAD INIT: index = 6, name = 1006, address = 0xc8982a20.
THREAD INIT: index = 7, name = 1007, address = 0xc8983220.
THREAD INIT: index = 8, name = 1008, address = 0xc8983a20.
THREAD INIT: index = 9, name = 1009, address = 0xc8984220.
THREAD INIT: index = 10, name = 1010, address = 0xc8984a20.
THREAD INIT: index = 11, name = 1011, address = 0xc8985220.
THREAD INIT: index = 12, name = 1012, address = 0xc8985a20.
THREAD INIT: index = 13, name = 1013, address = 0xc8986220.
THREAD INIT: index = 14, name = 1014, address = 0xc8986a20.
THREAD INIT: index = 15, name = 1015, address = 0xc8988220.
Read from remote host 10.28.28.108: Connection reset by peer


I enabled the

			rtai_print_to_screen("THREAD: index = %d, count %d\n", mytask_indx, 
count);


line, so on my attached screen I see the loops running for each thread - 
until they reach the planned 200 revolutions.

Then my system crashes hard, with an immediate reboot.

Any suggestions?

And any suitable example code for my problem? The whole world of RTAI is 
complex, so I could need a few pointers that allow me to do the following:

  - establish a control loop, scheduled in the range of a msec, using a
    pthread

  - gather information from a servo to go card about motor positions
    and other sensory information

  - set some output voltages on the motors, by means of a PID

  - transfer the state-information above to my main-program

I'm not sure if I can do the state-passing simply by means of 
memory-location in case of a simple pthread.


Any help is greatly appreciated!

Regards,

Diez




More information about the Rtai mailing list