Can't rename state file

Message boards : Questions and problems : Can't rename state file
Message board moderation

To post messages, you must log in.

AuthorMessage
Profile ritterm
Avatar

Send message
Joined: 4 Jul 08
Posts: 82
United States
Message 18214 - Posted: 4 Jul 2008, 14:30:39 UTC

Hi All,

I got the following messages this morning in my BOINC manager:

7/4/2008 7:43:33 AM|PrimeGrid|Started upload of gcwsieve_4609060_0_0
7/4/2008 7:43:35 AM|PrimeGrid|Sending scheduler request: To fetch work. Requesting 1 seconds of work, reporting 0 completed tasks
7/4/2008 7:43:36 AM|PrimeGrid|Finished upload of gcwsieve_4609060_0_0
7/4/2008 7:43:45 AM|PrimeGrid|Scheduler request succeeded: got 1 new tasks
7/4/2008 7:43:48 AM|PrimeGrid|Started download of llrTPS_15619965
7/4/2008 7:43:49 AM|PrimeGrid|Finished download of llrTPS_15619965
7/4/2008 7:46:54 AM||Can't rename state file; The process cannot access the file because it is being used by another process. (0x20)
7/4/2008 7:46:54 AM||[error] Couldn't write state file: system rename
7/4/2008 7:56:00 AM||Can't rename state file; The process cannot access the file because it is being used by another process. (0x20)
7/4/2008 7:56:00 AM||[error] Couldn't write state file: system rename
7/4/2008 7:56:27 AM||Can't rename state file; The process cannot access the file because it is being used by another process. (0x20)
7/4/2008 7:56:27 AM||[error] Couldn't write state file: system rename
7/4/2008 7:56:54 AM||Can't rename state file; The process cannot access the file because it is being used by another process. (0x20)
7/4/2008 7:56:54 AM||[error] Couldn't write state file: system rename


The first few seem normal enough, but the error messages concern me. Since getting these, the Prime Grid process seems to be working okay, so maybe there's no real problem. However, I haven't completed another full cycle on a PG WU yet.

Has anybody seen this error before and do you know what it means? I couldn't find anything about it in this forum or on BOINC FAQs.

Thanks for your help.

Mark
ID: 18214 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15480
Netherlands
Message 18215 - Posted: 4 Jul 2008, 14:42:51 UTC

Do you have an anti-virus and/or anti-spyware program that's scanning the BOINC directory? Something has put a lock on the client_state.xml file, so BOINC can't copy it to client_state_prev.xml and make it anew. That's what the message means.

Either scan your PC for viruses or spyware while you paused BOINC, or exclude the BOINC directories from your AV/AS active scanning.
ID: 18215 · Report as offensive
Profile ritterm
Avatar

Send message
Joined: 4 Jul 08
Posts: 82
United States
Message 18256 - Posted: 6 Jul 2008, 1:49:03 UTC - in response to Message 18215.  

Do you have an anti-virus and/or anti-spyware program that's scanning the BOINC directory? Something has put a lock on the client_state.xml file, so BOINC can't copy it to client_state_prev.xml and make it anew. That's what the message means.

Either scan your PC for viruses or spyware while you paused BOINC, or exclude the BOINC directories from your AV/AS active scanning.


Jord,

Thanks for your reply. I don't know that my AV/AS software is scanning BOINC directories, although I'm sure they are as I'm not deliberately excluding anything. I checked the AV/AS logs and nothing was going on at the time that I could find. Anyway, things have been running fine since and I haven't had any recurrence of that conflict.

Thanks again for the info. It's good to know that this seems to be something fairly benign.

Mark
ID: 18256 · Report as offensive
Profile ritterm
Avatar

Send message
Joined: 4 Jul 08
Posts: 82
United States
Message 18270 - Posted: 7 Jul 2008, 14:26:00 UTC - in response to Message 18258.  
Last modified: 7 Jul 2008, 14:27:10 UTC

From my side, Comodo AV certainly did as did Avast AV. The client_state.xml is a very frequently written to file and that is by many AVs considered suspect. Given the XML extension, confusion with MS office documents is easily made. So, rather than doing a *.* exception for the BOINC datadir, did a specific exclusion for this and the _prev.xml files. Since not seen the warning. It's benign long as the system does not have to recover or restart. Then you could loose information and progress on jobs.


