TFSBuildLab event log and administration GUI errors

Oct 12, 2007 at 5:59 PM
I have just completed an installation of TFSBuildLab onto our TFS app tier, with the database nicely set up down in the TFS data tier. The service seems to be starting up fine (I'm seeing the two expected events in the event log) but then begins streaming errors into the event log at a rate of approximately 10 per second. They appear to alternate between two forms:

10/12/2007 10:37:19 AM BuildManager.HandleSchedules: An exception occured ... System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Callista.BuildLab.Core.BuildService.ExtractInformationFromTeamBuildProjectFiles(Item bti, BuildType bt)
at Callista.BuildLab.Core.BuildService.ListBuildTypes(String teamProjectName)
at Callista.BuildLab.Core.TFS.ListTeamProjects()
at Callista.BuildLab.Core.BuildManager.HandleSchedules()

10/12/2007 10:38:00 AM BuildManager.HandleCleanup: An exception occured ... System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Callista.BuildLab.Core.BuildService.ExtractInformationFromTeamBuildProjectFiles(Item bti, BuildType bt)
at Callista.BuildLab.Core.BuildService.ListBuildTypes(String teamProjectName)
at Callista.BuildLab.Core.TFS.ListTeamProjects()
at Callista.BuildLab.Core.BuildManager.HandleCleanup()

Additionally, any attempt to connect from the administration GUI results in the following error from WCF:

System.ServiceModel.FaultException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at 0:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Callista.BuildLab.Core.IAdministration.ListTeamProjects()
at Callista.BuildLab.AdminClient.MainForm.InitializeControls()
at Callista.BuildLab.AdminClient.MainForm.MainForm_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


                            • Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Callista.BuildLab.AdminClient
Assembly Version: 1.0.2791.34228
Win32 Version: 1.0.2791.34228
CodeBase: file:///C:/Program%20Files/Callista/TfsBuildLab/Administration/Callista.BuildLab.AdminClient.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/System.Windows.Forms/2.0.0.0_b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/System/2.0.0.0_b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/System.Drawing/2.0.0.0_b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Callista.BuildLab.Core
Assembly Version: 1.0.2791.34183
Win32 Version: 1.0.2791.34183
CodeBase: file:///C:/Program%20Files/Callista/TfsBuildLab/Administration/Callista.BuildLab.Core.DLL
----------------------------------------
Microsoft.ReportViewer.WinForms
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.762
CodeBase: file:///C:/Program%20Files/Callista/TfsBuildLab/Administration/Microsoft.ReportViewer.WinForms.DLL
----------------------------------------
Microsoft.ReportViewer.Common
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.762
CodeBase: file:///C:/Program%20Files/Callista/TfsBuildLab/Administration/Microsoft.ReportViewer.Common.DLL
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/System.Configuration/2.0.0.0_b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/System.Xml/2.0.0.0_b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Web.Services
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/System.Web.Services/2.0.0.0_b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
System.ServiceModel
Assembly Version: 3.0.0.0
Win32 Version: 3.0.4506.30 (WAPRTM.004506-0030)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/System.ServiceModel/3.0.0.0_b77a5c561934e089/System.ServiceModel.dll
----------------------------------------
System.Runtime.Serialization
Assembly Version: 3.0.0.0
Win32 Version: 3.0.4506.30 (WAPRTM.004506-0030)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/System.Runtime.Serialization/3.0.0.0_b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
SMDiagnostics
Assembly Version: 3.0.0.0
Win32 Version: 3.0.4506.30 (WAPRTM.004506-0030)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/SMDiagnostics/3.0.0.0_b77a5c561934e089/SMDiagnostics.dll
----------------------------------------
Callista.BuildLab.Core.Model
Assembly Version: 1.0.2791.34169
Win32 Version: 1.0.2791.34169
CodeBase: file:///C:/Program%20Files/Callista/TfsBuildLab/Administration/Callista.BuildLab.Core.Model.DLL
----------------------------------------

Any thoughts?
Coordinator
Oct 12, 2007 at 7:42 PM
Hi Jeremy,

It seems you've found a bug, if it's possible I'd really like to take a look at one of your build script files. Altough I can fix this pretty fast anyway but since it has to do with duplicate entries either in the buildscript or workspacemappings that presents the problem we will end up with either picking the first found or the last one found for the data.

You should be able to get around it by see if you have any duplicated properties in your project file or any duplicated cloaks or maps in the workspace mapping.

As for the reason for the periodicy for the error it's due to the settings for how often we should perform the cleanup and scheduling.

Cheers, Peter
Oct 12, 2007 at 8:28 PM
Thanks for replying quickly, Peter.

We have 7 team build types, 6 of which use identical TFSBuild.proj files, the behaviour of which is controlled via differences in their associated TFSBuild.rsp and Workspacemapping.xml files. All of the Workspacemapping.xml files have just a single map entry in them. We have a number of cases where a given property appears within multiple property groups, where each group is controlled via Condition attributes. We also have a number of CreateProperty entries in the build projects.

Is TFSBuildLab looking for anything in particular? Or just enumerating properties?

It would be most helpful if TFSBuildLab's event log error and/or trace log output could include information regarding the build type it was processing at the time of the error as well as the key that was duplicated.
Coordinator
Oct 12, 2007 at 9:19 PM
No problems,

As for the problem it is solved but not checkin atm, I need to finnish a few other things (it will be ready tomorrow) first... Actually it has todo with your previous request for buildquantity :) But anyhow, what TfsBuildLab is looking for in the project file is all the available properties to enable support for overriding thoose in conjuction with a custom build step for a specific trigger (say you which to change what is actually run based on the contents of you changeset).

As for digging in on more info you always have the option to enable tracing as described in the configuration on the installation wiki page, this will give you everything you ask for except for which property has the problem in the next version it will tell you if it found a duplicate and skipped it when tracing :)

Sorry for any inconvience this may have cause for you guys. I'm off to get some beuty sleep now, but we'll work out someway of getting you up on the latest codebase smoothly tomorrow (dunno if you as working with this on a saturday though :) I will :)

/Peter
Oct 12, 2007 at 10:01 PM
Hehe, I hear ya. It's great to know that you guys are so actively working on TFSBuildLab! While we're of course looking to get TFSBuildLab up and running as soon as we can, I certainly understand that changes always take time. In any case, I won't be working on this further until Monday of next week anyway, so I'll tune back in then and see if you've had any luck getting a new build available.