Issue/Bug in newest release
Posted: Wed May 25, 2011 10:49 am
I seem to have discovered an issue with the newest (Rel 2.5.2) tools. Because of the inter-dependencies between my code and an external $70,000 motion platform, I cannot readily generate a simple test case to submit, so I can only describe the problem in detail. I also have an acceptable work-around, so I'm not in need of help. I'm simply reporting this in the hopes that it may save someone some time, and may eventually help in resolving the root cause.
Earlier this month, I realized that the date of the newest tools, advertised as "Release Date: Jan 24, 2010", was actually 2011 - so I decided to upgrade from Rel24_rc2 which I've been using. Two weeks later, I got a bug report of a missed deadline, which we all attributed to some new code that I've been adding.
We are controlling an external system that sends UDP packets out at 60 Hz, or every ~17 ms; we need to respond with another UDP packet before the next packet is sent - i.e. within ~15 ms, or the external system will exhibit a noticeable "bump" in its trajectory. FWIW - this is a private network - no connections to the Internet or the company intranet.
I have a task (call it Feedback) that waits on the UDP packet, and calls OSFlagSet to send a signal to another task (called Command), which is responsible for calculating the next commands and sending the response. This used to work fine with the old tools, but now, with the new tools, something happens to delay the second task. It isn't clear whether a packet is lost, or a flag set is lost, but what definitely happens is a missed Command deadline.
Today, when I hooked up a scope and determined the missed deadline, I decided to revisit my priorities. I had originally set the priority for the Feedback and Command tasks to higher than any other of my user tasks, but lower than the network tasks; I figured that I needed to keep the networking as responsive as possible. To (hopefully) prevent a missed flag event, I boosted these priorities to the highest levels; only interrupts are now higher. The problem still persists. To be sure there wasn't a system task that I was unaware of, I tried TaskScan, and found nothing unexpected. Stumped, I started to think what could be the problem:
1. Only interrupts can preempt my tasks
2. Other tasks can only prevent my tasks from running if they prevent task switching
3. I only have one other task, and it never disables task switching itself
4. So could it be in a system task or interrupt handler?
When I got to 4, I finally remembered I had changed the tools. Rebuilding the application eliminates the problem! So, it seems that somewhere, the system has changed...
As for me, I'll stick with the old tools, unless and until this issue is resolved; the old ones are good enough, and they work. I am willing to revisit this or experiment with ideas or fixes, time permitting.
Earlier this month, I realized that the date of the newest tools, advertised as "Release Date: Jan 24, 2010", was actually 2011 - so I decided to upgrade from Rel24_rc2 which I've been using. Two weeks later, I got a bug report of a missed deadline, which we all attributed to some new code that I've been adding.
We are controlling an external system that sends UDP packets out at 60 Hz, or every ~17 ms; we need to respond with another UDP packet before the next packet is sent - i.e. within ~15 ms, or the external system will exhibit a noticeable "bump" in its trajectory. FWIW - this is a private network - no connections to the Internet or the company intranet.
I have a task (call it Feedback) that waits on the UDP packet, and calls OSFlagSet to send a signal to another task (called Command), which is responsible for calculating the next commands and sending the response. This used to work fine with the old tools, but now, with the new tools, something happens to delay the second task. It isn't clear whether a packet is lost, or a flag set is lost, but what definitely happens is a missed Command deadline.
Today, when I hooked up a scope and determined the missed deadline, I decided to revisit my priorities. I had originally set the priority for the Feedback and Command tasks to higher than any other of my user tasks, but lower than the network tasks; I figured that I needed to keep the networking as responsive as possible. To (hopefully) prevent a missed flag event, I boosted these priorities to the highest levels; only interrupts are now higher. The problem still persists. To be sure there wasn't a system task that I was unaware of, I tried TaskScan, and found nothing unexpected. Stumped, I started to think what could be the problem:
1. Only interrupts can preempt my tasks
2. Other tasks can only prevent my tasks from running if they prevent task switching
3. I only have one other task, and it never disables task switching itself
4. So could it be in a system task or interrupt handler?
When I got to 4, I finally remembered I had changed the tools. Rebuilding the application eliminates the problem! So, it seems that somewhere, the system has changed...
As for me, I'll stick with the old tools, unless and until this issue is resolved; the old ones are good enough, and they work. I am willing to revisit this or experiment with ideas or fixes, time permitting.