Skip to contentSkip to conversation

Xenomai warn_upon_switch

Xenomai Leopold Palomo-Avellaneda 4 participants 17 messages Jun 26, 2013 – Jul 1, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

since 2.6.x the Orocos users have difficulties (or simple cannot) use Xenomai. Despite of some bug in the Orocos code, xenomai emits a warn_upon_switch that makes the user to use a console program - deployer - (basically for the orocos philosofy) to launch rt programs.

I think that this signal must be treated in some way by the Orocos code, but it's not developed yet. Since then, there's a way to silent this signal, or simple that doesn't overflow the console but thousand of messages like this:

/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(warn_upon_switch+0x15)[0x7f662af09295]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7f66297eb030]
/usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7f6629c0231b]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT2os6ThreadD1Ev+0x11d)[0x7f662af0530d]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT8ActivityD2Ev+0x37)[0x7f662aebbd27]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT8ActivityD0Ev+0x9)[0x7f662aebbd79]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT11TaskContextD1Ev+0x16c)[0x7f662aebd0ac]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-ocl-taskbrowser-
xenomai.so.2.6.0(_ZN3OCL11TaskBrowserD1Ev+0xed)[0x7f662a9193fd]
deployer-xenomai(main+0x70a)[0x40f67a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f6627e5fead]
deployer-xenomai[0x40fa5d]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(warn_upon_switch+0x15)[0x7f662af09295]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7f66297eb030]
/usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7f6629c0231b]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT2os5MutexD1Ev+0x3d)[0x7f662aeb91fd]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT11TaskContextD1Ev+0xfc)[0x7f662aebd03c]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-ocl-taskbrowser-
xenomai.so.2.6.0(_ZN3OCL11TaskBrowserD1Ev+0xed)[0x7f662a9193fd]
deployer-xenomai(main+0x70a)[0x40f67a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f6627e5fead]
deployer-xenomai[0x40fa5d]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(warn_upon_switch+0x15)[0x7f662af09295]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7f66297eb030]
/usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7f6629c0231b]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT15ExecutionEngineD2Ev+0x2d2)[0x7f662aef71d2]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT15ExecutionEngineD0Ev+0x9)[0x7f662aef7319]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-ocl-taskbrowser-
xenomai.so.2.6.0(_ZN3OCL11TaskBrowserD1Ev+0xed)[0x7f662a9193fd]
deployer-xenomai(main+0x70a)[0x40f67a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f6627e5fead]
deployer-xenomai[0x40fa5d]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(warn_upon_switch+0x15)[0x7f662af09295]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7f66297eb030]
/usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7f6629c0231b]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT2os6ThreadD1Ev+0x11d)[0x7f662af0530d]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT8ActivityD2Ev+0x37)[0x7f662aebbd27]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT8ActivityD0Ev+0x9)[0x7f662aebbd79]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT11TaskContextD1Ev+0x16c)[0x7f662aebd0ac]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-ocl-deployment- xenomai.so.2.6.0(_ZN3OCL19DeploymentComponentD2Ev+0x1bf)[0x7f662a60c9af]
deployer-xenomai(main+0x3c0)[0x40f330]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f6627e5fead]
deployer-xenomai[0x40fa5d]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(warn_upon_switch+0x15)[0x7f662af09295]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7f66297eb030]
/usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7f6629c0231b]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT2os5MutexD1Ev+0x3d)[0x7f662aeb91fd]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT11TaskContextD1Ev+0xfc)[0x7f662aebd03c]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-ocl-deployment- xenomai.so.2.6.0(_ZN3OCL19DeploymentComponentD2Ev+0x1bf)[0x7f662a60c9af]
deployer-xenomai(main+0x3c0)[0x40f330]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f6627e5fead]
deployer-xenomai[0x40fa5d]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(warn_upon_switch+0x15)[0x7f662af09295]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7f66297eb030]
/usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7f6629c0231b]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT15ExecutionEngineD2Ev+0x2d2)[0x7f662aef71d2]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT15ExecutionEngineD0Ev+0x9)[0x7f662aef7319]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-ocl-deployment- xenomai.so.2.6.0(_ZN3OCL19DeploymentComponentD2Ev+0x1bf)[0x7f662a60c9af]
deployer-xenomai(main+0x3c0)[0x40f330]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f6627e5fead]
deployer-xenomai[0x40fa5d]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(warn_upon_switch+0x15)[0x7f662af09295]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7f66297eb030]
/usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7f6629c0231b]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT2os6ThreadD1Ev+0x11d)[0x7f662af0530d]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT8ActivityD2Ev+0x37)[0x7f662aebbd27]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT8ActivityD0Ev+0x9)[0x7f662aebbd79]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT8internal12GlobalEngineD1Ev+0x8a)[0x7f662af2657a]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT8internal12GlobalEngineD0Ev+0x9)[0x7f662af265f9]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT8internal12GlobalEngine7ReleaseEv+0x16)[0x7f662af267f6]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_Z9__os_exitv+0x6)[0x7f662af07976]
deployer-xenomai(main+0x49b)[0x40f40b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f6627e5fead]
deployer-xenomai[0x40fa5d]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(warn_upon_switch+0x15)[0x7f662af09295]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7f66297eb030]
/usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7f6629c0231b]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT15ExecutionEngineD2Ev+0x2d2)[0x7f662aef71d2]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT8internal12GlobalEngineD0Ev+0x9)[0x7f662af265f9]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT8internal12GlobalEngine7ReleaseEv+0x16)[0x7f662af267f6]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_Z9__os_exitv+0x6)[0x7f662af07976]
deployer-xenomai(main+0x49b)[0x40f40b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f6627e5fead]
deployer-xenomai[0x40fa5d]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(warn_upon_switch+0x15)[0x7f662af09295]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7f66297eb030]
/usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7f6629c0231b]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT6plugin12PluginLoaderD1Ev+0x72)[0x7f662af37af2]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt- xenomai.so.2.6(_ZN5boost6detail17sp_counted_impl_pIN3RTT6plugin12PluginLoaderEE7disposeEv+0x12)
[0x7f662af3eeb2]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT6plugin12PluginLoader7ReleaseEv+0x59)[0x7f662af37089]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt- xenomai.so.2.6(_ZN3RTT2os16StartStopManager6callerEN5boost8functionIFvvEEE+0x18)
[0x7f662af02858]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt- xenomai.so.2.6(_ZN5boost6detail8function22void_function_invoker1IPFvNS_8functionIFvvEEEEvS5_E6invokeERNS1_15function_bufferES5_+0x44) [0x7f662af026a4]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt- xenomai.so.2.6(_ZSt8for_eachISt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPN5boost8functionIFvvEEESt6vectorIS6_SaIS6_EEEEENS4_IFvS6_EEEET0_T_SG_SF_+0xb9) [0x7f662af02c09]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT2os16StartStopManager4stopEv+0x6a)[0x7f662af0215a]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_Z9__os_exitv+0x4f)[0x7f662af079bf]
deployer-xenomai(main+0x49b)[0x40f40b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f6627e5fead]
deployer-xenomai[0x40fa5d]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(warn_upon_switch+0x15)[0x7f662af09295]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7f66297eb030]
/usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7f6629c0231b]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT6LoggerD2Ev+0x57)[0x7f662aeb69f7]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT6Logger7ReleaseEv+0x32)[0x7f662aeb7902]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_Z9__os_exitv+0x85)[0x7f662af079f5]
deployer-xenomai(main+0x49b)[0x40f40b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f6627e5fead]
deployer-xenomai[0x40fa5d]
TLSF bytes allocated=524288 overhead=6368 max-used=6368 currently-used=6368
still-allocated=0
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(warn_upon_switch+0x15)[0x7f662af09295]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7f66297eb030]
/usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7f6629c0231b]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(_ZN3RTT5types18TypeInfoRepositoryD1Ev+0x165)[0x7f662af2d515]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt- xenomai.so.2.6(_ZN5boost6detail17sp_counted_impl_pIN3RTT5types18TypeInfoRepositoryEE7disposeEv+0x12)
[0x7f662af2e912]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt- xenomai.so.2.6(_ZN5boost10shared_ptrIN3RTT5types18TypeInfoRepositoryEED2Ev+0x29)
[0x7f662aed52c9]
/lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0xa5)[0x7f6627e78175]
/opt/orocos-toolchain-xenomai/install/lib/liborocos-rtt-
xenomai.so.2.6(+0xf83d3)[0x7f662aeb03d3]

