Pex error during the team build ( TFS 2010 Build ) Test Run Error.
-
2011年12月5日 下午 07:07
We have been using pex and moles for unitest with TFS2010. Lately the pex and moles started to crash randomly during the test run. We couldn't reproduce this error on developer machine. Crash only happen on Team build servers. We are using version en_visual_studio_2010_pex_0.94.51006.1_power_tools_x86_exe_593303
Here is the error from build log.
Test Run Error.
Passed 270
Total 270
Results file: C:\Builds\8\Release-1\Dev_DotNetFramework_Integration\TestResults\XXX_XXX_2011-11-23 02_11_07_Any CPU_Debug.trx
Test Settings: XXXX
Run has the following issue(s):
[host] An unhandled exception System.NullReferenceException occured while executing the unit tests
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Messaging.MessageEnumerator.Close()
at System.Messaging.MessageEnumerator.Dispose(Boolean disposing)
at System.Messaging.MessageEnumerator.Finalize()
[agent] host process exited with exit code 255 - 0xff. See http://research.microsoft.com/en-us/um/redmond/projects/pex/wiki/Exit Codes for more information.
Here are event logs from build server
1)
Application: Microsoft.Moles.VsHost.x86.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
Stack:
at System.Messaging.MessageEnumerator.Close()
at System.Messaging.MessageEnumerator.Dispose(Boolean)
at System.Messaging.MessageEnumerator.Finalize()
2)Faulting application name: Microsoft.Moles.VsHost.x86.exe, version: 0.94.51006.1, time stamp: 0x4cacdf4d
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x12f17f38
Faulting process id: 0x3768
Faulting application start time: 0x01cca9af1bf4bcf3
Faulting application path: c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.Moles.VsHost.x86.exe
Faulting module path: unknown
Report Id: 85a87b73-15a2-11e1-a29e-78e7d1906fee
所有回覆
-
2011年12月7日 上午 03:11版主
Hello Nakees,
Thanks for your post.
I am sorry that I am not very familiar with Pex and Moles. And as you descripted above you just have the errors on the TFS Build machine, could you please check out if you have installed Pex and Moles on the TFS build machine as well? As we know in order to have TFS build machine build or run our projects successfully, we need to have the same software environment on the build machine as our client machine.
Thanks,
Vicky Song [MSFT]
MSDN Community Support | Feedback to us
- 已標示為解答 Vicky SongModerator 2011年12月15日 上午 09:28
- 已取消標示為解答 Nakees 2012年3月13日 下午 06:00
- 已標示為解答 Nakees 2012年3月13日 下午 06:00
- 已取消標示為解答 Nakees 2012年3月13日 下午 06:02
-
2012年3月13日 下午 06:00
Hi Vicky,
Just to clarify, we do have pex and moles installed on the build machine. Our developers and build machines have isame exact version of tools installed. When we queue builds it succeed sometimes but randomly pex and moles will crash and force the build to fail. It is really annoyiong for the developers since we have gated checkin policy.
Any help will be appreciated.
Thanks
- 已編輯 Nakees 2012年3月13日 下午 06:00
-
2012年3月16日 下午 08:26
Windows error reporting capture the following error when pex and moles cashes during the tfs build on the build server
Version=1 EventType=CLR20r3 EventTime=129764000300066423 ReportType=2 Consent=1 ReportIdentifier=f4258a68-6f9e-11e1-bdf0-78e7d1906fee IntegratorReportIdentifier=f4258a67-6f9e-11e1-bdf0-78e7d1906fee WOW64=1 Response.type=4 Sig[0].Name=Problem Signature 01 Sig[0].Value=microsoft.moles.vshost.x86.exe Sig[1].Name=Problem Signature 02 Sig[1].Value=0.94.0.0 Sig[2].Name=Problem Signature 03 Sig[2].Value=4cacdf4d Sig[3].Name=Problem Signature 04 Sig[3].Value=System.Messaging Sig[4].Name=Problem Signature 05 Sig[4].Value=4.0.0.0 Sig[5].Name=Problem Signature 06 Sig[5].Value=4ba1e1a3 Sig[6].Name=Problem Signature 07 Sig[6].Value=bf Sig[7].Name=Problem Signature 08 Sig[7].Value=0 Sig[8].Name=Problem Signature 09 Sig[8].Value=System.NullReferenceException DynamicSig[1].Name=OS Version DynamicSig[1].Value=6.1.7601.2.1.0.274.10 DynamicSig[2].Name=Locale ID DynamicSig[2].Value=1033 DynamicSig[22].Name=Additional Information 1 DynamicSig[22].Value=0a9e DynamicSig[23].Name=Additional Information 2 DynamicSig[23].Value=0a9e372d3b4ad19135b953a78882e789 DynamicSig[24].Name=Additional Information 3 DynamicSig[24].Value=0a9e DynamicSig[25].Name=Additional Information 4 DynamicSig[25].Value=0a9e372d3b4ad19135b953a78882e789 UI[2]=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.Moles.VsHost.x86.exe UI[5]=Check online for a solution (recommended) UI[6]=Check for a solution later (recommended) UI[7]=Close UI[8]=Microsoft.Moles.VsHost stopped working and was closed UI[9]=A problem caused the application to stop working correctly. Windows will notify you if a solution is available. UI[10]=&Close LoadedModule[0]=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.Moles.VsHost.x86.exe LoadedModule[1]=C:\Windows\SysWOW64\ntdll.dll LoadedModule[2]=C:\Windows\SYSTEM32\MSCOREE.DLL LoadedModule[3]=C:\Windows\syswow64\KERNEL32.dll LoadedModule[4]=C:\Windows\syswow64\KERNELBASE.dll LoadedModule[5]=C:\Windows\syswow64\ADVAPI32.dll LoadedModule[6]=C:\Windows\syswow64\msvcrt.dll LoadedModule[7]=C:\Windows\SysWOW64\sechost.dll LoadedModule[8]=C:\Windows\syswow64\RPCRT4.dll LoadedModule[9]=C:\Windows\syswow64\SspiCli.dll LoadedModule[10]=C:\Windows\syswow64\CRYPTBASE.dll LoadedModule[11]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll LoadedModule[12]=C:\Windows\syswow64\SHLWAPI.dll LoadedModule[13]=C:\Windows\syswow64\GDI32.dll LoadedModule[14]=C:\Windows\syswow64\USER32.dll LoadedModule[15]=C:\Windows\syswow64\LPK.dll LoadedModule[16]=C:\Windows\syswow64\USP10.dll LoadedModule[17]=C:\Windows\system32\IMM32.DLL LoadedModule[18]=C:\Windows\syswow64\MSCTF.dll LoadedModule[19]=C:\PROGRA~2\Sophos\SOPHOS~1\SOPHOS~1.DLL LoadedModule[20]=C:\Windows\syswow64\PSAPI.DLL LoadedModule[21]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll LoadedModule[22]=C:\Windows\system32\MSVCR100_CLR0400.dll LoadedModule[23]=C:\Windows\syswow64\ole32.dll LoadedModule[24]=C:\Program Files (x86)\Common Files\Microsoft Shared\ExtendedReflection\0.94.51006.1\bin\Microsoft.ExtendedReflection.ClrMonitor.X86.dll LoadedModule[25]=C:\Windows\syswow64\CLBCatQ.DLL LoadedModule[26]=C:\Windows\syswow64\OLEAUT32.dll LoadedModule[27]=C:\Windows\system32\VERSION.dll LoadedModule[28]=C:\Windows\system32\CRYPTSP.dll LoadedModule[29]=C:\Windows\system32\rsaenh.dll LoadedModule[30]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll LoadedModule[31]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\nlssorting.dll LoadedModule[32]=C:\Windows\syswow64\urlmon.dll LoadedModule[33]=C:\Windows\syswow64\WININET.dll LoadedModule[34]=C:\Windows\syswow64\iertutil.dll LoadedModule[35]=C:\Windows\syswow64\CRYPT32.dll LoadedModule[36]=C:\Windows\syswow64\MSASN1.dll LoadedModule[37]=C:\Windows\system32\ntmarta.dll LoadedModule[38]=C:\Windows\syswow64\WLDAP32.dll LoadedModule[39]=C:\Windows\syswow64\SHELL32.dll LoadedModule[40]=C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll LoadedModule[41]=C:\Windows\syswow64\WS2_32.dll LoadedModule[42]=C:\Windows\syswow64\NSI.dll LoadedModule[43]=C:\Windows\system32\RpcRtRemote.dll LoadedModule[44]=C:\Windows\system32\VSCover100.DLL LoadedModule[45]=C:\Windows\system32\MSVCR100.dll LoadedModule[46]=C:\Windows\system32\MSVCP100.dll LoadedModule[47]=C:\Windows\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll LoadedModule[48]=C:\Windows\system32\mswsock.dll LoadedModule[49]=C:\Windows\System32\wshtcpip.dll LoadedModule[50]=C:\Windows\System32\wship6.dll LoadedModule[51]=C:\Windows\system32\NLAapi.dll LoadedModule[52]=C:\Windows\system32\napinsp.dll LoadedModule[53]=C:\Windows\system32\DNSAPI.dll LoadedModule[54]=C:\Windows\System32\winrnr.dll LoadedModule[55]=C:\Windows\system32\apphelp.dll LoadedModule[56]=C:\Windows\system32\shfolder.dll LoadedModule[57]=C:\Windows\system32\profapi.dll LoadedModule[58]=C:\Windows\system32\bcrypt.dll LoadedModule[59]=C:\Windows\system32\pcwum.dll LoadedModule[60]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\perfcounter.dll LoadedModule[61]=C:\Windows\system32\pdh.dll LoadedModule[62]=C:\Windows\system32\aspnet_counters.dll LoadedModule[63]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_perf.dll LoadedModule[64]=C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_perf.dll LoadedModule[65]=C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_d09154e044272b9a\MSVCR80.dll LoadedModule[66]=c:\Program Files (x86)\Microsoft SQL Server\100\Shared\instapi10.dll LoadedModule[67]=C:\Windows\syswow64\CFGMGR32.dll LoadedModule[68]=C:\Windows\system32\rasman.dll LoadedModule[69]=C:\Windows\system32\tapi32.dll LoadedModule[70]=C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll LoadedModule[71]=C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\comctl32.dll LoadedModule[72]=C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_72d18a4386696c80\gdiplus.dll LoadedModule[73]=C:\Windows\system32\WindowsCodecs.dll LoadedModule[74]=C:\Windows\system32\dwmapi.dll LoadedModule[75]=C:\Windows\system32\netfxperf.dll LoadedModule[76]=C:\Windows\system32\mqrt.dll LoadedModule[77]=C:\Windows\system32\mqsec.dll LoadedModule[78]=C:\Windows\system32\NETAPI32.dll LoadedModule[79]=C:\Windows\system32\netutils.dll LoadedModule[80]=C:\Windows\system32\srvcli.dll LoadedModule[81]=C:\Windows\system32\wkscli.dll LoadedModule[82]=C:\Windows\system32\LOGONCLI.DLL LoadedModule[83]=C:\Windows\system32\SAMCLI.DLL LoadedModule[84]=C:\Windows\system32\DSROLE.DLL LoadedModule[85]=C:\Windows\system32\Secur32.dll LoadedModule[86]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll FriendlyEventName=Stopped working ConsentKey=CLR20r3 AppName=Microsoft.Moles.VsHost AppPath=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.Moles.VsHost.x86.exe
nakees
-
2012年4月12日 下午 03:41
Finally figured it out and posting it if someone faced the same problem.
If any of the unitests has thread.sleep and uses Pex mocking framework then asking for trouble. Removing all the unit test which has sleeping threads fixes the issue.
nakees
- 已標示為解答 Nakees 2012年4月12日 下午 03:42

