McDermott-Group / servers

Public repo that stores LabRAD servers and other non-measurement related code
0 stars 2 forks source link

[datachest] cannot access a file being written to #100

Open roboguy222 opened 7 years ago

roboguy222 commented 7 years ago

I tried to use grapher to look at a data file I was writing to, but it crashed the program writing to it. If we want to be able to look at data live as it comes in, this won't work!

The process cannot access the file because it is being used by another process.
amopremcak commented 7 years ago

[1/24/2017 13:56:40] Temperature recording failed: Unable to flush file's cached information (File write failed: time = tue jan 24 13:56:40 2017 , filename = 'z:/mcdermott-group/data/adr logs/adr3/bcx2205yje_temperatures.hdf5', file descriptor = 3, errno = 22, error message = 'invalid argument', buf = 07576a70, total write size = 8192, bytes this sub-write = 8192, bytes actually written = 18446744073709551615, offset = 33038704).

nmGit commented 7 years ago

Can you open the file in your grapher as read only? This might work.

amopremcak commented 7 years ago

Yea, thats a good point @nmGit. Initially all files were opened read only by default, unless the dataset was newly created or you set modify = True. A few months ago, I modified the dataChest to include some file forensics, that is Date Created, Date Modified, Date Accessed, and that required me to open all files with write priveleges. In the case of a single controller, this is all fine, but when you have two machines trying to access the same set things might get a little hairy. Ill check on this