Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

fopen() on existing file on NFS Server fails.

77 views
Skip to first unread message

Don Bernardo

unread,
Jun 12, 2009, 9:41:03 AM6/12/09
to
Hi I really need help:
Following setup:
I have hundreds of process that periodically create a file and I have
a "master" process that tries to read them.
Each of those files has the same name but they are located in a folder
where only their process writes to. After being read, the file gets
deleted and recreated after half an hour or so. Meanwhile the master
process periodically (5-10s) checks if the file exists (if fopen!
=NULL), reads and deletes… an infinite loop.
Now I have the problem that the master process sometimes can't read
one or two of the files even though they exist. I can see them, open
and store them. After opening and storing a file with an editor (vi)
the master process suddenly can read it.
I double checked the file permissions, I do a "sync" of the NFS before
each attempt to read it. I made sure that I release all filepointers
when I don't need them any more.
I can't see a pattern which file is not read-/accessible, sometimes it
was created from process 567 sometimses 345… totally random.

OS is RedHat 5 and I use the Sun Grid Engine to fire off the processes
that create the file. The Fileserver is apparently connected with
fibre optics and is not in heavy use. Also the files are txt files
with a couple of lines.

I was running the same code before our system has been updated from
REdhat 4.7(?) to 5.0 and it was running fine. What else has been
changed is not communicated.

Any ideas?
Cheers

0 new messages