HG cannot pull repo on build server - System.Web.HttpException in HgLab log

Arsène von Wyss's Avatar

Arsène von Wyss

01 Mar, 2016 05:53 PM

In about 90% (estimated) of the cases, the build server fails to pull larger repos. The following is in the build log (truncated with [...]):

Failed to perform checkout on agent: 'hg --config ui.interactive=False pull --config extensions.progress= --config "progress.format=topic number" --config progress.delay=0 --config progress.assume-tty=True https://admin:******@code.sirius.ch/hg/seram/web'; command failed.
stderr: 
changesets 319
[...]
changesets 4536

manifests  371/4562
[...]
manifests 4420/4562                                                                               

files   14/6267
[...]
files 3916/6267

transaction abort!

rollback completed
abort: stream ended unexpectedly (got 0 bytes, expected 4)

At the same time, the following error is recorded on the server:

<error errorId="0e3a29c9-6735-4a03-bfca-6dc859729dbb" application="/LM/W3SVC/1/ROOT" host="SVBS001" type="System.Web.HttpException" message="Server cannot set status after HTTP headers have been sent." source="System.Web" detail="System.Web.HttpException (0x80004005): Server cannot set status after HTTP headers have been sent.&#xD;&#xA;   at System.Web.HttpResponse.set_StatusCode(Int32 value)&#xD;&#xA;   at HgSharp.Server.HgHttpServer.ReportException(Exception e, HttpStatusCode statusCode, String response) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 171&#xD;&#xA;   at HgSharp.Server.HgHttpServer.ExecuteCommand(HgHttpCommandContext context, String command) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 218&#xD;&#xA;   at HgSharp.Server.HgHttpServer.ProcessRequest(HttpContextBase httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 201&#xD;&#xA;   at HgLab.Areas.Project.Controllers.HgController.Hg(String projectSlug, String repositoryName) in d:\projects\hglab\src\HgLab\Areas\Project\Controllers\HgController.cs:line 204&#xD;&#xA;   at lambda_method(Closure , ControllerBase , Object[] )&#xD;&#xA;   at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)&#xD;&#xA;   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)&#xD;&#xA;   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)&#xD;&#xA;   at System.Web.Mvc.ControllerActionInvoker.&lt;&gt;c__DisplayClass15.&lt;InvokeActionMethodWithFilters&gt;b__12()&#xD;&#xA;   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)&#xD;&#xA;   at System.Web.Mvc.ControllerActionInvoker.&lt;&gt;c__DisplayClass15.&lt;&gt;c__DisplayClass17.&lt;InvokeActionMethodWithFilters&gt;b__14()&#xD;&#xA;   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)&#xD;&#xA;   at System.Web.Mvc.ControllerActionInvoker.&lt;&gt;c__DisplayClass15.&lt;&gt;c__DisplayClass17.&lt;InvokeActionMethodWithFilters&gt;b__14()&#xD;&#xA;   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)&#xD;&#xA;   at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)&#xD;&#xA;   at System.Web.Mvc.Controller.ExecuteCore()&#xD;&#xA;   at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)&#xD;&#xA;   at HgLab.Core.Framework.Web.HgLabControllerBase.Execute(RequestContext requestContext) in d:\projects\hglab\src\HgLab.Core\Framework\Web\HgLabControllerBase.cs:line 100&#xD;&#xA;   at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)&#xD;&#xA;   at System.Web.Mvc.MvcHandler.&lt;&gt;c__DisplayClass6.&lt;&gt;c__DisplayClassb.&lt;BeginProcessRequest&gt;b__5()&#xD;&#xA;   at System.Web.Mvc.Async.AsyncResultWrapper.&lt;&gt;c__DisplayClass1.&lt;MakeVoidDelegate&gt;b__0()&#xD;&#xA;   at System.Web.Mvc.Async.AsyncResultWrapper.&lt;&gt;c__DisplayClass8`1.&lt;BeginSynchronous&gt;b__7(IAsyncResult _)&#xD;&#xA;   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()&#xD;&#xA;   at System.Web.Mvc.MvcHandler.&lt;&gt;c__DisplayClasse.&lt;EndProcessRequest&gt;b__d()&#xD;&#xA;   at System.Web.Mvc.SecurityUtil.&lt;GetCallInAppTrustThunk&gt;b__0(Action f)&#xD;&#xA;   at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)&#xD;&#xA;   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)&#xD;&#xA;   at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)&#xD;&#xA;   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()&#xD;&#xA;   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)" user="admin" time="2016-02-26T00:46:13.3994529Z" statusCode="500">
  <serverVariables>
  [...]
  </serverVariables>
  <queryString>
    <item name="cmd">
      <value string="getbundle" />
    </item>
  </queryString>
</error>

This happens on different repositories, but seems to be more frequent on larger ones.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

21 Aug, 2019 09:07 AM
30 Jul, 2019 08:59 PM
31 May, 2019 02:29 PM
26 Nov, 2018 01:47 PM
16 Nov, 2018 07:51 PM

 

06 Nov, 2018 04:30 PM
24 Oct, 2018 07:57 AM
20 Jul, 2018 11:07 PM
05 Jul, 2018 10:53 AM
27 May, 2018 01:33 AM
14 May, 2018 03:38 PM