Experimental Physics and
| |||||||||||||||
|
As I understand it, taskwd, is supposed to monitor registered tasks so that when one of them gets unexpectedly into a suspended state some action can be taken. In our case, taskwd was suspended and no other task appeared in the list as suspended. Looking at source code, I see that on vxWorks the taskwd main loop calls epicsThreadIsSuspended() which in turn calls taskIsSuspended() in the vxWorks kernel. Looking there, to see if there might be a cause for the bus error, I noticed that the logic of the routine might not match the semantics that the taskwd is expecting.
If a monitored task decides to exit, it's supposed to remove its registration with taskwd. In Reality, however, we can run into a case where a monitored task quits because of a problem without properly un-registering. Unclear to me how bullet-proof taskwd must be to handle all eventualities: Check if a registered task ID is still valid, still running, still associated with the task that originally registered - since that one might have quit and now we're looking at a completely different task that just happens to have the same ID? Bottom line is that taskwd works best when you only write perfect code that never requires the help of a task watchdog ;-) -Kay
| ||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |