c# - Sonar-msbuild-runner exits with 255 error, Faulting CLR Module -


problem

so, ran strange problem. our situation. have 2 builds servers attached 2 tfs collections

  • collection has build server windows server 2012 r2 installed on
  • collection b has build server windows server 2008 r2 installed on it.

both servers have sonar-msbuild-runner installed. works fine on collection when executing analysis on build server on collection b following error.

faulting application name: sonarqube.msbuild.postprocessor.exe, version: .9.0.0, time stamp: 0x559d2baa faulting module name: clr.dll, version: 4.0.30319.34209, time stamp: 0x5348961e exception code: 0xc0000005 fault offset: 0x00002d1f faulting process id: 0x11ec faulting application start time: 0x01d0bf9ffbb54cab faulting application path: d:\pathtosolutionfolderonbuildserver\.sonarqube\bin\sonarqube.msbuild.postprocessor.exe faulting module path: c:\windows\microsoft.net\framework\v4.0.30319\clr.dll report id: 3cbfce4b-2b93-11e5-b84b-0050569a7ef0 

we retrieved latest version on github , added additional logging find out line caused error. this line causing problems.

reproducing

i able reproduce error on local dev machine runs windows 7 following code. when setting debug point on first assert , trying access projectname property hovering mouse on it, cause entire visual studio crash.

[testmethod] public void testmethod1() {     using (tfsteamprojectcollection collection = tfsteamprojectcollectionfactory.getteamprojectcollection(new uri("http://tfs-url:8080/tfs/collectionname/")))     {         ibuildserver buildserver = collection.getservice<ibuildserver>();         string uri = "vstfs:///build/build/4238";         var builduri = new uri(uri);         ibuilddetail build = buildserver.getminimalbuilddetails(builduri);         string projectname = build.teamproject;          itestmanagementservice tcm = collection.getservice<itestmanagementservice>();         itestmanagementteamproject testproject = tcm.getteamproject(projectname);          assert.isnotnull(testproject);         ibuildcoverage[] coverage = testproject.coverageanalysismanager.querybuildcoverage(uri, coveragequeryflags.modules);         assert.istrue(coverage.length > 0);      } } 

resulting in following error message:

faulting application name: devenv.exe, version: 12.0.31101.0, time stamp: 0x54548724 faulting module name: clr.dll, version: 4.0.30319.34209, time stamp: 0x5348961e exception code: 0xc0000005 fault offset: 0x004c2b43 faulting process id: 0x10e4 faulting application start time: 0x01d0bf9ec962fde0 faulting application path: c:\program files (x86)\microsoft visual studio 12.0\common7\ide\devenv.exe faulting module path: c:\windows\microsoft.net\framework\v4.0.30319\clr.dll report id: 14f6496d-2b9b-11e5-a293-083e8ea0a055 

possible solution

the error leads straight kb article. unable apply fix.

additionally removed .net framework 4 because version 4.5.2 installed , thought might conflict each other. 4.5.1 , 4.5.2 still installed on build server , unsure solution be. final option, considering upgrading build server on collection b windows server 2012 r2 see if solution.

edit: fixed

due internal error, vs2013 deinstalled. had reinstall vs2013 , update 4. upgrade version 1.0. seems have fixed problem. code coverage available in our web portal.

this looks problem / bug in .net framework, investigated. if can upgrade windows server 2012 r2 best way go forward.

there workaround on part of sonar-msbuild-runner: can disable code coverage retrieval setting environment variable: sq_skiplegacycodecoverage. if sonarqube not code coverage data ...


Comments