Thanks in advance,

Leopold

Signature · 3 lines
--
Linux User 152692
Catalonia
#1 lore raw
Quoted 10 lines · Leopold Palomo-Avellaneda

Hi,

since 2.6.x the Orocos users have difficulties (or simple cannot) use Xenomai. Despite of some bug in the Orocos code, xenomai emits a warn_upon_switch that makes the user to use a console program - deployer - (basically for the orocos philosofy) to launch rt programs.

I think that this signal must be treated in some way by the Orocos code, but it's not developed yet. Since then, there's a way to silent this signal, or simple that doesn't overflow the console but thousand of messages like this:

In case it is a bug which has already been fixed, could you try xenomai 2.6 git?

Signature · 1 line
                                                                Gilles.
#2 lore raw

A Dimecres, 26 de juny de 2013, Gilles Chanteperdrix va escriure:

Quoted 5 lines · Leopold Palomo-Avellaneda
Quoted 4 lines

Hi,

since 2.6.x the Orocos users have difficulties (or simple cannot) use

Xenomai.

Quoted 1 line
Quoted 1 line

Despite of some bug in the Orocos code, xenomai emits a warn_upon_switch

that

Quoted 1 line
Quoted 1 line

makes the user to use a console program - deployer - (basically for the

orocos

Quoted 3 lines
Quoted 3 lines

philosofy) to launch rt programs.

