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

Notification

Icon
Error

Internal errors with console tool v2.9.0.3
GreenMoose
#1 Posted : Tuesday, September 16, 2014 6:53:14 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 503

Thanks: 142 times
Was thanked: 66 time(s) in 64 post(s)
Using NCrunch Console Tool v2.9.0.3

I have a couple of issues trying to get our solution up and running with NCrunch on TeamCity. Below is NCRunch errors I noticed when running the console tool explicitly via command prompt.


When running via TC I get a lot of failed tests with non-helping output nor stacktrace as
Code:

------ Stdout: -------
 text

(When looking at build log it seems it cannot find a required file, I guess this is part of setup routine but it would be helpful if that could be determined via test output and not requiring download full build log to investigate).

Try 1 was cancelled and then Try 2 was run until end.

Code:

Try 1:

-----------

[08:09:46.6693-Core-5] Queuing 6563 tests for passive execution
[08:09:48.52-Core-5] Connection established with remote grid node at XX1
[08:09:48.5327-?-6] Ceasing to send messages because of an error (was the connection closed?): System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
   at #=qJRtWiOE9n_ChZS6TU8lhrY9_ixUiLewq9zeI6uerlsJb5qUFMG9lczVjeCXhghkD658r9mlBYNc5TVO4tVvLeQ==.Write(Byte[] #=qV0lUaTgJCAG$0m2Apg9tfQ==, Int32 #=qMTrEl7cD_P8MUPwytKpdkA==, Int32 #=ql9gfOqj_MCRtajpI
TZuOPw==)
   at nCrunch.Core.Grid.Connectivity.Zlib.DeflateStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at nCrunch.Core.Grid.Connectivity.BidirectionalStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
   at nCrunch.Core.Grid.Connectivity.BidirectionalStream.#=qIVDS7Br6sVyv7cfmHq2N_w==.EndInvoke(IAsyncResult #=qXAFrS0xzmmWVBCZnqFRuyA==)
   at nCrunch.Core.Grid.Connectivity.BidirectionalStream.EndWrite(IAsyncResult asyncResult)
   at nCrunch.Core.Grid.Connectivity.GridMessageSender.#=qTMwzEjhOEo5KW8THbtP2FA==(IAsyncResult #=q1y52wOdnmyb7iWt$UVMmZw==)
[08:09:48.5327-?-9] Ceasing to send messages because of an error (was the connection closed?): System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
   at #=qJRtWiOE9n_ChZS6TU8lhrY9_ixUiLewq9zeI6uerlsJb5qUFMG9lczVjeCXhghkD658r9mlBYNc5TVO4tVvLeQ==.Write(Byte[] #=qV0lUaTgJCAG$0m2Apg9tfQ==, Int32 #=qMTrEl7cD_P8MUPwytKpdkA==, Int32 #=ql9gfOqj_MCRtajpI
TZuOPw==)
   at nCrunch.Core.Grid.Connectivity.Zlib.DeflateStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at nCrunch.Core.Grid.Connectivity.BidirectionalStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
   at nCrunch.Core.Grid.Connectivity.BidirectionalStream.#=qIVDS7Br6sVyv7cfmHq2N_w==.EndInvoke(IAsyncResult #=qXAFrS0xzmmWVBCZnqFRuyA==)
   at nCrunch.Core.Grid.Connectivity.BidirectionalStream.EndWrite(IAsyncResult asyncResult)
   at nCrunch.Core.Grid.Connectivity.GridMessageSender.#=qTMwzEjhOEo5KW8THbtP2FA==(IAsyncResult #=q1y52wOdnmyb7iWt$UVMmZw==)
[08:09:48.5327-?-10] Ceasing to send messages because of an error (was the connection closed?): System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
   at #=qJRtWiOE9n_ChZS6TU8lhrY9_ixUiLewq9zeI6uerlsJb5qUFMG9lczVjeCXhghkD658r9mlBYNc5TVO4tVvLeQ==.Write(Byte[] #=qV0lUaTgJCAG$0m2Apg9tfQ==, Int32 #=qMTrEl7cD_P8MUPwytKpdkA==, Int32 #=ql9gfOqj_MCRtajpI
