dz@cornu.ucsb.edu (Daniel James Zerkle) (07/08/90)
A certain quirk with NFS is causing major headaches with a program I'm working on. Can anybody suggest a fix? Basically, my program uses three Unix machines: 1. The main program runs on a Sun 3/60. 2. The main program, via rsh, calls a secondary program on a Masscomp machine. 3. A Sun 3/160 (I think) is a file server for the above two machines. Basically, machine 1 uses rsh to invoke a program on machine 2 that writes a file (sampled speech data and some peripheral information). Both 1 and 2 have a file system of 3 mounted, so after 2 writes the file (through NFS), 1 can (theoretically) get to it (to recognize what word is spoken). However, about one time out of five, something goes wrong. The program on 2 writes the file and exits. Running "ls -l" on 2 and 3 show that the whole file has been written. However, listing the file on 1 shows that only the first 300 bytes or so are available. About a minute later, the rest of the file materializes. One bit of strangeness is that 1 needs to read part of the file beforej the whole file is there. It opens, reads 256 bytes, then closes. Later, however, it needs to read the whole thing (typically 3Kbytes). To summarize the operation: a. 1 calls program on 2 b. 2 writes first 256 bytes of a file (open-write) c. 1 reads those 256 bytes (open-read-close) d. 2 writes rest of file (write-close-exit) e. 1 reads rest of file Right now, I have 1 do a periodic check to see if NFS has gotten it straight how big the file is. In other words, 1 may wait about a minute while the file size gets straightened out. This is totally unacceptable, as this is supposed to be a real-time speech recognizer. Does anybody know of a way to force NFS to give the correct version of the file right away? Remember, 2 and 3 know the correct file. It's just 1 that's clueless. Please send E-mail. If this address does not work, try 6600dan@ucsbuxa.ucsb.edu. | Dan Zerkle home:(805) 968-4683 work:687-0110 | | dz@cornu.ucsb.edu dz%cornu@ucsbuxa.bitnet ...ucbvax!hub!cornu!dz | | Snailmail: 6681 Berkshire Terrace #5, Isla Vista, CA 93117 | | Disclaimer: My fish are stupid. |