On Oct 27 06:48, Matt D. wrote: > I haven't had an opportunity to look into it but I've also encountered > errors when performing a parallel make build (make -j) on a large C++ > project which has multiple interdependencies across a network share with too > many threads. > > The reported "Bad File Descriptor" is the same error that I get.
That's fine and all, but it doesn't add any new info to the case. > > Matt D. > > On 10/27/2015 5:52 AM, Corinna Vinschen wrote: > >On Sep 25 16:31, Vermessung AVT - Wolfgang Rieger wrote: > >>1) Concurrent read access to the setup files was possible and worked > >>fine with local files (24 hrs testing with millions of file accesses > >>in 4 parallel jobs). > >>2) However, when the file to be read (datafile.txt) is stored on a > >>network share on a file server - which is the case in our working > >>environment - the error could be reproduced. The number of Bad file > >>descriptor errors seems to be related to the work load at the server > >>where the file resides. > >>3) The MS copy command shows no such error, even with network files. > >>So we can substitute the cat's by copy's. For gawk, however, there is > >>no shell alternative. > >> > >>It looks like there is a small time frame in opening files when the > >>server file is non-accessible to other processes. If a parallel job > >>happens to access the same file within that short time period while > >>another process is opening it, the "Bad File Descriptor" error is > >>thrown. > > > >Cygwin uses full sharing for all files it opens, unless the file is > >opened in very specific circumstances (e.g, creating a symlink, deleting > >a file). "Bad file descriptor" doesn't point to a sharing problem. > >It seems the handle is unusable or something. > > > >I tried your testcase and I can't reproduce the problem in my > >environment. Have you tried catching a trace of the problem via > >strace? It would be helpful to see where the EBADF occurs. I'm running the testscript for a few hours now, with a server under heavy load, but I still can't reproduce it. Is this a bad interaction with some virus scanner, perhaps? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
pgpUGYvePb1eR.pgp
Description: PGP signature