FAILURE rt_thread_body:116: no SIGDEBUG_MIGRATE_PRIOINV received on ARM
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello,
freshly installed Cobalt 3.0.3 on a BeagleBone Black (ARM Cortex-A8) with kernel 4.4.35 (rcn:
https://github.com/RobertCNelson/ti-linux-kernel-dev/tree/ti-linux-xenomai-4.4.y ).
When runnig xeno-test I get the below error.
Note that latency test works ok (though the values are a bit higher than expected). Any suggestions?
root@beaglebone ~/xenomai_staging$ /usr/xenomai/bin/xeno-test
Started child 4984: /bin/bash /usr/xenomai/bin/xeno-test-run-wrapper /usr/xenomai/bin/xeno-test ++ echo 0
++ testdir=/usr/xenomai/bin
++ /usr/xenomai/bin/smokey --run
arith OK
bufp skipped (no kernel support)cpu_affinity OK
iddp skipped (no kernel support)
^C
root@beaglebone ~/xenomai_staging$ /usr/xenomai/bin/xeno-test -k
Started child 4989: /bin/bash /usr/xenomai/bin/xeno-test-run-wrapper /usr/xenomai/bin/xeno-test -k ++ echo 0
++ testdir=/usr/xenomai/bin
++ /usr/xenomai/bin/smokey --run --keep-going
arith OK
bufp skipped (no kernel support)cpu_affinity OK
iddp skipped (no kernel support)
leaks OKnet_packet_dgram skipped (no kernel support)net_packet_raw skipped (no kernel support)net_udp skipped (no kernel support)posix_clock OKposix_cond OKposix_fork OKmutex_trylock not supportedposix_mutex OKposix_select OK
rtdm skipped (no kernel support)sched_quota skipped (no kernel support)sched_tp skipped (no kernel support)
FAILURE rt_thread_body:116: no SIGDEBUG_MIGRATE_PRIOINV received
Full Kernel config file is available here http://pastebin.com/raw/XwqZpE5t
XENOMAI configs only:CONFIG_XENOMAI=yCONFIG_XENO_OPT_STATS=yCONFIG_XENO_OPT_RR_QUANTUM=1000CONFIG_XENO_OPT_AUTOTUNE=yCONFIG_XENO_OPT_TIMER_LIST=yCONFIG_XENO_OPT_HOSTRT=yCONFIG_XENO_OPT_VFILE=yCONFIG_XENO_OPT_REGISTRY_NRSLOTS=512 CONFIG_XENO_OPT_SYS_HEAPSZ=512 CONFIG_XENO_OPT_PRIVATE_HEAPSZ=64 CONFIG_XENO_OPT_SHARED_HEAPSZ=64CONFIG_XENO_OPT_NRTIMERS=128CONFIG_XENO_OPT_TIMING_SCHEDLAT=0 CONFIG_XENO_OPT_TIMING_KSCHEDLAT=0 CONFIG_XENO_OPT_TIMING_IRQLAT=0CONFIG_XENO_OPT_DEBUG=yCONFIG_XENO_OPT_DEBUG_LOCKING=yCONFIG_XENO_OPT_WATCHDOG=yCONFIG_XENO_OPT_WATCHDOG_TIMEOUT=4 CONFIG_XENO_OPT_RTDM_COMPAT_DEVNODE=y CONFIG_XENO_DRIVERS_AUTOTUNE=yCONFIG_XENO_DRIVERS_16550A=yCONFIG_XENO_DRIVERS_16550A_ANY=y CONFIG_XENO_DRIVERS_TIMERBENCH=y CONFIG_XENO_DRIVERS_SWITCHTEST=y CONFIG_XENO_ARCH_UNLOCKED_SWITCH=yCONFIG_XENO_ARCH_WANT_TIP=yCONFIG_XENO_ARCH_FPU=yCONFIG_XENO_ARCH_OUTOFLINE_XNLOCK=y CONFIG_XENO_VERSION_MAJOR=3CONFIG_XENO_VERSION_MINOR=0CONFIG_XENO_REVISION_LEVEL=3 CONFIG_XENO_VERSION_STRING="3.0.3" CONFIG_XENO_VERSION_NAME="Groovy Cosmic Halo"
Quoted 6 lines · Giulio Moro
Hello,
freshly installed Cobalt 3.0.3 on a BeagleBone Black (ARM Cortex-A8) with kernel 4.4.35 (rcn:
https://github.com/RobertCNelson/ti-linux-kernel-dev/tree/ti-linux-xenomai-4.4.y ).When runnig xeno-test I get the below error.
Note that latency test works ok (though the values are a bit higher than expected).
Then maybe it does not work as expected. Could you elaborate on:
- the figures reported by latency
- whether you enabled debug (--enable-debug) when building the user libs and programs?
- did you run the autotuner to calibrate the core clock?
You may also want to make sure that debug options like XENO_OPT_DEBUG_LOCKING are disabled, vanilla kernel debug options likewise (DEBUG_LIST, IPIPE_TRACE and so on).
Quoted 4 lines
Any suggestions?
FAILURE rt_thread_body:116: no
SIGDEBUG_MIGRATE_PRIOINVreceived
That one is a known pending issues with the smoke tests exercising the some Xenomai debug features, but won't affect the measurement performed by the "latency" program.
Signature · 1 line
Philippe.
Thanks
Quoted 1 line
- the figures reported by latency
Latency results with the previously described system were RTS| 7.872| 11.098| 54.957| 0| 0| 00:00:18/00:00:18
Quoted 5 lines
- whether you enabled debug (--enable-debug) when building the user libs and programs?
You may also want to make sure that debug options likeXENO_OPT_DEBUG_LOCKINGare disabled, vanilla kernel debug options likewise (DEBUG_LIST,IPIPE_TRACEand so on).
I previously did not specify --enable-debug.
I now rebuilt the kernel according to your recommendations (full config file here
http://pastebin.com/fb623kSQ ), and then built the user-space library with --disable-debug --with-core=cobalt --enable-pshared --build=arm
Latency results have improved over the previous build:
RTS| 1.487| 6.459| 46.364| 0| 0| 00:03:19/00:03:19
With the new configuration, I do NOT get the FAILURE rt_thread_body:116 error when running xeno-test.
Quoted 1 line
- did you run the autotuner to calibrate the core clock?
I run the autotuner buy I get large variations between successive runs, so I am not sure which values I should echo to /proc/xenomai/clock/coreclk :
== auto-tuning started, period=1000000 ns (may take a while) irq gravity... 999 ns
kernel gravity... 6499 ns
user gravity... 5999 ns
== auto-tuning completed after 21s
== auto-tuning started, period=1000000 ns (may take a while) irq gravity... 2999 ns
kernel gravity... 5499 ns
user gravity... 6999 ns
== auto-tuning completed after 24s
== auto-tuning started, period=1000000 ns (may take a while) irq gravity... 3499 ns
kernel gravity... 3499 ns
user gravity... 5499 ns
== auto-tuning completed after 23s
== auto-tuning started, period=1000000 ns (may take a while) irq gravity... 999 ns
kernel gravity... 2999 ns
user gravity... 4499 ns
What do these values mean?
Are they supposed to vary so much? What can I do about it?
Thanks,
Giulio
PS: For reference, these are the latency performance on the same board with Xenomai 2.6 on Linux 3.8.13 RTS| 3.666| 6.958| 46.124| 0| 0| 00:15:10/00:15:10
(I have no way to run the autotuner there as I did not build the library myself so I don't have the utility).
Quoted 8 lines · Giulio Moro
I now rebuilt the kernel according to your recommendations (full config file here
http://pastebin.com/fb623kSQ ), and then built the user-space library with --disable-debug --with-core=cobalt --enable-pshared --build=armLatency results have improved over the previous build:
RTS| 1.487| 6.459| 46.364| 0| 0| 00:03:19/00:03:19With the new configuration, I do NOT get the FAILURE rt_thread_body:116 error when running xeno-test.
There is an ARM board exhibiting the same issue here; some runtime condition seems to be defeating the test. Will check.
Quoted 25 lines
Quoted 2 lines
- did you run the autotuner to calibrate the core clock?
I run the autotuner buy I get large variations between successive runs, so I am not sure which values I should echo to
/proc/xenomai/clock/coreclk:== auto-tuning started, period=1000000 ns (may take a while) irq gravity... 999 ns
kernel gravity... 6499 ns
user gravity... 5999 ns
== auto-tuning completed after 21s
== auto-tuning started, period=1000000 ns (may take a while) irq gravity... 2999 ns
kernel gravity... 5499 ns
user gravity... 6999 ns
== auto-tuning completed after 24s
== auto-tuning started, period=1000000 ns (may take a while) irq gravity... 3499 ns
kernel gravity... 3499 ns
user gravity... 5499 ns
== auto-tuning completed after 23s
== auto-tuning started, period=1000000 ns (may take a while) irq gravity... 999 ns
kernel gravity... 2999 ns
user gravity... 4499 ns
Quoted 1 line
What do these values mean?
See there:
http://www.xenomai.org/documentation/xenomai-3/html/man1/autotune/index.html
Quoted 2 lines
Are they supposed to vary so much? What can I do about it?
Yes, they can vary, the effect of cache management can be significant on latency (especially on ARM systems, depending on the cache model and/or controller). In addition, the autotuner uses heuristics to figure out the best calibration values, which may cause the results to fluctuate a bit across calls.
This said, the figures you report are counts of nanoseconds, so a variation of 3 us at worst on a BBB is quite small. If the application can't cope with this variation for carrying out real-time duties, then using a Linux system on a general-purpose OMAP SoC may not be the best option for running it anyway.
Keep in mind that unlike a traditional RTOS fully controlling the hardware, this is a dual kernel system, where a GPOS and a RTOS core are fundamentally competing for the hardware resources.
e.g. plain Linux activity happily evicting cachelines used by Xenomai as soon as the latter temporary sleeps, adding delays due to cache misses when it resumes.
You can observe a manifestation of such competition by comparing the worst case latency figures obtained from sampling at 1Khz (the default on ARM) and 10Khz (latency -p 100).
Quoted 5 lines
Thanks,
GiulioPS: For reference, these are the latency performance on the same board with Xenomai 2.6 on Linux 3.8.13 RTS| 3.666| 6.958| 46.124| 0| 0| 00:15:10/00:15:10
Which is comparable to 3.0.x.
Quoted 2 lines
(I have no way to run the autotuner there as I did not build the library myself so I don't have the utility).
The autotuner appeared in Xenomai 3.x, you won't find it in a 2.x release anyway.
Signature · 1 line
Philippe.