TZuOPw==)
   at nCrunch.Core.Grid.Connectivity.Zlib.DeflateStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at nCrunch.Core.Grid.Connectivity.BidirectionalStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
   at nCrunch.Core.Grid.Connectivity.BidirectionalStream.#=qIVDS7Br6sVyv7cfmHq2N_w==.EndInvoke(IAsyncResult #=qXAFrS0xzmmWVBCZnqFRuyA==)
   at nCrunch.Core.Grid.Connectivity.BidirectionalStream.EndWrite(IAsyncResult asyncResult)
   at nCrunch.Core.Grid.Connectivity.GridMessageSender.#=qTMwzEjhOEo5KW8THbtP2FA==(IAsyncResult #=q1y52wOdnmyb7iWt$UVMmZw==)
[08:09:48.5766-?-9] Ceasing to send messages because of an error (was the connection closed?): System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
   at #=qJRtWiOE9n_ChZS6TU8lhrY9_ixUiLewq9zeI6uerlsJb5qUFMG9lczVjeCXhghkD658r9mlBYNc5TVO4tVvLeQ==.Write(Byte[] #=qV0lUaTgJCAG$0m2Apg9tfQ==, Int32 #=qMTrEl7cD_P8MUPwytKpdkA==, Int32 #=ql9gfOqj_MCRtajpI
TZuOPw==)
   at nCrunch.Core.Grid.Connectivity.Zlib.DeflateStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at nCrunch.Core.Grid.Connectivity.BidirectionalStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
   at nCrunch.Core.Grid.Connectivity.BidirectionalStream.#=qIVDS7Br6sVyv7cfmHq2N_w==.EndInvoke(IAsyncResult #=qXAFrS0xzmmWVBCZnqFRuyA==)
   at nCrunch.Core.Grid.Connectivity.BidirectionalStream.EndWrite(IAsyncResult asyncResult)
   at nCrunch.Core.Grid.Connectivity.GridMessageSender.#=qTMwzEjhOEo5KW8THbtP2FA==(IAsyncResult #=q1y52wOdnmyb7iWt$UVMmZw==)
[08:09:48.6401-Core-5] Connection established with remote grid node at XX2
[08:09:48.6586-Core-5] Connection established with remote grid node at XX3
[08:09:48.6889-Core-5] Connection established with remote grid node at XX4
^CTerminate batch job (Y/N)? y

-----------

Try 2:

-----------
[08:14:18.6192-LocalTestExecutionTask-23] ERROR (Internal): System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at nCrunch.Module.NUnit.Integration.NUnitExplicitTestRepository.<.ctor>b__0(PendingTest t)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at nCrunch.Module.NUnit.Integration.NUnitExplicitTestRepository..ctor(IList`1 testsToRun, Factory testNameFactory)
   at nCrunch.Module.NUnit.Integration.NUnitTestFramework.<>c__DisplayClass3.<RunTests>b__2()
   at nCrunch.TestExecution.TestExecutionMonitor.PerformMonitoredTestExecution(Action testExecutionAction)
   at nCrunch.Module.NUnit.Integration.NUnitTestFramework.RunTests(TestOutput output, TestExecutionMapSet testMapSet, TestExecutionParameters parameters)
   at nCrunch.TestExecution.TestRunnerThread.#=qfPs5BtsnGXNLGtpNJK4HCQ==()

-----------

[08:17:55.8648-LocalTestExecutionTask-9] ERROR (Internal): System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at nCrunch.Module.NUnit.Integration.NUnitExplicitTestRepository.<.ctor>b__0(PendingTest t)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at nCrunch.Module.NUnit.Integration.NUnitExplicitTestRepository..ctor(IList`1 testsToRun, Factory testNameFactory)
   at nCrunch.Module.NUnit.Integration.NUnitTestFramework.<>c__DisplayClass3.<RunTests>b__2()
   at nCrunch.TestExecution.TestExecutionMonitor.PerformMonitoredTestExecution(Action testExecutionAction)
   at nCrunch.Module.NUnit.Integration.NUnitTestFramework.RunTests(TestOutput output, TestExecutionMapSet testMapSet, TestExecutionParameters parameters)
   at nCrunch.TestExecution.TestRunnerThread.#=qfPs5BtsnGXNLGtpNJK4HCQ==()

[08:17:56.4693-Core-11] Sending processing instructions to node XX3 for 1 tasks

