Page 1 of 2

Error Renaming Folder After Unpack - Windows 7?

Posted: September 1st, 2009, 3:16 am
by Chuck
I have just rebuilt my usual SABnzbd machine as Windows 7 Ultimate 64bit with Norton 360 V3.

Previously it was Vista Ultimate 32bit with Norton 360 V2 and I had no real issues wtih SABnzbd and it quite happily sat running away downloading and running one of my post processing scripts.

Now though more often than not it fails with the following:-

ERROR::[postproc] Error renaming "C:\SABnzbd\Downloads\Complete\Movies\_UNPACK_XXXXXXXXXXXXXX" to "C:\SABnzbd\Downloads\Complete\Movies\XXXXXXXXXXXXXX"

As a result my post processing script fails because its looking in an non existant path.  ???

I suspect it could be something to do with a file being locked open from a AV scan and hence not allowing the folder rename.  Thought it was an initial permissions problem however it doesn't always fail.

I am running SABnzbd as a Scheduled Task under my User account with highest privileges (or it doesn't seem to run under Windows 7)

Anybody got any ideas where to look or having similar issues and have resolved ? :)

Re: Error Renaming Folder After Unpack - Windows 7?

Posted: September 1st, 2009, 3:17 am
by shypike
Did the folder names contain any "funny" characters (like ü or è) ?

Re: Error Renaming Folder After Unpack - Windows 7?

Posted: September 1st, 2009, 4:10 am
by Chuck
No, they were just regular folder names with the year in brackets (2009) e.g. Bob (2009)

Re: Error Renaming Folder After Unpack - Windows 7?

Posted: September 1st, 2009, 9:14 am
by shypike
I doubt if your Norton is 100% compatible with Windows 7,
shouldn't you use 2010 instead?
There are utilities (SysInternals e.g.) that can tell you which program keeps a folder locked.

Re: Error Renaming Folder After Unpack - Windows 7?

Posted: September 1st, 2009, 11:35 am
by Chuck
Yes you are probably right.  Although its auto updating there seems to be a release 3.5 imminent so hopefully will resolve this issue.

I could use SysInternals but problem is knowing exactly when the lock is going to occur.  Seems its the bigger files which would make sense from an AV scan.  I am not sure how long its holding on to the lock so whether I would be able to see it or not its there.

Re: Error Renaming Folder After Unpack - Windows 7?

Posted: September 2nd, 2009, 2:02 am
by shypike
Cannot you tell Norton to leave "Movies" and its sub-folders alone?
I mean, I have never seen a virus in a movie download.
OK, there could be software in a sub-folder of a movie, but you aren't going to run that anyway.

Re: Error Renaming Folder After Unpack - Windows 7?

Posted: September 5th, 2009, 6:14 am
by Chuck
Thanks I did tell Norton to exclude the movies directory both on the sabnzbd and the subsequent copy location.  This seems to have worked as I have not had any problems since.

Also it resolved another problem whereby network shares would often have a long think and pause in explorer when traversing through them which was doing my head in.

Thanks for your help.

Re: Error Renaming Folder After Unpack - Windows 7?

Posted: September 5th, 2009, 8:23 am
by shypike
Virus scanners tend to have trouble with huge VOB and ISO files (>= 1G) anyway.

Re: Error Renaming Folder After Unpack - Windows 7?

Posted: October 3rd, 2009, 11:32 pm
by Destroyer
I also had some trouble with norton and sab. MS just released their free virus scanner though and that's working with no troubles alongside it. http://www.microsoft.com/security_essentials/ Light on resources and all that too.
Norton's basically bad news for doing anything but mum and dad email checking etc haha

Re: Error Renaming Folder After Unpack - Windows 7?

Posted: November 6th, 2009, 11:02 am
by funtek
Hi,

I have this same problem and it is intermittent, which is frustrating. The last time it happened, it was on a So You Think You Can Dance episode off of Newzbin/astraweb, but it's happened on Daily Show eps as well. I have a fresh install of SABnzbd, and I am using Kierse's MediaRover sorting script.

Fresh install of Win7 Ultimate x64 with no virus scanner and SABnzbd 0.4.12. Obviously something is keeping the files open so SABnzbd can't move them. Maybe it's trying to generate thumbnails? OP, do you have your download directory in the path of you 'Videos' library?

Re: Error Renaming Folder After Unpack - Windows 7?

Posted: November 13th, 2009, 1:49 pm
by ceevee
I'm getting this "[postproc] Error renaming..." error as well on Windows XP. I'm using Microsoft Security Essentials.

Re: Error Renaming Folder After Unpack - Windows 7?

Posted: November 13th, 2009, 5:41 pm
by shypike
It's always a challenge on Windows to rename a folder.
This is because you are not allowed to do it when Windows has the slightest
suspicion that another program access the folder.
I would tell the virus scanner to skip any non-software download folder.
You don't expect to find viruses in films, I assume?

Re: Error Renaming Folder After Unpack - Windows 7?

Posted: November 25th, 2009, 2:56 am
by Chuck
I am back to having this problem again but it seems to be after upgrading to SABnzbd 0.4.12.  Before once I excluded the folders from my AV scans then it was fine and would process away.

I am reluctant to go back to 0.4.11 but might just to see if there is anything in the release that is causing this.

Its strange is it doing it on a new build with no AV, so I wonder what else could be keeping hold of it. 

It only does it on larger files ~4GB or so as 1.5GB ones seem ok.  Like you say it would seem to be something locking the file but what is it is the question. 

Any more ideas?  Its quite difficult to use a file monitoring process as you don't when something is going to happen unless it allows a history of what has touched the file.

Re: Error Renaming Folder After Unpack - Windows 7?

Posted: November 25th, 2009, 3:56 am
by shypike
Tomorrow 0.5.0 Beta1 is coming out.
You can try that, but I suspect it makes no difference.
Renaming the folder is a very basic one line piece of code.
Unless Windows forbids renaming, there's very little that can go wrong.

The alternative would be that we create an option that
disables any renaming of folders.
The disadvantage being that you don't see that it's failed or not finished.

Re: Error Renaming Folder After Unpack - Windows 7? - Solution?

Posted: November 29th, 2009, 5:01 am
by Chuck
Thanks for releasing 0.5.0 Beta 1 it looks good but as you said it doesn't make any difference.

I was getting fed of the rename issue as it was now affecting every file of over 4GB.  I was convinced it was still Norton 360 just ignoring its settings.

Anyway I tried ProcessMon to monitor what was happening to the directories and found the culprit.  SearchHostProtocol.exe was accessing the large file at the time of the rename and so caused an Access Denied to SABnzbd.

So I disabled the Indexing on C:\SABnzbd (which is where all my downloads etc go) in Windows Explorer and tried again.  No luck SearchHostProtocol.exe was still accessing the file.

After another quick google I found that SearchHostProtocol.exe is controlled by a different bit of Windows.

If you go to the Start Menu and type Indexing into and hit return it brings up folders that are currently Indexed.  C:\SABnzbd was still listed in this so depending on your setup you can exclude it or delete it from indexing.

Then I tried again and hey presto it worked for the first time in ages.  ProcessMon didn't record any activity from SearchHostProtocol.exe on that folder.

So I will continue to monitor the situation and see if it works correctly from now on.

This would explain however why a fresh build would see the issue.

Hopefully it will help others solve this.

As an alternative could you put a small sleep and retry on the rename operation as SearchHostProtocol.exe doesn't hold it for long but obviously the larger the file the longer the period.  With Windows 7 becoming more prevelant this might become more of an issue.