PDA

View Full Version : Illegal operation attempted on a registry key that has been marked for deletion


teognost
10-04-2010, 12:53 PM
Hi
I installed Visual Build on a machine with Win2008Server X64.
Since I started to build on this machine -from time to time I see the build is stopped and the log says:


Process completed with exit code 1
Error firing vbld_StepDone event: Failed to instantiate script engine 'VBScript': Invalid class string
5/10/2010 2:30:10 AM: Step 'Build current project-Mixed Platforms' failed
5/10/2010 2:30:11 AM: Building failure step 'Send Gen Mail-project compilation failed(build continues)'...
Error creating custom action 'Send Mail': Illegal operation attempted on a registry key that has been marked for deletion.
5/10/2010 2:30:11 AM: Step 'Send Gen Mail-project compilation failed(build continues)' failed
5/10/2010 2:30:11 AM: Building failure step 'Send Gen Mail-failure of failure step'...
Error creating custom action 'Send Mail': Illegal operation attempted on a registry key that has been marked for deletion.
5/10/2010 2:30:11 AM: Step 'Send Gen Mail-failure of failure step' failed
5/10/2010 2:30:11 AM: Build ended (elapsed = 00:51:01).


Any idea what is causing this ?
I did not have such issues when the machine had Win2003 server X32 operating system

