Skip to contentSkip to conversation

SIGXCPU with rt_mutex_release

Xenomai Mariusz Janiak 3 participants 4 messages Dec 31, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

I have met problem when I run OROCOS helloWord example. Xenomai generate SIGXCPU signal when rt_mutex_release(...) is called. I have installed signal handler for each realtime thread created by OROCOS and I get following result

SIGDEBUG received, reason 4: affected by priority inversion /worek/install/orocos-toolchain-xeno/install/lib/liborocos-rtt-xenomai.so.2.6(my_warn_upon_switch+0x44)[0x7f687ad75024] /lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7f687a5dbcb0]
/usr/xenomai/lib/libnative.so.3(rt_mutex_release+0xbb)[0x7f687a7ecf5b] /worek/install/orocos-toolchain-xeno/install/lib/liborocos-rtt-xenomai.so.2.6(_ZN3RTT2os6ThreadD1Ev+0x129)[0x7f687ad73d89] /worek/install/orocos-toolchain-xeno/install/lib/liborocos-rtt-xenomai.so.2.6(_ZN3RTT8ActivityD2Ev+0x37)[0x7f687ad272e7] /worek/install/orocos-toolchain-xeno/install/lib/liborocos-rtt-xenomai.so.2.6(_ZN3RTT8ActivityD0Ev+0x9)[0x7f687ad27339] /worek/install/orocos-toolchain-xeno/install/lib/liborocos-rtt-xenomai.so.2.6(_ZN5boost10shared_ptrIN3RTT4base17ActivityInterfaceEEaSERKS4_+0x4e)[0x7f687ad3fb6e] /worek/install/orocos-toolchain-xeno/install/lib/liborocos-rtt-xenomai.so.2.6(_ZN3RTT11TaskContext11setActivityEPNS_4base17ActivityInterfaceE+0x72)[0x7f687ad34d32] ./helloworld(_ZN3OCL10HelloWorldC2ESs+0x19f)[0x4505ff]
./helloworld(_Z13ORO_main_impliPPc+0xe3)[0x445393]
./helloworld(main+0x83)[0x444d63]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f6879a1976d]
./helloworld[0x444f01]

There is much bigger mess during exiting from application. I am not pretty sure this is a Xenomai problem, if not sorry for bothering. I haven check it with previous Xenomai release yet.

Best regards and happy new year,
Mariusz

#1 lore raw
Quoted 8 lines · Mariusz Janiak

Hi,

I have met problem when I run OROCOS helloWord example. Xenomai generate SIGXCPU signal when rt_mutex_release(...) is called. I have installed signal handler for each realtime thread created by OROCOS and I get following result

SIGDEBUG received, reason 4: affected by priority inversion

There is a problem in your application, namely a mutex owned by a thread running with the SCHED_OTHER scheduling policy, released while Xenomai did not notice that the same thread had taken the mutex. This could happen if for instance you change the scheduling policy while holding a mutex.

Please try reducing the error to a simple testcase which will allow us to investigate this issue.

Quoted 3 lines

There is much bigger mess during exiting from application. I am not pretty sure this is a Xenomai problem, if not sorry for bothering. I haven check it with previous Xenomai release yet.

We need facts to start working, again, please write a simple test case to help investigating the issue.

Signature · 1 line
                                                                Gilles.
#2 lore raw

Hi all,

Thanks for the analysis. I'd propose to move this to bugs.orocos.org where we can try to reproduce and track this bug in orocos.

We've been testing in our buildfarm against xenomai 2.5, so this might be something we did not notice until now...

Peter

Op maandag 31 december 2012 schreef Gilles Chanteperdrix ( [email protected]) het volgende:

Quoted 37 lines · Mariusz Janiak
Quoted 9 lines

Hi,

I have met problem when I run OROCOS helloWord example. Xenomai generate SIGXCPU signal when rt_mutex_release(...) is called. I have installed signal handler for each realtime thread created by OROCOS and I get following result

SIGDEBUG received, reason 4: affected by priority inversion

There is a problem in your application, namely a mutex owned by a thread running with the SCHED_OTHER scheduling policy, released while Xenomai did not notice that the same thread had taken the mutex. This could happen if for instance you change the scheduling policy while holding a mutex.

Please try reducing the error to a simple testcase which will allow us to investigate this issue.

Quoted 3 lines

There is much bigger mess during exiting from application. I am not pretty sure this is a Xenomai problem, if not sorry for bothering. I haven check it with previous Xenomai release yet.

We need facts to start working, again, please write a simple test case to help investigating the issue.

--
Gilles.

_______________________________________________
Xenomai mailing list
[email protected] <javascript:;>
http://www.xenomai.org/mailman/listinfo/xenomai

#3 lore raw
Quoted 8 lines · Peter Soetens

Hi all,

Thanks for the analysis. I'd propose to move this to bugs.orocos.org
<http://bugs.orocos.org> where we can try to reproduce and track this bug in orocos.

We've been testing in our buildfarm against xenomai 2.5, so this might be something we did not notice until now...

It is related to the automatic migration of threads running with SCHED_OTHER policy introduced in Xenomai 2.6.

Signature · 1 line
                                                                Gilles.