The Question is:
Although I know that the use of the default eventflag (0) is discouraged, I
have inherited some application code which uses the default eventflag in $QIO
The situation is as follows:
With a $QIO a message is read from a mailbox, an AST is defined to do some
handling, the parameter EFN is not defined for the $QIO so it uses the default
In an other part of the program an other mailbox is written into with a $QIOW,
the parameter EFN is not defined.... But the functioncodes are: IO$_WRITEVBLK,
IO$M_NOW and IO$M_NORSWAIT.
We suspect that the proces sometimes hangs in the $QIOW. We have added some
logging to support this suspiscion.
My questions are:
Can an AST (in this case) cause a hang of the proces? (The AST sets the
eventflag and the trigger for continuation is gone)
And if so: How can we reproduce this behaviour?
As mentioned earlier, it sometimes happens (every 2 a 3 weeks)..
I know the solution is to use an eventflag which is reservered in the
$QIOW-call, but the management will be sure what the cause of the problem is
and that the solution solves it...
The Answer is :
There is the distinct possibility you have a synchronization bug
latent in your code -- the use of event flag zero may be related,
or it might not.
Please first suspect, but please then determine. Guesses and hunches
can be and often are quite useful for the initial detective work, but
a specific and systematic determination is needed -- particularly when
the initial assumption proves incorrect. Topics such as (7552) will
be of interest here, as these can help you isolate and resolve the
problem(s) arising here.
Please do certainly fix the event flag use (to the EFN$C_ENF event
flag, or to an event flag allocated with lib$get_ef, or similar),
and please do read and follow the recommendations within topics
including (1661) and (6984), and please read the other relevent
topics referenced there.