Hello,

A few months ago, my colleague Jerome Pasquero reported a problem with
calls to system() with the 2.4 branch of Xenomai
(https://mail.gna.org/public/xenomai-help/2008-01/msg00047.html). I am
experiencing the same problem with linux 2.6.24.4 and xenomai 2.4.2.

The problem occurs when calling system() or fork() in a realtime task. It
only seems to occur when the program is linked against other libraries
(e.g. -lxml2 or -lgtkmm-2.4). The mouse continues to function after the
call but the system becomes unresponsive and must be rebooted.

The problem can be reproduced by compiling and running the following code:

gcc -lgtkmm-2.4 -lnative `/usr/xenomai/bin/xeno-config --xeno-cflags`
`/usr/xenomai/bin/xeno-config --xeno-ldflags` -lstdc++ main.cpp

#include <native/task.h>
#include <sys/mman.h>
int main(int argc, char* argv[])
{
        RT_TASK task;
        mlockall(MCL_CURRENT | MCL_FUTURE);
        rt_task_shadow(&task, "stress-gui", 50, 0);
        system("ls");
        return 0;
};

I tried to apply the patch suggested by Jan Kiszka
(https://mail.gna.org/public/xenomai-help/2008-01/msg00051.html) but I
wasn't able to find the version of linux kernel and xenomai that the patch
was intended for.

I would appreciate your help to resolve or work around this problem. I am
using the system() calls to insert and remove modules with modprobe and
rmmod. Is there a better way to accomplish the same result? Is there a way
to terminate a realtime task and resume normal execution? I could then
execute the modprobe and rmmod commands before and after running the
realtime tasks.

Thank you,

Vincent Levesque
[EMAIL PROTECTED]





_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to