I think that this signal must be treated in some way by the Orocos code,

but

Quoted 1 line
Quoted 1 line

it's not developed yet. Since then, there's a way to silent this signal,

or

Quoted 1 line
Quoted 1 line

simple that doesn't overflow the console but thousand of messages like

this:

Quoted 4 lines

In case it is a bug which has already been fixed, could you try xenomai 2.6 git?

I don't understand that it could be a Xenomai bug. It's a Orocos bug IMHO. In the orocos list they commented that:

Quoted 2 lines

AFAICS you've enabled the warn_upon_switch signal, AFAIK the printouts all refer to code paths that are causing mode switches.

......

Quoted 4 lines

Real-time memory: 517920 bytes free of 524288 allocated. /opt/orocos-toolchain/install/lib/liborocos-rtt- xenomai.so.2.6(warn_upon_switch+0x15)[0x7fda1b2fb295] /lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7fda19bdd030]

Quoted 10 lines

/usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7fda19ff431b] /opt/orocos-toolchain/install/lib/liborocos-rtt- xenomai.so.2.6(_ZN3RTT2os6ThreadD1Ev+0x11d)[0x7fda1b2f730d] /opt/orocos-toolchain/install/lib/liborocos-rtt- xenomai.so.2.6(_ZN3RTT8ActivityD2Ev+0x37)[0x7fda1b2add27] /opt/orocos-toolchain/install/lib/liborocos-rtt- xenomai.so.2.6(_ZN3RTT8ActivityD0Ev+0x9)[0x7fda1b2add79] /opt/orocos-toolchain/install/lib/liborocos-rtt-

xenomai.so.2.6(_ZN5boost10shared_ptrIN3RTT4base17ActivityInterfaceEEaSERKS4_+0x4e)

Quoted 4 lines

[0x7fda1b2b9cde]
/opt/orocos-toolchain/install/lib/liborocos-rtt-

xenomai.so.2.6(_ZN3RTT11TaskContext11setActivityEPNS_4base17ActivityInterfaceE+0x72)

Quoted 7 lines

[0x7fda1b2aecb2] /opt/orocos-toolchain/install/lib/liborocos-ocl-deployment- xenomai.so.2.6.0(_ZN3OCL19DeploymentComponent11setActivityERKSsdii+0x127) [0x7fda1a9f8997] /opt/orocos-toolchain/install/lib/liborocos-ocl-deployment-

xenomai.so.2.6.0(_ZNK5boost9function4IbRKSsdiiEclES2_dii+0x18)

[0x7fda1aa4dd68]

Quoted 2 lines

/opt/orocos-toolchain/install/lib/liborocos-ocl-deployment-

AAnd I don't know how to silent (or if is possible) this messages.

Regards,

Leo

Signature · 3 lines
--
Linux User 152692
Catalonia
#3 lore raw
Quoted 2 lines · Leopold Palomo-Avellaneda

AAnd I don't know how to silent (or if is possible) this messages.

Try disabling CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX if currently set in your kernel config. If that is still not enough, then you will have to switch off PTHREAD_WARNSW manually, using pthread_set_mode_np(), for each thread which triggers this signal.

Signature · 1 line
Philippe.
#4 lore raw
Quoted 10 lines · Philippe Gerum
Quoted 2 lines · Leopold Palomo-Avellaneda

AAnd I don't know how to silent (or if is possible) this messages.

Try disabling CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX if currently set in your kernel config. If that is still not enough, then you will have to switch off PTHREAD_WARNSW manually, using pthread_set_mode_np(), for each thread which triggers this signal.

Quoting Gilles:
"The point is that these messages are telling you that there is a bug, either in xenomai code (a bug was fixed since xenomai 2.6.2.1 which could explain such a behaviour), or in orocos code. When the bug is fixed the signal will disappear."

We're having one thread ( main() ) which is modeswitching all the time since it's doing user IO using the console, filesystem etc.

I didn't consider this as a bug, and we only enable PTHREAD_WARNSW for specific threads, where it does matter.

I also have the CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX option on in my test system, and I'm not seeing any of these messages (while the MSW increments).

So it beats me what is causing these messages in his setup.

