El Divendres, 30 de setembre de 2016, a les 16:06:15, Philippe Gerum va escriure: > On 09/30/2016 02:15 PM, Leopold Palomo-Avellaneda wrote: > > Hi, > > > > > > I'm fighting with some code to run with Xenomai 3. One of the projects is > > soem [1]. > > > > The original library uses POSIX to open a raw socket to send Ethercat > > messages. Our fork, uses rtnet and some Xenomai functionalities to > > accomplish it. It has been working with 2.6.x without any problems. > > > > OTOH, also we have done another fork fril [2] that, using the POSIX > > compatibility and rtnet use a rt_ethX device to communicate with a robot. > > We have used it without any problem too with 2.6.x > > > > Now, we try to migrate all of this code to Xenomai-3 but we are having > > crashes all the time. > > > > With fril, a pure POSIX code, using the compatibility mode, we have a > > crash,> > > showing: > > BUG: unable to handle kernel paging request at 00007f47ea0ef878 > > IP: [<ffffffffa0231580>] rt_udp_ioctl+0x50/0x74 [rtudp] > > PGD 458887067 PUD 4590a1067 PMD 45921f067 PTE 8000000438863867 > > [snip] > > > If both the program crashes "unable to handle kernel paging request". > > The compat mode is not related to this issue, it is merely a source code > wrapping trick at user level, nothing more. If a driver breaks the > kernel, then it's the driver's fault no matter what, regardless of the > input data userland might have sent.
Ok. > You should check the RTnet stack for this. Btw, assuming your 2.6 setup > relies on the original out-of-tree RTnet, and that your 3.0 > configuration relies on the RTnet code integrated in the Xenomai tree, > then you end up comparing two different RTnet implementations. I'm investigating this issue. I have found an interesting detail. I'm using rt_igb module. The first time I upload the module, it's loaded (showed with lsmod) but no rtethX interface is found. So, if I rmmod it and I load it again, then the rtethX are found. Any idea why this? In any case, we are talking to debug rtnet modules. Right? > > Also, I have found that using the --compat parameter in xeno-config, the > > values obtained (--posix --compat --cflags) makes that the applications > > doesn't> > > compile: > > /home/leopold.palomo/fril/fril.git/src/FastResearchInterfaceLibrary/Console.cpp:50: > > /usr/xenomai/include/trank/posix/pthread.h: In function ‘int > > pthread_set_mode_np(int, int, int*)’: > > /usr/xenomai/include/trank/posix/pthread.h:55:52: error: > > ‘pthread_setmode_np’ was not declared in this scope > > > > return pthread_setmode_np(clrmask, setmask, mask_r); > > > > I guess that there's a missing includes hidden here. > > No, it's rather an issue in the include directory chain when --compat is > enabled. Fixed in xeno-config, in the stable maintenance tree. > > > So, any idea to find a solution? > > Do you have some example that works with xenomai-3 and rtnet? > > No, but I'm no RTnet expert. Jan? Leopold -- -- Linux User 152692 GPG: 05F4A7A949A2D9AA Catalonia ------------------------------------- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? _______________________________________________ Xenomai mailing list Xenomai@xenomai.org https://xenomai.org/mailman/listinfo/xenomai