Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

3 Pages<123
nCrunch poor Test Performance and lost in "Analyse Assembly"
Oliver Stark
#41 Posted : Wednesday, March 8, 2023 7:47:46 AM(UTC)
Rank: Member

Groups: Registered
Joined: 2/1/2023(UTC)
Posts: 26
Location: Germany

Thanks: 1 times
Remco;16521 wrote:
Could you try the build below and show me the error message it gives you? I haven't yet managed to understand this problem, so I've added some extra diagnostic details in the build to try and figure it out. For some reason, the API responsible for allocating shared memory is failing. Maybe this build will tell us why.

at first i did not realize a difference in the exception, but here it is:

System.Exception: MapViewOfFile error (size = 19514): 8
at nCrunch.TestRuntime.RuntimeSharedMemory.handlePossibleError(IntPtr handle, String apiDetails)
at nCrunch.TestRuntime.RuntimeSharedMemory..ctor(String name, Int32 bufferSizeInBytes)
at nCrunch.TestRuntime.SharedExecutionMap..ctor(ExecutionMapSpecification specification, String hostProcessId)
at nCrunch.TestRuntime.SharedMemoryExecutionDataRecorder.initialise()
at nCrunch.TestRuntime.SharedMemoryExecutionDataRecorder..ctor(ExecutionMapSpecification[] mapSpecifications)
at nCrunch.TestExecution.TestRunnerThread.()
at nCrunch.TestExecution.TestRunnerThread.()
Remco
#42 Posted : Wednesday, March 8, 2023 9:49:42 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Thanks for sharing this. The Win32 error code kicked up by the API is ERROR_NOT_ENOUGH_MEMORY. How much available memory do you have at the time the test starts running?
Oliver Stark
#43 Posted : Wednesday, March 8, 2023 10:19:04 AM(UTC)
Rank: Member

Groups: Registered
Joined: 2/1/2023(UTC)
Posts: 26
Location: Germany

Thanks: 1 times
available memory is about 14-16GB, so should be plenty.
not sure why, but i was able to "catch" a more detailed stack trace on a failing test- maybe it helps:

System.Exception: MapViewOfFile error (size = 19514): 8
at nCrunch.TestRuntime.RuntimeSharedMemory.handlePossibleError(IntPtr handle, String apiDetails)
at nCrunch.TestRuntime.RuntimeSharedMemory..ctor(String name, Int32 bufferSizeInBytes)
at nCrunch.TestRuntime.SharedExecutionMap..ctor(ExecutionMapSpecification specification, String hostProcessId)
at nCrunch.TestRuntime.SharedMemoryExecutionDataRecorder.initialise()
at nCrunch.TestRuntime.SharedMemoryExecutionDataRecorder..ctor(ExecutionMapSpecification[] mapSpecifications)
at nCrunch.TestExecution.TestRunnerThread.()
at nCrunch.TestExecution.TestRunnerThread.()
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at nCrunch.TestRuntime.MemoryOperator.ReadUInt32Array(Int32 offset, UInt32 arraySize)
at nCrunch.TestRuntime.SharedExecutionMap.GetExecutionMap()
at nCrunch.TestRuntime.SharedMemoryExecutionDataRecorder.PullExecutionMaps()
at nCrunch.TestExecution.ExecutingTest.Finish(Boolean isSuccess, String exceptionString, TimeSpan executionTime, Boolean writeExceptionToOutput, Boolean addExecutionTime)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.testFinished(EndTestMessage message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at nCrunch.TestRuntime.MemoryOperator.ReadUInt32Array(Int32 offset, UInt32 arraySize)
at nCrunch.TestRuntime.SharedExecutionMap.GetExecutionMap()
at nCrunch.TestRuntime.SharedMemoryExecutionDataRecorder.PullExecutionMaps()
at nCrunch.TestExecution.ExecutingTest.Finish(Boolean isSuccess, String exceptionString, TimeSpan executionTime, Boolean writeExceptionToOutput, Boolean addExecutionTime)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.suiteFinished(EndSuiteMessage message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at nCrunch.TestRuntime.TestExecutionMap..ctor(Int32 testPositionInMasterMap, Int32 numberOfLineMarkers, Int32 numberOfClasses)
at nCrunch.TestExecution.ComponentTestExecutionMap.CreateExecutionMapForTest(TestName testIdentifier)
at nCrunch.TestExecution.TestExecutionMapSet.CreateExecutionMapsForTest(TestName test)
at nCrunch.TestExecution.ExecutingTest.Start()
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.testStarted(NUnit3Message message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at nCrunch.TestRuntime.MemoryOperator.ReadUInt32Array(Int32 offset, UInt32 arraySize)
at nCrunch.TestRuntime.SharedExecutionMap.GetExecutionMap()
at nCrunch.TestRuntime.SharedMemoryExecutionDataRecorder.PullExecutionMaps()
at nCrunch.TestExecution.ExecutingTest.Finish(Boolean isSuccess, String exceptionString, TimeSpan executionTime, Boolean writeExceptionToOutput, Boolean addExecutionTime)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.testFinished(EndTestMessage message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at nCrunch.TestRuntime.MemoryOperator.ReadUInt32Array(Int32 offset, UInt32 arraySize)
at nCrunch.TestRuntime.SharedExecutionMap.GetExecutionMap()
at nCrunch.TestRuntime.SharedMemoryExecutionDataRecorder.PullExecutionMaps()
at nCrunch.TestExecution.ExecutingTest.Discontinue()
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.testStarted(NUnit3Message message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at nCrunch.TestRuntime.MemoryOperator.ReadUInt32Array(Int32 offset, UInt32 arraySize)
at nCrunch.TestRuntime.SharedExecutionMap.GetExecutionMap()
at nCrunch.TestRuntime.SharedMemoryExecutionDataRecorder.PullExecutionMaps()
at nCrunch.TestExecution.ExecutingTest.Finish(Boolean isSuccess, String exceptionString, TimeSpan executionTime, Boolean writeExceptionToOutput, Boolean addExecutionTime)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.suiteFinished(EndSuiteMessage message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at nCrunch.TestRuntime.MemoryOperator.ReadUInt32Array(Int32 offset, UInt32 arraySize)
at nCrunch.TestRuntime.SharedExecutionMap.GetExecutionMap()
at nCrunch.TestRuntime.SharedMemoryExecutionDataRecorder.PullExecutionMaps()
at nCrunch.TestExecution.ExecutingTest.Finish(Boolean isSuccess, String exceptionString, TimeSpan executionTime, Boolean writeExceptionToOutput, Boolean addExecutionTime)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.suiteFinished(EndSuiteMessage message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
Remco
#44 Posted : Wednesday, March 8, 2023 10:33:36 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Is this a 32-bit test environment? Note that for historical reasons, NCrunch will default to 32-bit environments when running tests for assemblies that are built for AnyCPU. You can override this behaviour by forcing the test project to build to x64 or by setting the Use CPU Architecture setting.
Oliver Stark
#45 Posted : Tuesday, March 21, 2023 11:24:49 AM(UTC)
Rank: Member

Groups: Registered
Joined: 2/1/2023(UTC)
Posts: 26
Location: Germany

Thanks: 1 times
hi and sorry for the late response.
i was able to tweak the project settings so that the issue went away. thanks for pinpointing to the AnyCPU setting.
Users browsing this topic
Guest
3 Pages<123
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.048 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download