Leo, which version (git hash tag) are you using ?

Peter

#5 lore raw
Quoted 18 lines · Peter Soetens
Quoted 10 lines · Philippe Gerum
Quoted 2 lines · Leopold Palomo-Avellaneda

AAnd I don't know how to silent (or if is possible) this messages.

Try disabling CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX if currently set in your kernel config. If that is still not enough, then you will have to switch off PTHREAD_WARNSW manually, using pthread_set_mode_np(), for each thread which triggers this signal.

Quoting Gilles:
"The point is that these messages are telling you that there is a bug, either in xenomai code (a bug was fixed since xenomai 2.6.2.1 which could explain such a behaviour), or in orocos code. When the bug is fixed the signal will disappear."

Quoted 5 lines

We're having one thread ( main() ) which is modeswitching all the time since it's doing user IO using the console, filesystem etc.

I didn't consider this as a bug, and we only enable PTHREAD_WARNSW for specific threads, where it does matter.

What would be a problem would be to change scheduling policy from SCHED_FIFO to SCHED_OTHER in a section protected by a mutex, you would then get the signal when releasing the mutex. In this case, when using xenomai 2.6.2.1, you would get a SIGDEBUG with reason SIGDEBUG_MIGRATE_PRIOINV reason, after 2.6.2.1 you would get a SIGDEBUG with reason SIGDEBUG_RESCNT_IMBALANCE.

This is considered as a bug, because if the mutex is shared with other threads using SCHED_FIFO policy, switching from SCHED_FIFO to SCHED_OTHER would cause the thread holding the mutex to switch to secondary mode, and so potentially cause a priority inversion.

But I think we already discussed this a long time ago on this list.

Anyway, a way to know what happens is to print the reason in the signal handler.

Signature · 1 line
                                                                Gilles.
#6 lore raw
In reply to Peter Soetens
Quoted 12 lines · Peter Soetens
Quoted 10 lines · Philippe Gerum
Quoted 2 lines · Leopold Palomo-Avellaneda

AAnd I don't know how to silent (or if is possible) this messages.

Try disabling CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX if currently set in your kernel config. If that is still not enough, then you will have to switch off PTHREAD_WARNSW manually, using pthread_set_mode_np(), for each thread which triggers this signal.

Quoted 5 lines

Quoting Gilles:
"The point is that these messages are telling you that there is a bug, either in xenomai code (a bug was fixed since xenomai 2.6.2.1 which could explain such a behaviour), or in orocos code. When the bug is fixed the signal will disappear."

And in fact, the bug might as well be in the application code...

Signature · 1 line
                                                                Gilles.
#7 lore raw
In reply to Peter Soetens

A Divendres, 28 de juny de 2013, Peter Soetens va escriure:

Quoted 18 lines · Philippe Gerum
Quoted 7 lines · Leopold Palomo-Avellaneda
Quoted 1 line

AAnd I don't know how to silent (or if is possible) this messages.

Try disabling CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX if currently set in your kernel config. If that is still not enough, then you will have to switch off PTHREAD_WARNSW manually, using pthread_set_mode_np(), for each thread which triggers this signal.

Quoting Gilles:
"The point is that these messages are telling you that there is a bug, either in xenomai code (a bug was fixed since xenomai 2.6.2.1 which could explain such a behaviour), or in orocos code. When the bug is fixed the signal will disappear."

We're having one thread ( main() ) which is modeswitching all the time since it's doing user IO using the console, filesystem etc.

Quoted 8 lines

I didn't consider this as a bug, and we only enable PTHREAD_WARNSW for specific threads, where it does matter.

I also have the CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX option on in my test system, and I'm not seeing any of these messages (while the MSW increments).

So it beats me what is causing these messages in his setup.

