[etherlab-dev] Problems with Xenomai

Christoph Schröder christoph.schroeder at helmholtz-berlin.de
Wed Sep 28 16:07:06 CEST 2016


Hi all,

I am currently testing the EtherCAT master with Xenomai 2.6.5 on a
Debian wheezy (I patched kernel 3.2 for this). I have a few questions
regarding problems I encountered.

#1.)
Starting with the tarball release 1.5.2 and encountered a problem with
ecrt_master_reference_clock_time which led to a segmentation fault. My
DC config here is basically the same as in the rtai_rtdm_dc example with
minor fixes since I am not using RTAI. The rest is based on the xenomai
example. The problem seems to be fixed in the mercurial repo (tested
5a70ffc4644b for later tests of the patch queue) and I would like to
know which commit fixed this issue. Unfortunately I can't find the point
where the release 1.5.2 was taken from since the changelog messages do
not correspond to the commit messages and there is no Label for the release.

This is my debugging output:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7fd8700 (LWP 4389)]
0x00007ffff68d53ca in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) backtrace
#0  0x00007ffff68d53ca in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff68daa00 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff68d553e in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff68e0188 in fprintf () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007ffff7bd8944 in ecrt_master_reference_clock_time (
     master=<optimized out>, time=<optimized out>) at master.c:717
#5  0x0000000000402ea5 in sync_DCs2 () at main.c:754
#6  0x0000000000401d35 in cyclic_task_proc () at main.c:183
#7  0x00007ffff73c2a99 in rt_task_trampoline ()
    from /usr/xenomai/lib/libnative.so.3
#8  0x00007ffff667cb50 in start_thread ()
    from /lib/x86_64-linux-gnu/libpthread.so.0
#9  0x00007ffff696ffbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()

#2.)
I did some minor tests with the patch queue and got some bad system
freezes with the xenomai example. I could locate the patch that seems to
cause the system freezes:
0011-Master-locks-to-avoid-corrupted-datagram-queue.patch
The only notable thing I could see in the kernel log is that the slaves
went back to PREOP. The Xenomai task was still running and hanging at
some point of the cycle (I placed an rt_printf in the cycle which should
have printed the cycle_counter value every other second).
The patch series seems to work if I apply the patches up to
0010-Sdo-directory-now-only-fetched-on-request.patch. Is this
reproduceable for you?

#3.)
In both versions (1.5.2 and repository 5a70ffc4644b) I get a lost frame
at startup. Is this anything to worry about?
[Wed Sep 28 15:24:51 2016] EtherCAT 0: Master thread exited.
[Wed Sep 28 15:24:51 2016] EtherCAT 0: Starting EtherCAT-OP thread.
[Wed Sep 28 15:24:51 2016] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[Wed Sep 28 15:24:52 2016] EtherCAT 0: Domain 0: Working counter changed
to 2/3.
[Wed Sep 28 15:24:52 2016] EtherCAT 0: Slave states on main device: OP.

#4.)
Will there be a new release aka a new version of the EtherCAT master in
the near future based on the patches?

Tanks and best regards,
Christoph

________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Dr. Karl Eugen Huthmacher, stv. Vorsitzende Dr. Jutta Koch-Unterseher
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de


More information about the etherlab-dev mailing list