Message-ID: <5326AE7E.3050201@xenomai.org> Date: Mon, 17 Mar 2014 09:12:46 +0100 From: Philippe Gerum MIME-Version: 1.0 References: <1394996997.10478.YahooMailNeo@web171605.mail.ir2.yahoo.com> In-Reply-To: <1394996997.10478.YahooMailNeo@web171605.mail.ir2.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] Issue suspending threads on mercury List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Matthias Schneider , "xenomai@xenomai.org" On 03/16/2014 08:09 PM, Matthias Schneider wrote: > Hi all, > > I am experiencing a problem with xenomai-forge (recent "next" checkout) on > Mercury (on top of a 3.12.9+CONFIG_PREEMPT_RT on x86) when suspending > tasks/threads. > > As far as I understand, the mercury implementation sends a signal to the thread > to be suspended, with that threads signal handler setting the suspended state, > i.e. the setting of __THREAD_S_SUSPENDED happens in notifier_callback, which > seems to be different from the cobalt implementation. > > The problem I am experiencing is that sometimes the signal handler never seems > to get called in a thread that should be suspended, i.e. that thread suspension > sometimes simply does not work. > The following example code (for the vxworks skin) reproduces the issue (it gets > stuck in the loop waiting for the WIND_SUSPEND flag): > > http://www.pastebin.ca/2667435 Could you check this URL? I can't seem to find anything pasted there. > > Any hints on how I can continue investigating this issue? > Running the test suite in lib/vxworks/testsuite may give us more information. sem-1, sem-2, task-2 and wd-1 are all using the suspend/resume mechanism. -- Philippe.