Thanks for the tip. I can exclude directories with my AV/AS (BitDefender), but don't see how to do the same with individual files or file types. I'll dig into it some more or post on their forum.
ID: 18270 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15480
Netherlands
Message 18271 - Posted: 7 Jul 2008, 14:37:20 UTC - in response to Message 18270.  

Why not exclude the whole BOINC directory? That ought to include the files that are locked.
ID: 18271 · Report as offensive
Profile ritterm
Avatar

Send message
Joined: 4 Jul 08
Posts: 82
United States
Message 18274 - Posted: 7 Jul 2008, 15:30:58 UTC - in response to Message 18271.  

Why not exclude the whole BOINC directory? That ought to include the files that are locked.


Sure, but I would prefer to exclude only what I have to. If I can't find a way to do that with my s/w, I probably will exclude the entire directory.
ID: 18274 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15480
Netherlands
Message 18275 - Posted: 7 Jul 2008, 15:37:14 UTC - in response to Message 18274.  

Why not exclude the whole BOINC directory? That ought to include the files that are locked.


Sure, but I would prefer to exclude only what I have to. If I can't find a way to do that with my s/w, I probably will exclude the entire directory.

It's better to do that anyway, in my severely humble opinion, as you wouldn't want the AV program to lock other files while any project's science application is working. What if it locks a checkpoint file, as some of them can be pretty big (several 10s of MB)?

I am exiting BOINC before I do AV or AS scans. Just to be sure.
ID: 18275 · Report as offensive
Profile ritterm
Avatar

Send message
Joined: 4 Jul 08
Posts: 82
United States
Message 18276 - Posted: 7 Jul 2008, 15:55:20 UTC - in response to Message 18275.  
Last modified: 7 Jul 2008, 16:35:37 UTC

It's better to do that anyway, in my severely humble opinion, as you wouldn't want the AV program to lock other files while any project's science application is working. What if it locks a checkpoint file, as some of them can be pretty big (several 10s of MB)?


I hardly know the details of how the client works, but excluding the entire BOINC directory seems reasonable based on the scenario you describe. I guess one has to weigh a number of issues in a situation like this. :-)
ID: 18276 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15480
Netherlands
Message 18277 - Posted: 7 Jul 2008, 16:09:59 UTC - in response to Message 18276.  

I hardly know the details of how the client works

The client doesn't do any of the crunching for the projects you are attached to. It is a management program for all the projects, it takes care of the queuing of work, communications with the projects and keeps a record of what is going on.

For this it writes to the client_state.xml file every second to 10 seconds, making a copy of it for backup (client_state_prev.xml), in case something corrupts the original, BOINC can start up with the prev file and you don't lose work.

Apart from that, the project applications do the calculations, using your CPU. They write their state to disk about every so many seconds that you specified in the "write to disk" preference. These are checkpoints. The application doesn't need to follow this, it's a guideline. Some don't checkpoint until after 10 to 30 minutes.

All this is simply said, it's quite a bit more confusing and complicated, as you can understand. Even I get stuck at times explaining things properly. ;-)

But at least I hope you understand now why excluding the whole BOINC directory (and its sub-directories) is the best way to go at things.

"Are the applications from projects to be trusted?" you may ask. Well, that depends on the project of course. If you attached to a highly doubtful project, then perhaps not. But in all, the applications and files you get from a project should be MD5 hashed, which in itself shows some security already.

Then again it doesn't hurt that you scan the BOINC directory and sub-directories once in a while. Just exit BOINC before you do so and restart it after you're done.
ID: 18277 · Report as offensive
Profile ritterm
Avatar

Send message
Joined: 4 Jul 08
Posts: 82
United States
Message 18364 - Posted: 11 Jul 2008, 14:38:27 UTC - in response to Message 18277.  

Thanks for the excellent tutorial, Jord. :-) I started looking for and noticing more of these contention messages in the last few days, so I have excluded the entire BOINC directory. Since then I haven't had any problems.

Thanks for the help!

Mark
ID: 18364 · Report as offensive

Message boards : Questions and problems : Can't rename state file

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.