:-(

some other people in the orocos list has mention it [1] but I would prefer to have a wrong setup than a orocos bug.

Quoted 1 line

Leo, which version (git hash tag) are you using ?

- Debian Wheezy,
- kernel 3.5.7, corresponding to the adeos patch provided in that version.
- xenomai 2.6.2? (downloaded, not git)

Now someone would like to kill me. I don't know if is 2.6.2.1 or 2.6.2. I thought that it was 2.6.2.1, but I built the packages some time ago and they have been my base, but looking on the dates maybe I'm wrong :-(

How can I know the version of a tree of files of xenomai?

I have not be able to found any changelog in the tar.bz2. ... On monday I would repeat all my tests ....

If you want to test it add in you sources list:

---------------------------
# Debian-robotics
deb http://sir.upc.edu/debian-robotics wheezy-robotics main deb-src http://sir.upc.edu/debian-robotics wheezy-robotics main
---------------------------
apt-key adv --keyserver pgp.mit.edu --recv-keys 682EC09CF944807E apt-get update
apt-get install linux-image-3.5.7-xenomai-2.6.2.1 libxenomai-dev

about the xenomai package don't trust in the version numbers, because I think that,as it was for my personal use, I didn't put 4 numbers. But, I remember that 2.6.2 cannot build the debian package and 2.6.2.1 yes.

I have always work with debian packages.

It's too late now but f I did a mistake with the version number I'm really embarrassed.

On Monday I will test it all again.

Leo

[1] http://www.orocos.org/forum/orocos/orocos-users/warnuponswitch-leaving-
deployer-xenomai

Signature · 8 lines
--
Linux User 152692     PGP: 0xF944807E
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?
#8 lore raw
Quoted 63 lines · Leopold Palomo Avellaneda

A Divendres, 28 de juny de 2013, Peter Soetens va escriure:

Quoted 18 lines · Philippe Gerum
Quoted 7 lines · Leopold Palomo-Avellaneda
Quoted 1 line

AAnd I don't know how to silent (or if is possible) this messages.

Try disabling CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX if currently set in your kernel config. If that is still not enough, then you will have to switch off PTHREAD_WARNSW manually, using pthread_set_mode_np(), for each thread which triggers this signal.

Quoting Gilles:
"The point is that these messages are telling you that there is a bug, either in xenomai code (a bug was fixed since xenomai 2.6.2.1 which could explain such a behaviour), or in orocos code. When the bug is fixed the signal will disappear."

We're having one thread ( main() ) which is modeswitching all the time since it's doing user IO using the console, filesystem etc.

Quoted 8 lines

I didn't consider this as a bug, and we only enable PTHREAD_WARNSW for specific threads, where it does matter.

I also have the CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX option on in my test system, and I'm not seeing any of these messages (while the MSW increments).

So it beats me what is causing these messages in his setup.

:-(

some other people in the orocos list has mention it [1] but I would prefer to have a wrong setup than a orocos bug.

Quoted 1 line

Leo, which version (git hash tag) are you using ?

- Debian Wheezy,
- kernel 3.5.7, corresponding to the adeos patch provided in that version.
- xenomai 2.6.2? (downloaded, not git)

Now someone would like to kill me. I don't know if is 2.6.2.1 or 2.6.2. I thought that it was 2.6.2.1, but I built the packages some time ago and they have been my base, but looking on the dates maybe I'm wrong :-(

How can I know the version of a tree of files of xenomai?

I have not be able to found any changelog in the tar.bz2. ... On monday I would repeat all my tests ....

If you want to test it add in you sources list:

---------------------------
# Debian-robotics
deb http://sir.upc.edu/debian-robotics wheezy-robotics main deb-src http://sir.upc.edu/debian-robotics wheezy-robotics main
---------------------------
apt-key adv --keyserver pgp.mit.edu --recv-keys 682EC09CF944807E apt-get update
apt-get install linux-image-3.5.7-xenomai-2.6.2.1 libxenomai-dev

about the xenomai package don't trust in the version numbers, because I think that,as it was for my personal use, I didn't put 4 numbers. But, I remember that 2.6.2 cannot build the debian package and 2.6.2.1 yes.

Quoted 6 lines

I have always work with debian packages.

It's too late now but f I did a mistake with the version number I'm really embarrassed.

On Monday I will test it all again.

Again, a Gilles mentioned several times already, a sane way to debug this issue is to hook the SIGDEBUG signal Xenomai sends your process, displaying the reason why it does it, in the signal handler.

Please have a careful look at src/testsuite/latency/latency.c:491, function sigdebug(). Add a similar code to your main process, you will get the information. From that point, debugging should be straightforward. Until then, your might be searching a needle in a haystack.

Signature · 1 line
Philippe.
#9 lore raw
In reply to Leopold Palomo Avellaneda
Quoted 1 line · Leopold Palomo Avellaneda

How can I know the version of a tree of files of xenomai?

For the kernel-space part, the version appears in the boot messages (dmesg).
For the user-space part, you can not see the version at run-time, the version is in the config/version file in xenomai sources.

For the problem you have, you only need kernel-space from 2.6.2.1. User-space does not matter. You can also check in the sources if you have the following patch applied:

http://git.xenomai.org/?p=xenomai-2.6.git;a=commitdiff;h=6641c821c015d9fece07b8ac60c210cb9b0307a4;hp=943b5b3297ed996794a7fabf37bd57329b77293f

Signature · 1 line
                                                                Gilles.
#10 lore raw
Quoted 7 lines · Gilles Chanteperdrix
Quoted 1 line · Leopold Palomo Avellaneda

How can I know the version of a tree of files of xenomai?

For the kernel-space part, the version appears in the boot messages (dmesg).

/proc/xenomai/version as well.

Quoted 2 lines

For the user-space part, you can not see the version at run-time, the version is in the config/version file in xenomai sources.

xeno-config --version would do.

Quoted 8 lines

For the problem you have, you only need kernel-space from 2.6.2.1. User-space does not matter. You can also check in the sources if you have the following patch applied:

http://git.xenomai.org/?p=xenomai-2.6.git;a=commitdiff;h=6641c821c015d9fece07b8ac60c210cb9b0307a4;hp=943b5b3297ed996794a7fabf37bd57329b77293f

Signature · 1 line
Philippe.
#11 lore raw

Re: [Xenomai] Xenomai warn_upon_switch .. kill the user

In reply to Peter Soetens

A Divendres, 28 de juny de 2013, Peter Soetens va escriure:

Quoted 9 lines · Philippe Gerum
Quoted 8 lines · Leopold Palomo-Avellaneda
Quoted 3 lines

AAnd I don't know how to silent (or if is possible) this messages.

Try disabling CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX if currently set in your kernel config. If that is still not enough, then you will have to switch

off

Quoted 1 line
Quoted 1 line

PTHREAD_WARNSW manually, using pthread_set_mode_np(), for each thread

which

Quoted 14 lines
Quoted 1 line

triggers this signal.

Quoting Gilles:
"The point is that these messages are telling you that there is a bug, either in xenomai code (a bug was fixed since xenomai 2.6.2.1 which could explain such a behaviour), or in orocos code. When the bug is fixed the signal will disappear."

We're having one thread ( main() ) which is modeswitching all the time since it's doing user IO using the console, filesystem etc.

I didn't consider this as a bug, and we only enable PTHREAD_WARNSW for specific threads, where it does matter.

Quoted 7 lines

I also have the CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX option on in my test system, and I'm not seeing any of these messages (while the MSW increments).

So it beats me what is causing these messages in his setup.

Leo, which version (git hash tag) are you using ?

Hi,

my worst thoughts have been confirmed this morning. I did a mistake and I have lost your time during these days. I was using 2.6.2 instead of 2.6.2.1. I'm so sorry. I don't know what to say...

I'm extremely busy this week because a presentation but next week I will review all of this. With:

-Debian Wheezy
- Xenomai 2.6.2.1
- Kernel 3.5.7
Orocos 2.6 works and no warning messages are showed.... I have to test the ethercat config.

I'm so sorry ....

Leo

Signature · 3 lines
--
Linux User 152692
Catalonia
#12 lore raw
In reply to Leopold Palomo-Avellaneda
Quoted 58 lines · Leopold Palomo-Avellaneda

A Dimecres, 26 de juny de 2013, Gilles Chanteperdrix va escriure:

Quoted 5 lines · Leopold Palomo-Avellaneda
Quoted 4 lines

Hi,

since 2.6.x the Orocos users have difficulties (or simple cannot) use

Xenomai.

Quoted 1 line
Quoted 1 line

Despite of some bug in the Orocos code, xenomai emits a warn_upon_switch

that

Quoted 1 line
Quoted 1 line

makes the user to use a console program - deployer - (basically for the

orocos

Quoted 3 lines
Quoted 3 lines

philosofy) to launch rt programs.

I think that this signal must be treated in some way by the Orocos code,

but

Quoted 1 line
Quoted 1 line

it's not developed yet. Since then, there's a way to silent this signal,

or

Quoted 1 line
Quoted 1 line

simple that doesn't overflow the console but thousand of messages like

this:

Quoted 4 lines

In case it is a bug which has already been fixed, could you try xenomai 2.6 git?

I don't understand that it could be a Xenomai bug. It's a Orocos bug IMHO. In the orocos list they commented that:

Quoted 2 lines

AFAICS you've enabled the warn_upon_switch signal, AFAIK the printouts all refer to code paths that are causing mode switches.

......

Quoted 4 lines

Real-time memory: 517920 bytes free of 524288 allocated. /opt/orocos-toolchain/install/lib/liborocos-rtt- xenomai.so.2.6(warn_upon_switch+0x15)[0x7fda1b2fb295] /lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7fda19bdd030]

Quoted 10 lines

/usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7fda19ff431b] /opt/orocos-toolchain/install/lib/liborocos-rtt- xenomai.so.2.6(_ZN3RTT2os6ThreadD1Ev+0x11d)[0x7fda1b2f730d] /opt/orocos-toolchain/install/lib/liborocos-rtt- xenomai.so.2.6(_ZN3RTT8ActivityD2Ev+0x37)[0x7fda1b2add27] /opt/orocos-toolchain/install/lib/liborocos-rtt- xenomai.so.2.6(_ZN3RTT8ActivityD0Ev+0x9)[0x7fda1b2add79] /opt/orocos-toolchain/install/lib/liborocos-rtt-

xenomai.so.2.6(_ZN5boost10shared_ptrIN3RTT4base17ActivityInterfaceEEaSERKS4_+0x4e)

Quoted 4 lines

[0x7fda1b2b9cde]
/opt/orocos-toolchain/install/lib/liborocos-rtt-

xenomai.so.2.6(_ZN3RTT11TaskContext11setActivityEPNS_4base17ActivityInterfaceE+0x72)

Quoted 6 lines

[0x7fda1b2aecb2] /opt/orocos-toolchain/install/lib/liborocos-ocl-deployment- xenomai.so.2.6.0(_ZN3OCL19DeploymentComponent11setActivityERKSsdii+0x127) [0x7fda1a9f8997] /opt/orocos-toolchain/install/lib/liborocos-ocl-deployment-

Quoted 6 lines
Quoted 1 line

xenomai.so.2.6.0(_ZNK5boost9function4IbRKSsdiiEclES2_dii+0x18)

[0x7fda1aa4dd68]

Quoted 2 lines

/opt/orocos-toolchain/install/lib/liborocos-ocl-deployment-

AAnd I don't know how to silent (or if is possible) this messages.

The point is that these messages are telling you that there is a bug, either in xenomai code (a bug was fixed since xenomai 2.6.2.1 which could explain such a behaviour), or in orocos code. When the bug is fixed the signal will disappear.

Signature · 1 line
                                                                Gilles.
#13 lore raw
Quoted 8 lines · Gilles Chanteperdrix
Quoted 1 line

AAnd I don't know how to silent (or if is possible) this messages.

The point is that these messages are telling you that there is a bug, either in xenomai code (a bug was fixed since xenomai 2.6.2.1 which could explain such a behaviour), or in orocos code. When the bug is fixed the signal will disappear.

Sorry, the bug I was referring was fixed between xenomai 2.6.2 and xenomai 2.6.2.1, anyway, if you use xenomai 2.6 current git, and install a handler for SIGDEBUG as done in examples/native/sigdebug.c, you should be able to know the reason for receiving the signal you get, and help us help you from there.

Signature · 1 line
                                                                Gilles.
#14 lore raw
In reply to Gilles Chanteperdrix

A Dijous, 27 de juny de 2013, Gilles Chanteperdrix va escriure:

Quoted 19 lines · Leopold Palomo-Avellaneda
Quoted 18 lines

A Dimecres, 26 de juny de 2013, Gilles Chanteperdrix va escriure:

Quoted 5 lines · Leopold Palomo-Avellaneda
Quoted 4 lines

Hi,

since 2.6.x the Orocos users have difficulties (or simple cannot) use

Xenomai.

Quoted 1 line
Quoted 1 line

Despite of some bug in the Orocos code, xenomai emits a warn_upon_switch

that

Quoted 1 line
Quoted 1 line

makes the user to use a console program - deployer - (basically for the

orocos

Quoted 3 lines
Quoted 3 lines

philosofy) to launch rt programs.

I think that this signal must be treated in some way by the Orocos code,

but

Quoted 1 line
Quoted 1 line

it's not developed yet. Since then, there's a way to silent this signal,

or

Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line

simple that doesn't overflow the console but thousand of messages like

this:

Quoted 4 lines

In case it is a bug which has already been fixed, could you try xenomai 2.6 git?

I don't understand that it could be a Xenomai bug. It's a Orocos bug IMHO.

In

Quoted 3 lines
Quoted 3 lines

the orocos list they commented that:

Quoted 1 line

AFAICS you've enabled the warn_upon_switch signal, AFAIK the printouts

all

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

refer to code paths that are causing mode switches.

......

Quoted 15 lines
Quoted 6 lines
Quoted 6 lines

Real-time memory: 517920 bytes free of 524288 allocated. /opt/orocos-toolchain/install/lib/liborocos-rtt- xenomai.so.2.6(warn_upon_switch+0x15)[0x7fda1b2fb295] /lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7fda19bdd030] /usr/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7fda19ff431b] /opt/orocos-toolchain/install/lib/liborocos-rtt-

