<html><head><meta http-equiv=Content-Type content="text/html; charset=UTF-8"><META name="Author" content="GroupWise WebAccess"><style type="text/css">
body p
{
margin: 0px;
}
</style></head><body style='font-family: Helvetica, Arial, sans-serif; font-size: 13px; '>Hi, my name is Andres and the purpose of this mail is to ask about a situation we're dealing with and a possible solution.<br>We are using rtems 4.10.2 in leon3 (gr712) AMP configuration with a shared memory space of 0x1000 bytes.<br>Our system consists of two applications. One of them is the owner of a global queue and the other is the consumer with a timeout.<br>The app running on core 0 sends a message every five seconds and the app running on core 1 receives them with a timeout of one second.<br>After eigth timeouts, the application running in core 1 stops due an internal error.<br><br>Analysing the operations of the OS, we've seen that the internal error is generated by the lack of free shared memory, and it happens inside the function _MPCI_Get_packet().<br>And we believe that the lack of free memory is because previously timed-out mpci packets are not returned.<br>The same seems to happen with the proxys allocated in case of time out, their are allocated using _Thread_MP_Allocate_proxy() and are not returned.<br><br>If we perform the changes below, the test app runs indefinitely without any error.<br>Whats your opinion about this?<br><br><br>diff -r basicsw_el1618_rtems_4.10/rtems_4.10/cpukit/rtems/src/msgmp.c original/basicsw_el1618_rtems_4.10/rtems_4.10/cpukit/rtems/src/msgmp.c<br>174c174<br>< rtems_status_code result = (rtems_status_code) _MPCI_Send_request_packet(<br>---<br>> return (rtems_status_code) _MPCI_Send_request_packet(<br>179,184c179<br>< <br>< _MPCI_Return_packet(&the_packet->Prefix);<br>< <br>< return result;<br>< <br>< break;<br>---<br>> break;<br>diff -r basicsw_el1618_rtems_4.10/rtems_4.10/cpukit/score/src/threadqtimeout.c original/basicsw_el1618_rtems_4.10/rtems_4.10/cpukit/score/src/threadqtimeout.c<br>51d50<br>< break;<br>55c54<br>< break;<br>---<br>> break;<br>57,61c56,58<br>< //todo check for critical section<br>< the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;<br>< _Thread_queue_Extract_with_proxy(the_thread);<br>< _Thread_Unnest_dispatch();<br>< break;<br>---<br>> _Thread_queue_Process_timeout( the_thread );<br>> _Thread_Unnest_dispatch();<br>> break;<br><br>Best Regards<br>Andres<br><br></body></html>