A remark to rt_task_make_periodic in lxrt (bug report !?)
ngustavson at emacinc.com
Fri Aug 23 18:59:39 CEST 2002
I agree, I have fallen into the same pitfall several times.
It has been my experiance that it's not really rt_task_make_periodic that
causes the problem, but the confusing rt_gettime functions, which return
timer units sometimes, nanoseconds other times, and apparently random
nonsense numbers other times.
If you put the wrong one in your rt_task_make_periodic starttime, you wind
up with lock ups and weird bugs that manifest themselves depending on where
rt_task_make_periodic is called. I have finally stopped having this problem
by always using rt_get_cpu_time_ns to get the time. This function seems to
always return the time in nanoseconds regardless of what mode I'm running
in. Newbies however, should beware the time functions.
I am running in one_shot mode a lot of the time on a non-TSC machine. This
seems to cause a lot of the time functions to return a strange constant
whenever they are called that has nothing to do with the time.
Just an opionion,
Nathan Z. Gustavson
2380 EMAC Way
Carbondale, IL 62902
Phone (618) 529-4525 ext 320
Fax (618) 457-0110
From: rtai-admin at rtai.org [mailto:rtai-admin at rtai.org]On Behalf Of
andreas.spieker at daimlerchrysler.com
Sent: Friday, August 23, 2002 7:36 AM
To: rtai at rtai.org
Subject: A remark to rt_task_make_periodic in lxrt (bug report !?)
I had serious trouble with rtai/lxrt for months -
a system with 5-10 processes in userspace,
comunicating with systemV IPC (sem, shm, msq).
I use rtai/lxrt mainly to schedule the processes
which are running with periods of 5/20/40 ms,
some are running aperiodic.
I had freezes (20-60 seconds) during the startup of my processes
and also freezes when restarting a process.
I had the problems on uniprocessor and SMP machines,
on a very slow old toshiba laptop, the freezes had a duration
of about 1 hour. But when this freezes had finished, the system
In order to find the error I even tried the LTT (fine).
An then, a few days ago, while trying to understand
the system behaviour with the LLT visualizer
(but even the LTT data was corrupted/data loss with a warning
from the collecting LTT module)
and I couldn't find the reason from the trace data --
I understood that the problem was due to a starting time to
lying a few seconds in the past.
After two hours of work, the error was fixed and I had
no more problems until now. I'm happy with rtai/lxrt.
So I'd like to ask the developers, if they could prevent
other users from making the same experience.
Dr.-Ing. Andreas Spieker
Research Information and Communication
Assisting Systems (RIC/AA)
Telefon: (+49) 711-17-41434
Telefax: (+49) 711-17-47054
email: andreas.spieker at daimlerchrysler.com
Hedelfinger Straße 4 / 6
RTAI mailing list
RTAI at rtai.org
More information about the Rtai