Nunit-console: NUnit Console 3.11.1: System.Net.Sockets.SocketException existing connection was forcibly closed by the remote host

Created on 18 Jun 2020  路  3Comments  路  Source: nunit/nunit-console

Hello,

Since a couple of days we got this issue while running our automated GUI tests (different testsuites in different dll's) with Nunit Console (v3.11.1) on our TeamCity CI (see attached screenshot):

[Step 4/6] Error message is logged
[09:24:04][Step 4/6] Unhandled Exception: NUnit.Engine.NUnitEngineException: Remote test agent exited with non-zero exit code -1073741571
[09:24:04][Step 4/6] at NUnit.Engine.Services.TestAgency.OnAgentExit(Process process, Guid agentId) in C:\Users\Chris\Documents\git\nunit-console\src\NUnitEngine\nunit.engine\Services\TestAgency.cs:line 260
[09:24:04][Step 4/6] at NUnit.Engine.Services.TestAgency.<>c__DisplayClass7_0.b__0(Object sender, EventArgs e) in C:\Users\Chris\Documents\git\nunit-console\src\NUnitEngine\nunit.engine\Services\TestAgency.cs:line 149
[09:24:04][Step 4/6] at System.Diagnostics.Process.OnExited()
[09:24:04][Step 4/6] at System.Diagnostics.Process.RaiseOnExited()
[09:24:04][Step 4/6] at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[09:24:04][Step 4/6] at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[09:24:04][Step 4/6] at System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(Object state, Boolean timedOut)

[Step 4/6] 1) Error :
[09:24:07][Step 4/6] System.Net.Sockets.SocketException : An existing connection was forcibly closed by the remote host
[09:24:07][Step 4/6] --SocketException
[09:24:07][Step 4/6] An existing connection was forcibly closed by the remote host

  • Version of the NUnit Engine/Console: 3.11.1
  • All versions of the NUnit Framework in use: 3.12

We already run our tests for a month with v3.11.1 and since a couple days, this is popping-up. Any idea why this is happening? We had also socket exceptions when using Nunit Console 3.8 in the past but when we updated to next version, these were resolved. If you any pointers, I want to hear them.

confirm bug

Most helpful comment

Hi @kevinheyvaert,

The -1073741571 code is used for when the process exists with a Stack Overflow. This is one kind of issue that NUnit can't capture, although in the next version of the NUnit Console, you should get a nicer error message when it happens, thanks to some work by @mano-si. 馃檪

In terms of diagnosing the problem, if it's been happening for a couple of days, I'd expect the problem to have been introduced by a change to the tests. You might also want to try running with the --labales=Before option, which will output a label before each test is run, and hopefully help you pinpoint the problematic test.

All 3 comments

Hi @kevinheyvaert,

The -1073741571 code is used for when the process exists with a Stack Overflow. This is one kind of issue that NUnit can't capture, although in the next version of the NUnit Console, you should get a nicer error message when it happens, thanks to some work by @mano-si. 馃檪

In terms of diagnosing the problem, if it's been happening for a couple of days, I'd expect the problem to have been introduced by a change to the tests. You might also want to try running with the --labales=Before option, which will output a label before each test is run, and hopefully help you pinpoint the problematic test.

@ChrisMaddock I will give it a shot. If I find the issue, I will close the issue myself :). I wanted to leave it open just in case :)

@ChrisMaddock thanks for the info. It was a stackoverflow that was recenlty introduced by a change in the tests. Was not seen in the code review. I looking forward for the newer version with the extended error messages :)

Was this page helpful?
0 / 5 - 0 ratings