kinook
10-04-2010, 02:08 PM
The first error message indicates that CLSIDFromProgId (http://msdn.microsoft.com/en-us/library/ms688386%28VS.85%29.aspx) for "VBScript" returned CO_E_CLASSSTRING. The second error means that CoCreateInstance (http://msdn.microsoft.com/en-us/library/ms686615%28VS.85%29.aspx) for the VBScript CLSID ({B54F3741-5B07-11cf-A4B0-00AA004A55E8}) returned ERROR_KEY_DELETED. I'm not sure what could cause this (scripting in Visual Build does depend on the ActiveX Scripting (http://en.wikipedia.org/wiki/Active_Scripting) environment). One other user did report this behavior on Win2008 -- in their case, the problem apparently started after IT installed a networked file system (SAN) and set up automatic backups. We haven't been able to reproduce this behavior, having run continuous builds for multiple days on Windows 2008 without errors.

teognost
10-05-2010, 04:33 AM
Next build failed also:

10/5/2010 5:13:58 AM: Building project step 'Delete build base folder'...
Deleting folder 'C:\NGBuilds'...
C:\Windows\system32\cmd.exe /C rd /q /s C:\NGBuilds
5/10/2010 5:24:56 AM: Building project step 'Create build base folder'...
Error creating custom action 'Create Folder': Illegal operation attempted on a registry key that has been marked for deletion.
5/10/2010 5:24:56 AM: Step 'Create build base folder' failed
5/10/2010 5:24:56 AM: Building failure step 'Send Generic Mail-step failure'...
Error creating custom action 'Send Mail': Illegal operation attempted on a registry key that has been marked for deletion.
5/10/2010 5:24:56 AM: Step 'Send Generic Mail-step failure' failed
5/10/2010 5:24:56 AM: Building failure step 'Send Gen Mail-failure of failure step'...
Error creating custom action 'Send Mail': Illegal operation attempted on a registry key that has been marked for deletion.
5/10/2010 5:24:56 AM: Step 'Send Gen Mail-failure of failure step' failed
5/10/2010 5:24:56 AM: Build ended (elapsed = 00:11:34).


What I do not uderstand -why it says "Illegal operation attempted on a registry key that has been marked for deletion"
for a step which is not a VB Script step (there is no scripting part of this step) but just a simple 'Create folder' or 'Send Mail' ?
Is not something wrong with VisBuild installation ?(although everything went ok when I installed it)
Could be this caused bu the fact it is a X64 OS on a virtual machine?
Maybe I should try to reinstall OS and use X32 -w2003 Server ?
This is a machine where I had problems with frozen builds ,your suggestion was to reinstall OS but now I am running in different kind of issues ...

kinook
10-05-2010, 07:49 AM
Originally posted by teognost
What I do not uderstand -why it says "Illegal operation attempted on a registry key that has been marked for deletion" for a step which is not a VB Script step (there is no scripting part of this step) but just a simple 'Create folder' or 'Send Mail' ?The error message indicates that CoCreateInstance for a Visual Build action failed (Visual Build actions are also implemented as COM components). It seems as though something has gone awry with COM in general (not just Active Scripting).

Is not something wrong with VisBuild installation ?(although everything went ok when I installed it)I don't think so (it sounds like a Windows/COM issue), but you could try reinstalling Visual Build.

Could be this caused bu the fact it is a X64 OS on a virtual machine?Our testing was done in a VMware guest, and we've never seen this.

Maybe I should try to reinstall OS and use X32 -w2003 Server ?
This is a machine where I had problems with frozen builds ,your suggestion was to reinstall OS but now I am running in different kind of issues ... Reinstalling or repairing Windows might help. Is there any other resident software that could possibly be interfering or causing issues? Any details that would enable us to reproduce the problem would be helpful. Thanks.

teognost
10-05-2010, 10:35 AM
I have reinstalled VisBuild (now is version 7.7) ,will see if it helps
OS on this machine is recently installed,I would consider reinstalling only if there is no other choice.
I do not see any other software interfering with VisBuild
Will come back if the issue appears again .

teognost
10-07-2010, 10:55 AM
After installing VisBuild 7.7-same problem appeared.
This box was recently reinstalled with W2008Server as I had other issues with freezing build (previously it was W2003server) and I hoped OS reinstall will solve the issue but I see now I stepped into different kind of issues ;-(
Any suggestion about what should i do next in order to make it working normally ?
Or how can I detect if there is some software interracting with VBP (I do not see anything like this) ?

kinook
10-07-2010, 01:09 PM
We've been building the attached project w/ VBP 7.7 on a clean Win 2008 R2 DataCenter x64 VM for several days now without any problems. Does the issue occur with this project on the problem machine?

teognost
10-12-2010, 12:33 PM
I tested your project several times for several hours -always worked ok
But when running the build project it happened 2 things -when running in parallel with your project -it remained frozen (this was the reason we have reinstalled the OS on this machine in order to get rid of this frozen issue) at some step where msxsl.exe is ran:

10/13/2010 3:11:48 AM: Building project step 'add solution result'...
C:\Program Files (x86)\VisBuildPro7\Tools\msxsl.exe "C:\Reports\BuildsOutput\2010.1013.10.0\results.xml" "C:\BuildsIntraday\ffng\Install\VBP\Processing\AddS olutionResult.xslt" -o "C:\Reports\BuildsOutput\2010.1013.10.0\addedResult s.xml" "buildLabel"="2010.1013.10.0" "solutionName"="SystemMonitoringAndManagement/SystemMonitoringAndManagement.sln" "status"="Success" "duration"="948" "output"="\\DEV-BLD01\Reports\BuildsOutput\2010.1013.10.0\SystemMo nitoringAndManagement_SystemMonitoringAndManagemen t.sln.txt"


When running just the build project -it appeared the other issue:
12/10/2010 5:18:50 AM: Building project step 'Create build base folder'...
Error creating custom action 'Create Folder': Illegal operation attempted on a registry key that has been marked for deletion.


Only one time from approx 9-10 attempts I was able to run the build without any issue

kinook
10-12-2010, 12:49 PM
Can you narrow down the problem build project to something we can build here and reproduce?

teognost
10-12-2010, 12:56 PM
ok,will do that
will try to make a smaller project and to reproduce same issues then send it to u

teognost
11-02-2010, 01:56 PM
I tried to reproduce the issues and ths situation is:
-I ran the test projects you sent (build.bld but I added a failure step) –couple of times it failed like this:

3/11/2010 3:05:44 AM: Building project step 'Run Script'...
hello
3/11/2010 3:05:44 AM: Building project step 'Delete Folder'...
Error in System (VBScript) script code at Line 180, Column 2
3/11/2010 3:05:44 AM: Building failure step 'Send Generic Mail-step failure'...
Error creating custom action 'Send Mail': The media is write protected.
3/11/2010 3:05:45 AM: Build ended (elapsed = 03:25:05).

-I created a text project with extracts from the normal build project –containing mainly the parts where the build failed with “Illegal operation ...” –delete folder,create folder ,SVN export sources to that folder.
Always this project went ok

-I started the normal build –very rare is working fine ,usually it fails with Illegal operation but now i noticed it appeared on some other step also (set macro value):
3/11/2010 3:51:09 AM: Building project step 'SET TIME_END Macro'...
Error creating custom action 'Set Macro': Illegal operation attempted on a registry key that has been marked for deletion.
And not only here:
3/11/2010 3:16:33 AM: Building project step 'Create build base folder'...
Error creating custom action 'Create Folder': Illegal operation attempted on a registry key that has been marked for deletion.

Other times the normal build remains frozen at a “Run program ” step where msxl.exe is ran:
3/11/2010 1:23:42 AM: Building project step 'add solution result'...
C:\Program Files (x86)\VisBuildPro7\Tools\msxsl.exe "C:\Reports\BuildsOutput\10.1.2019.0\results.xml" "C:\Builds\ff\Install\VBP\Processing\AddSolutionRes ult.xslt" -o "C:\Reports\BuildsOutput\10.1.2019.0\addedResults.x ml" "buildLabel"="10.1.2019.0" "solutionName"="SystemMonitoringAndManagement/SystemMonitoringAndManagement.sln" "status"="Success" "duration"="438" "output"="\\FF-DEV-BLD01\Reports\BuildsOutput\10.1.2019.0\SystemMonit oringAndManagement_SystemMonitoringAndManagement.s ln.txt"

Or remains frozen at a step of type Make VS.Net :
29/10/2010 4:16:09 AM: Building project step 'Build current project-Mixed Platforms'...
Pre-processing...


I do not know how to make a project to send it to you for reproduction of the issue –I expected the test project with SVN export will fail also because it contains the steps failing in normal build –but it went ok
Anyway –I would not be able to send even this test project because it implies exporting the sources which is not allowed to be given outside of our company

It is interesting though to see these facts:
-before this machine was installed with W2003 Server and from time to time the build used to froze unexpectedly
-then it was installed Win Server 2008 R2 and it appeared from time to time the issue with “Illegal operation “ and also from time to time the frozen issue –but both more often than before when Win2003 server was installed
-sometimes the build went ok –howcome is this possible?Why is not failing constantly?

I do not know what to do more ,problem is we cannot use this machine for build ,right now i am copying the build results from a machine located in other env where i have no issues at all.
But I need to make this machine working on this environment also ,this is just temporary workaround

kinook
11-02-2010, 03:08 PM
We'd like to know why it fails/hangs at all. The error messages indicate strange problems in the COM (Component Object Model) layer, where CoCreateInstance for any component starts failing with bizarre errors.

We've built the build.bld project on Win2003, Win2008, and Win7 virtual machines for days on end, and have not been able to reproduce any hangs or errors.

So you were able to reproduce a failure with the build.bld we attached earlier? How long did the project run before it hung? At least there other machines where the problem doesn't occur?

teognost
11-03-2010, 08:23 AM
Yes-I caught an error with the sample project you sent me(just slightly modified).Error message is not Illegal operation but something else but I suspect the issue are related.I attached the log file for this test project-it started on 2/11/2010 11:40:41 PM ,failed on 3/11/2010 3:05:45 AM.The problem appears on our Sydney build machine.
I have another build machine on Prague-never had any issues(no hanging or failing).
One more thing -I noticed another issue on Sydney build machine -other VBP project launched as scheduled task fails randomly with the message:

3/11/2010 7:32:56 AM: -------------------- Starting Build: 'C:\Program Files (x86)\VisBuildPro7\UpdateDBSettingToolFolder.bld' --------------------
The evaluation version is limited to 50 steps.
3/11/2010 7:32:56 AM: Build ended (elapsed = 00:00:00).

This is strange because VBP is registered properly on this machine.After rebooting the machine -task is executed ok without any re-registration.

Maybe this is related with the other issues -any it is a problem for me as the task is not executed at all.

kinook
11-03-2010, 10:55 AM
I don't know if it's related to this problem, but we have had a few reports of VBP reverting to eval mode when starting from a scheduled task, which were resolved by using an alternate registration method (see http://www.kinook.com/Forum/showthread.php?threadid=4713).

teognost
11-03-2010, 11:45 AM
I followed the instructions from your link -will see if it helps with all the issues or just with the one regarding switch to evaluation mode

teognost
11-03-2010, 12:13 PM
well-it failed again with illegal operation:
4/11/2010 4:09:00 AM: Building project step 'File version'...
Error creating custom action 'Run Program': Illegal operation attempted on a registry key that has been marked for deletion.
4/11/2010 4:09:00 AM: Building failure step 'Send Generic Mail-step failure'...
Error creating custom action 'Send Mail': Illegal operation attempted on a registry key that has been marked for deletion.
4/11/2010 4:09:00 AM: Building failure step 'Send Gen Mail-failure of failure step'...
Error creating custom action 'Send Mail': Illegal operation attempted on a registry key that has been marked for deletion.
4/11/2010 4:09:00 AM: Build ended (elapsed = 00:19:12).

teognost
11-04-2010, 01:48 PM
any suggestion about what to do next in order to have build working ?

kinook
11-04-2010, 02:05 PM
I'm not sure. We have built the build.bld sample continuously for several days on a Windows Server 2008 R2 Datacenter machine (clean install + VBP 7.7, Windows Update disabled, VMware guest) and have not encountered any errors or hangs. There must be something unique about this machine that is a factor somehow. We would need to be able to reproduce the problem to investigate further. Could you try it on a different machine or give us access to the problem machine?

teognost
11-05-2010, 06:07 AM
tks for answer ,will speak with managers and let you know how should we do it ...

teognost
12-01-2010, 10:42 AM
I prepared a different machine -virtual also -same OS as the first one (W2008Server R2 X64).
The problem appeared again but this time on a different step:
2/12/2010 2:29:33 AM: Building project step 'Create versions.txt'...
2/12/2010 2:29:33 AM: Building project step 'File version'...
Error creating custom action 'Run Program': Illegal operation attempted on a registry key that has been marked for deletion.
2/12/2010 2:29:33 AM: Building failure step 'Send Generic Mail-step failure'...
Error creating custom action 'Send Mail': Illegal operation attempted on a registry key that has been marked for deletion.
2/12/2010 2:29:33 AM: Building failure step 'Send Gen Mail-failure of failure step'...
Error creating custom action 'Send Mail': Illegal operation attempted on a registry key that has been marked for deletion.
2/12/2010 2:29:33 AM: Build ended (elapsed = 00:14:10).

teognost
01-12-2011, 01:52 PM
Hello again
I had some other tasks so I put on hold this issue.
Now I decided to install a fresh OS on this virtual machine
This time I used W2003Server R2 SP2 .
I see the errors like "Illegal operation attempted on a reg key ..." are gone.
The only problem is the old one I used to have -from time to time the build remains frozen at a step of "Make VS.Net" type.
I have installed VBP version 7.7
I tried even to uninstall the Antivirus running on this machine but it did not help
Could you please advise what else should I do to have this working ok ?

kinook
01-12-2011, 02:27 PM
I'm not sure. We've also tested a lot on Win2003 R2 SP2 and haven't had any hangs. We would need to be able to reproduce the problem in order to investigate further.

teognost
06-20-2012, 02:44 PM
I have the same issue on a new build machine.
After some research I found the resolution:

http://blogs.msdn.com/b/distributedservices/archive/2009/11/06/a-com-server-application-may-stop-working-on-windows-server-2008.aspx

Resolution
As a workaround it may be necessary to disable this feature which is the default behavior. The policy setting 'Do not forcefully unload the user registry at user logoff' counters the default behavior of Windows 2008. When enabled, Windows 2008 does not forcefully unload the registry and waits until no other processes are using the user registry before it unloads it.

The policy can be found in the group policy editor (gpedit.msc)
Computer Configuration->Administrative Templates->System-> UserProfiles
Do not forcefully unload the user registry at user logoff

Change the setting from “Not Configured” to “Enabled”, which disables the new User Profile Service feature.