Quoted 9 lines
Quoted 8 lines

xenomai.so.2.6(_ZN3RTT2os6ThreadD1Ev+0x11d)[0x7fda1b2f730d] /opt/orocos-toolchain/install/lib/liborocos-rtt- xenomai.so.2.6(_ZN3RTT8ActivityD2Ev+0x37)[0x7fda1b2add27] /opt/orocos-toolchain/install/lib/liborocos-rtt- xenomai.so.2.6(_ZN3RTT8ActivityD0Ev+0x9)[0x7fda1b2add79] /opt/orocos-toolchain/install/lib/liborocos-rtt-

xenomai.so.2.6(_ZN5boost10shared_ptrIN3RTT4base17ActivityInterfaceEEaSERKS4_+0x4e)

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

[0x7fda1b2b9cde]
/opt/orocos-toolchain/install/lib/liborocos-rtt-

xenomai.so.2.6(_ZN3RTT11TaskContext11setActivityEPNS_4base17ActivityInterfaceE+0x72)

Quoted 11 lines
Quoted 11 lines
Quoted 7 lines

[0x7fda1b2aecb2] /opt/orocos-toolchain/install/lib/liborocos-ocl-deployment- xenomai.so.2.6.0(_ZN3OCL19DeploymentComponent11setActivityERKSsdii+0x127) [0x7fda1a9f8997] /opt/orocos-toolchain/install/lib/liborocos-ocl-deployment-

