From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <51372B12.2030400@mitrol.it> Date: Wed, 06 Mar 2013 12:40:02 +0100 From: Paolo Minazzi MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: [Xenomai] Sporadic problem : rt_task_sleep locked after debugging List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org Hi to all. I'm Paolo Minazzi and we use a port of xenomai on our arm Marvel mv78100 board. We use kernel 2.6.31.8 and xenomai 2.5.6. All works well. We have developed an application that use the xenomai features. We can debug it with gdb, native or gdb client/server ver 6.8a. I have tried also other gdb version, also the new 7.5.1. Sometimes *** during debugging *** we can generate a very strange problem. When the realtime tasks execute the rt_task_sleep(), the rt_task_sleep() does not return anymore ! When we enter in this strange condition, the system is usable, linux works normally, but the realtime features do not works. The problem is not easily reproducible. I have tried in a lot of way to write a simple program for generating the problem, but I am not able to do it. When I can reach the bug conditionm, If I run a simple xenomai test program with - 20 realtime tasks - 1 irq external line (generated every 2ms from a Fujitsu microcontroller) #include <...> #define N 20 void tsk(void *arg) { struct data_task_struct *p = arg; while (1) { rt_task_sleep(p->delay); cnt++; } } int main(int argc, char* argv[]) { mlockall(MCL_CURRENT|MCL_FUTURE); rt_timer_set_mode ( 0 ); rt_task_set_mode(0, 0, NULL); MapRegistersARM(); InitIrq(); enable_irq_fujitsu(); for (i=0; i