-----------

[08:18:29.0018-Core-13] ERROR (Internal): System.Net.Sockets.SocketException (0x80004005): The requested name is valid, but no data of the requested type was found
   at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)
   at System.Net.Sockets.Socket.DoDnsCallback(IAsyncResult result, MultipleAddressConnectAsyncResult context)
   at System.Net.Sockets.Socket.BeginConnect(String host, Int32 port, AsyncCallback requestCallback, Object state)
   at System.Net.Sockets.TcpClient.BeginConnect(String host, Int32 port, AsyncCallback requestCallback, Object state)
   at nCrunch.Core.Grid.Connectivity.NetworkClient.Connect(GridAddress address, SerializationContract serializationContract)
   at nCrunch.Client.Grid.GridClient.#=ql9qSzE0MwYBtcPxG7Ug9cJIjkEST1daFq94bviqfEI0=.#=qxTxC5qmbZI6IDX5vwlRWFUunmdjoDIH4_z1$h_QQbbs=()
   


Remco
#2 Posted : Tuesday, September 16, 2014 9:20:05 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Hi, thanks for sharing these issues.

Most of these exceptions are connectivity related. NCrunch does log connectivity problems (as sometimes these are useful), and it will automatically try to reconnect if it encounters them. Can you confirm that you have clear and trouble-free connectivity from the machine running the console tool into the grid nodes it is configured to use?

The two NUnit exceptions are very interesting. I've been trying to analyse what kind of situation could cause this, and I wonder if it may be due to an inconsistency with how these tests were discovered vs how they were run. What do you usually use for your 'Framework utilisation type for NUnit' setting? Have you ever had this set to StaticAnalysis? Does clearing out the NCrunch cache make any difference here?
GreenMoose
#3 Posted : Tuesday, September 16, 2014 9:29:26 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 503

Thanks: 142 times
Was thanked: 66 time(s) in 64 post(s)
Remco;6397 wrote:
Can you confirm that you have clear and trouble-free connectivity from the machine running the console tool into the grid nodes it is configured to use?

They do connect fine when using same config via vstudio and seems to be temporary.

Remco;6397 wrote:
What do you usually use for your 'Framework utilisation type for NUnit' setting? Have you ever had this set to StaticAnalysis?

I already use static for the console tool in order to try speed things up (and not get 1 test "per test case" to more closely be comparable with TC's built in NUnit test runner).

Remco;6397 wrote:
Does clearing out the NCrunch cache make any difference here?

I have not reproduced the errors but if they appear again and are consistent I will try this and see if it helps. The cache is reused between console tool executions I guess? So to get proper test results I should always clear this when running on e.g. TeamCity? (I was confused the test output said it was running several thousands of tests while in fact I only had selected 6 via engine mode to be run, which was also reflected in console output).
Remco
#4 Posted : Tuesday, September 16, 2014 10:18:13 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
GreenMoose;6398 wrote:
I already use static for the console tool in order to try speed things up (and not get 1 test "per test case" to more closely be comparable with TC's built in NUnit test runner).


This is very interesting. The NUnit exceptions suggest that the console tool is trying to run these tests using DynamicAnalysis. The setting can only be applied at solution level, so there must be an inconsistency somewhere. Let me know if you find a way to reproduce this.

GreenMoose;6398 wrote:

I have not reproduced the errors but if they appear again and are consistent I will try this and see if it helps. The cache is reused between console tool executions I guess? So to get proper test results I should always clear this when running on e.g. TeamCity? (I was confused the test output said it was running several thousands of tests while in fact I only had selected 6 via engine mode to be run, which was also reflected in console output).


The console tool will re-use the cached the data in the same way as the VS addin. There's normally no need to clean it out, and doing so will greatly increase the overall time to perform an execution run. I merely wondered if the Static/Dynamic analysis issue could be related to stale data within the cache ... which is something that should be impossible, but was worth investigating to be sure.

Make sure that you choose the engine mode to run using the console tool command-line parameter. I don't think it will consider the engine mode you have/had selected in Visual Studio. The engine mode filter should prevent the tool from running tests that you've excluded.
1 user thanked Remco for this useful post.
GreenMoose on 9/16/2014(UTC)
Users browsing this topic
Guest
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.045 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download