Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
calls to stat() don't release the runtime lock #4995
Original bug ID: 4995
There are calls of stat functions in the runtime and unix library which do not release the runtime lock, They may cause the runtime to block if the target files are in NFS mounts and the server is heavily loaded.
The patch wraps the calls of stats in otherlibs/unix/stat.c and byterun/sys.c so that they could release the lock.
There are some other stat calls but I did not wrap them since:
The other calls in byterun are for startup, I guess.
Comment author: @mmottl
Just pinging - Mark, any chance this can be fixed in the next OCaml release? Jane Street Core handles this particular problem correctly, it seems. Though I'd recommend avoiding "stat64", etc., which seem to have become deprecated function calls on both Linux and Mac OS X.