xenomai.so.2.6.0(_ZNK5boost9function4IbRKSsdiiEclES2_dii+0x18)

[0x7fda1aa4dd68]

Quoted 2 lines

/opt/orocos-toolchain/install/lib/liborocos-ocl-deployment-

Quoted 7 lines
Quoted 1 line

AAnd I don't know how to silent (or if is possible) this messages.

The point is that these messages are telling you that there is a bug, either in xenomai code (a bug was fixed since xenomai 2.6.2.1 which could explain such a behaviour), or in orocos code. When the bug is fixed the signal will disappear.

I have compiled a new kernel and the messages are still. I'm using 2.6.2.1. I agree that there's a bug but in orocos. I understand that Xenomai emits a signal warning about context switch and orocos (or whatever application that uses Xenomai) must treat with it. This behavior was changed in 2.6.x.

Please could you confirm if is this the problem?

Regards,

Leo

Signature · 3 lines
--
Linux User 152692
Catalonia
#15 lore raw
Quoted 13 lines · Leopold Palomo-Avellaneda

A Dijous, 27 de juny de 2013, Gilles Chanteperdrix va escriure:

Quoted 11 lines · Leopold Palomo-Avellaneda
Quoted 4 lines

A Dimecres, 26 de juny de 2013, Gilles Chanteperdrix va escriure:

