I have a situation where the programme counter(PC) shows
that vxworks msgQreceive function has been called by task A
and Q is full, still I am not picking up the messages. There
is no other task registered to receive messages from this Q.
The sending task B, which is ISR in this case, is getting
timedout everytime it tries posting new message in it. A's
state is PEND which means I am waiting for some resource to
get free but PC shows I have called vxworks msgQReceive and
currently at qJobget+0x018 location. There seems to be two
causes now(identified by me): either vxworks qjobget task is
not able to do semTake or no messages in Q. But Q is full
and semTake failure seems unlikely(though I dont have a
mechanism to check so).

Besides explaining root cause for above, can anyone suggest
how to get my task in READY state again? I also tried
flushing the Q; on doing this, more messages get posted in Q
but A still doesnt pick up any :(

Answer Posted / mohit

Thanks Gaurav for ur answer. But if B is using WAIT_FOREVER,
it should never timed out, right? Also, all application
tasks are runnig n at same priority in preemptive manner.
Anyhow, in this case, I found that qJobGet() of vxworks is a
lower level generic function which is used by many other
routines including msgSend. If this is the case, I am trying
out following:
1. I am trying to get a stack dump of this task. Though it
would involve lot of labour but I am hoping to take a dump
of valid addresses that I found in its stack. This should
help in obtaining actual caller of qJobGet(). This way, we
might find the resource our task A is actually wai6ting for
to acquire(it should be either of some vxworks semaphore or
msgQ itself).
2. Second, I found that task structure of vxworks contains a
variable that stores the address of the object task is
currently PENDed on. If that address can be dumped, again we
can hope to progress from here.
Unfortunately am using an older version of vxworks and can
not afford to upgrade to later versions. So, many of the
utilities found on web have to be actually written using
available vxworks's online tools.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

No New Questions to Answer in this Category !!    You can

Post New Questions

Answer Questions in Different Category