Skip to content

[BUG]: Insufficient memory when publishing TestResults #21930

@TiltonJH

Description

@TiltonJH

New issue checklist

Task name

Publish Test Results

Task version

2.233.1

Issue Description

I run into an issue while publishing our test results:

##[warning]Failed to parse result files: Insufficient memory to continue the execution of the program.

We self-host the AzureDevOps Server and its build servers/agents.

We are running tests on our largest solution, which has 602 C# projects, and 223 of those are test projects.
Therefore, we generate 223 *.trx files. Merge test results is enabled. (If I understand this correctly, a merge happens anyway when we have over 100 results files.) The current sum of all 223 *.trx files is 5.176.789.421 byte.

Looking at what happens, the TestResultsPublisher.exe uses more and more memory until it reaches 4 GiB and then fails. Which does not come as a surprise, since this seems to run as an x86 application.

My first thought was to make the TestResultsPublisher.exe run as x64. But than I locked at the sum of size of all *.trx files. Am I right to assume that could not be uploaded to the server anyway? Isn't there a size limit of about 75MiB? Therefore, I am not sure if this is even technically a bug.

Any ideas on how to solve this?

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

Azure DevOps Server (Please specify exact version in the textbox below)

Azure DevOps Server Version (if applicable)

Azure DevOps Server 2022.2

Operation system

Windows Server 2022

Relevant log output

Starting: Publish Test Results
==============================================================================
Task         : Publish Test Results
Description  : Publish test results to Azure Pipelines
Version      : 2.233.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-test-results
==============================================================================
"C:\Program Files\dotnet\dotnet.exe" --version
8.0.419
E:\Source\01\_work\_tasks\PublishTestResults_0b0f01ed-7dde-43ff-9cbb-e48954daf9b1\2.233.1\modules\TestResultsPublisher.exe @E:\Source\01\_work\_temp\c4ccf190-2399-11f1-ba10-c36ff90387fa.txt
No Result Found to Publish 'E:\Source\01\_work\_temp\TestResults\user_agent_2026-03-19_14_34_35.trx'.
No Result Found to Publish 'E:\Source\01\_work\_temp\TestResults\user_agent_2026-03-19_14_35_06.trx'.
No Result Found to Publish 'E:\Source\01\_work\_temp\TestResults\user_agent_2026-03-19_14_35_18.trx'.
No Result Found to Publish 'E:\Source\01\_work\_temp\TestResults\user_agent_2026-03-19_14_35_21.trx'.
No Result Found to Publish 'E:\Source\01\_work\_temp\TestResults\user_agent_2026-03-19_14_35_41.trx'.
No Result Found to Publish 'E:\Source\01\_work\_temp\TestResults\user_agent_2026-03-19_14_36_48.trx'.
##[warning]Failed to parse result files:  Insufficient memory to continue the execution of the program.
Finishing: Publish Test Results

Full task logs with system.debug enabled

(That will not fit here.)

Repro steps

It's not yet a YAML build.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions