[Info-vax] QIO Writes to a mailbox
abrsvc
dansabrservices at yahoo.com
Fri Nov 4 08:34:04 EDT 2011
On Nov 4, 8:01 am, gartm... at nonsense.immunbio.mpg.de (Christoph
Gartmann) wrote:
> In article <9d04fe57-942d-478b-83ac-403df39d8... at t8g2000yql.googlegroups.com>, Steve Bainbridge <stephen_bainbri... at yahoo.co.uk> writes:
>
> >This is on Alpha 4xCPU ES45 running OpenVMS 7.3-2 with the
> >applications primarily written in C and Pascal. The fact that it seems
> >to work 99.999% of the time suggest to me some sort of timing issue -
>
> Or some memory issue or both.
>
> >hence I'm keen to find out exactly when the supplied buffer is copied
> >by the QIO.
>
> >A chunk of code is below, first is the routine for
> >f_osi_write_to_mailbox and below that is the actual call to
> >f_osi_write_to_mailbox - this is the code in question. I'm not seeing
> >the error message "<MBXFWDERR>" in the logs so I'm assuming the QIO
> >was queued OK
>
> Even if the QIO is queued all right, the relevant thing is the iosb status
> block (vp_iosb in your code). The function is called with the parameter
> C_OSI_NOWAIT and hence uses QIO instead of QIOW. So the status block must not
> be used elsewhere until the QIO finished, although the program continues and
> does not wait for the QIO to complete. Variables that are passed to QIO should
> be defined as "static" to prevent the compiler to treat them dynamically.
>
> Regards,
> Christoph Gartmann
>
> --
> Max-Planck-Institut fuer Phone : +49-761-5108-464 Fax: -80464
> Immunbiologie und Epigenetik
> Postfach 1169 Internet: gartmann at immunbio dot mpg dot de
> D-79011 Freiburg, Germany
> http://www.immunbio.mpg.de/home/menue.html
I will examine the code more closely later, but in the general sense,
I echo previous replies. It appears that you are verifying that the
QIO has been completed, NOT that the IO hasbeen completed. This is a
subtle but distinct difference. With the QIO, the status indicates
that the IO has been queued not completed. With the QIOW, the IO
would be completed.
On the receiving side, usually a QIO is issued followed by a wait of
some sort (often a Hibernate with an AST). The completion of a write
to the mailbox then triggers an AST which will Wake the receiver. A
QIOW will work similarly.
An examination of the actual IO that fails along with the IOSB for
that read would be of interest here. Are there any "termination"
characters specified for the QIO read that may be causing a premature
read termination or shortened record?
Is there any pattern to the failures? Time, Qio/record count?
I'd verify the synchronization here with QIO vs QIOW and any HIB/WAKE/
AST coding on both the sending and receiving sides.
Also, verify that there are sufficient buffers for the mailbox
involved. Are you running out of buffer space for the mailbox records
on rare occasssions? I didn't see a check for that on the writing
side/
Dan
More information about the Info-vax
mailing list