Quoted 1 line · Leopold Palomo-Avellaneda

AAnd I don't know how to silent (or if is possible) this messages.

The point is that these messages are telling you that there is a bug, either in xenomai code (a bug was fixed since xenomai 2.6.2.1 which could explain such a behaviour), or in orocos code. When the bug is fixed the signal will disappear.

Quoted 6 lines

I have compiled a new kernel and the messages are still. I'm using 2.6.2.1. I agree that there's a bug but in orocos. I understand that Xenomai emits a signal warning about context switch and orocos (or whatever application that uses Xenomai) must treat with it. This behavior was changed in 2.6.x.

Please could you confirm if is this the problem?

As I said, to answer this question, you should change the SIGDEBUG signal handler as is done in examples/native/sigdebug.c to know the signal reason.

Signature · 1 line
                                                                Gilles.
#16 lore raw

A Dijous, 27 de juny de 2013, Gilles Chanteperdrix va escriure:

Quoted 10 lines · Leopold Palomo-Avellaneda
Quoted 9 lines

A Dijous, 27 de juny de 2013, Gilles Chanteperdrix va escriure:

Quoted 7 lines · Leopold Palomo-Avellaneda
Quoted 4 lines

A Dimecres, 26 de juny de 2013, Gilles Chanteperdrix va escriure:

Quoted 1 line · Leopold Palomo-Avellaneda

AAnd I don't know how to silent (or if is possible) this messages.

Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

The point is that these messages are telling you that there is a bug, either in xenomai code (a bug was fixed since xenomai 2.6.2.1 which could explain such a behaviour), or in orocos code. When the bug is fixed the signal will disappear.

I have compiled a new kernel and the messages are still. I'm using

2.6.2.1. I

Quoted 2 lines
Quoted 2 lines

agree that there's a bug but in orocos. I understand that Xenomai emits a signal warning about context switch and orocos (or whatever application

that

Quoted 9 lines
Quoted 3 lines

uses Xenomai) must treat with it. This behavior was changed in 2.6.x.

Please could you confirm if is this the problem?

As I said, to answer this question, you should change the SIGDEBUG signal handler as is done in examples/native/sigdebug.c to know the signal reason.

Ok,

I see. I don't know how is the Orocos code, but I will try to look on it. The example you have post seems clear.

Thanks for all,

I will inform,

Best regards,

Leo

Signature · 3 lines
--
Linux User 152692
Catalonia