From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5137659F.6060205@xenomai.org> Date: Wed, 06 Mar 2013 16:49:51 +0100 From: Philippe Gerum MIME-Version: 1.0 References: <512FB9B5.9040709@xenomai.org> <51306545.1010200@xenomai.org> <5130663F.7070209@xenomai.org> <51306710.5030201@xenomai.org> <5130673D.2090700@xenomai.org> <513069D5.1090508@xenomai.org> <5137496C.4090908@xenomai.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] Xenomai-forge: thread using 100% cpu load List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ronny Meeus Cc: xenomai@xenomai.org On 03/06/2013 03:32 PM, Ronny Meeus wrote: > si_code=SI_TIMER, si_pid=51, si_uid=0, si_value={int=273724880, > ptr=0x1050b5d0}}, NULL, 16) = 32 > 11309 15.442127 +++ killed by SIGKILL +++ > > I'm not an expert in this, but to me it looks like the create_timer > call, executed in the context of the 11308 thread, gets interrupted > because a signal is received by thread 11309. This signal is generated > because of a timer expiry which creates a new thread and processes the > callback function. > > Is it not possible to disable all signals of the process during the > creation of the timer in xenomai. In this way we can avoid the race > condition in the library. This might be not a clean solution but would > it work as a temporary one until you finish the timer handling you > talk about in one of your earlier mails. Fiddling with signal masks to work around an underlying bug would be asking for more trouble. Time is a scarce enough resource. BTW can I have some > information about what you are planning to change? > This one: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=cf30fb5e22a1a3d66412f1024be1ba86260904cc This implementation passes the psos testsuite in -forge, and runs your testcase fine. Please pull this change and let me know if the situation improves. -- Philippe.