Jan Kiszka wrote:
Hi,
strange things happen sometimes, and it can take a long time to track it
down:
On our embedded systems, RTAI and RTnet is loaded during bootup through
some scripts all running in the same shell process. RTnet then blocks on
some handshake with other stations. You can press CTRL-C to terminate
the blocking RTnet-tool at this point. After that, I noticed that the
system became unstable and crashed upon any RTAI scheduler activity. Of
course, I started looking for the problem in RTnet...
But it is actually an rtai_lxrt issue, I does not occur when using
rtai_ksched! It can also be easily triggered with RTAI's own modules:
#!/bin/sh
insmod rtai_hal
insmod rtai_lxrt
insmod rtai_sem
read SOME_VAR
<EOF>
Run the script above, press enter and then load e.g. rtai_wd. Everything
will be fine. Then do the same again (after unloading, of course), but
press CTRL-C to terminate the read command. Now the system will crash
when trying to load rtai_wd! Cross-checks: replace rtai_lxrt with
rtai_ksched, and nothing will happen; load the RTAI modules in some
other shell context, and there will also be no crash (on our box, this
happens when starting the rtnet script after the boot process from the
command prompt - also something which first causes headache...).
Used versions:
linux-2.4.28-adeos-r16
RTAI 3.1 and today's vesuvio-cvs
Note: I'm using a busybox system, but I don't think this issue is
limited to that shell (and even if, it's still a bug).
Can you setup the crash with something more manageable than rtai_wd? I'm
not using it and I suspect it was never tested with LXRT.
I tried your script with "user/i386/resumefromintr" in showroom and it
works repeatedly, however I terminate your script. Resumefromintr loads
a module and runs a task in user space.
Paolo.