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

Hi Gaurav/Sandy,
Sorry that i forgot to post the issue I found. I dumped the
task A stack and read the functions pushed onto stack. this
led me to the last caller of the function. I found that task
A was pending on another Q which was created 'dynamically'
to send a small message to different board(controlled by
different processor). task A was on WAIT_FOREVER for an
acknowledgement of message sent. Now, it was the case of IPC
message dropped due to which even though receiving board did
send the acknowledgement(verified multiple times using
counter), it was not received by task A. To overcome
problem, i changed the timeout value for ACK to finite value
and everything now works fine(IPC messages dropped count
increasing though).
So it was indeed a different Q that task A was pending on.
But due to PC showing qjobGet(), i was confusing the two.
Also the other Q was being dynamically created to send IPC
message and destroyed on receiving Ack. This is a very bad
coding method and am now chasing the writer of that code :)

Is This Answer Correct ?    0 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