<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Verdana">I have managed to get to the root of the
matter... <br>
<br>
The thing is, as you may expect... silly. :S<br>
<br>
TASK A: Task waiting at the queue. Priority: X<br>
TASK B: Task deleting the queue. Priority: X + 1<br>
<br>
Task A has a infinite loop, sort of:<br>
<font face="Courier New">while (TRUE)<br>
{<br>
if (rtems_message_queue_receive(...) == RTEMS_SUCCESSFUL)<br>
{<br>
// Stuff<br>
} <br>
}</font><br>
<br>
So, when TASK B deletes the queue, there is context switch and the
CPU is taken over by TASK A which will not yield the processor
since the call to </font><font face="Verdana"><font face="Courier
New">rtems_message_queue_receive </font></font><font
face="Verdana">is no longer blocking. <br>
<br>
End of the issue. =)<br>
<br>
Thanks a lot!<br>
<br>
Cheers,<br>
Gabriel<br>
</font><br>
On 11-Nov-11 8:47 AM, Gabriel Raineri wrote:
<blockquote cite="mid:4EBD0B53.3000103@invap.com.ar" type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<font face="Verdana">Well, I wasn't able to figure out why the
task hangs when its priority is lower than the one waiting at
the queue.<br>
<br>
Providing you with a Test Case may take some time. So, I will
try some other ideas in mind and if that doesn't solve the
problem, I guess I will leave it for later.<br>
<br>
Thanks!<br>
<br>
</font><br>
On 10-Nov-11 11:32 AM, Gabriel Raineri wrote:
<blockquote cite="mid:4EBBE07E.5080107@invap.com.ar" type="cite">
<meta content="text/html; charset=UTF-8"
http-equiv="Content-Type">
<font face="Verdana">Quick update!<br>
<br>
If I raise the priority of the task deleting the queue to be
higher than the one waiting, it works correctly.<br>
<br>
I'll keep you posted.<br>
<br>
Thanks!<br>
</font><br>
On 10-Nov-11 10:33 AM, Gabriel Raineri wrote:
<blockquote cite="mid:4EBBD2B1.9000701@invap.com.ar" type="cite">
<meta content="text/html; charset=UTF-8"
http-equiv="Content-Type">
<font face="Verdana">Actually, I don't have a test case.
However, I will try to write one to see if I can repeat the
issue.<br>
<br>
Sorry, the RTEMS version is: 4.9.99.0<br>
<br>
Thanks again!<br>
</font><br>
On 10-Nov-11 10:25 AM, Joel Sherrill wrote:
<blockquote cite="mid:4EBBD0B8.7000901@oarcorp.com"
type="cite">On 11/10/2011 07:11 AM, Gabriel Raineri wrote: <br>
<blockquote type="cite">Hi everybody! <br>
<br>
I'm having an issue while deleting a queue: the call to
rtems_message_queue_delete hangs. <br>
I have been debugging RTEMS code and I found that it gets
stuck at _Thread_Enable_dispatch() in msgqdelete.c <br>
<br>
</blockquote>
Do you have a test case? This case is covered in the test
suite <br>
so there must be something different about your case. <br>
<blockquote type="cite">More details: <br>
- RTEMS Version: 4.99 <br>
</blockquote>
That's not an RTEMS version number. What version are you
using? <br>
How did you get it? <br>
<blockquote type="cite">- The task that deletes the queue is
not the one that created it. <br>
- There is a task blocked waiting for the queue which has
a higher priority than the task deleting the queue. <br>
- I have also tried disabling interrupts before the
deletion in order to avoid context switching with no luck
(still hangs). <br>
- There are no pending messages on the queue. <br>
- All nodes are LOCAL. <br>
<br>
You might be wondering why in the world I'm trying to
delete a queue. Well, to make a long story short, the idea
behind this is to inject errors into our application to
see if it is reacting as expected. <br>
<br>
Any help will be appreciated! <br>
<br>
Thanks in advance! <br>
<br>
Cheers, <br>
Gabriel <br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
rtems-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.rtems.org/mailman/listinfo/rtems-users">http://www.rtems.org/mailman/listinfo/rtems-users</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
rtems-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.rtems.org/mailman/listinfo/rtems-users">http://www.rtems.org/mailman/listinfo/rtems-users</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
rtems-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a>
<a class="moz-txt-link-freetext" href="http://www.rtems.org/mailman/listinfo/rtems-users">http://www.rtems.org/mailman/listinfo/rtems-users</a>
</pre>
</blockquote>
</body>
</html>