Skip to content

[BUG]: Update fails with "Checksum validation failed" #5262

@cremor

Description

@cremor

What happened?

I'm trying to update my self-hosted agent. I'm using the "Update all agents" button in the agent pool web UI on Azure DevOps for this. The process hangs at "Downloading 4.258.1 agent".

The agent logs show a checksum problem.

Versions

Agent version 4.255.0
Windows Server 2019 1809

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

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

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

No response

Version controll system

No response

Relevant log output

[2025-07-07 06:06:30Z INFO Agent] Refresh message received, kick-off selfupdate background process.
[2025-07-07 06:06:30Z INFO SelfUpdater] Version '4.258.1' of 'agent' package available in server.
[2025-07-07 06:06:30Z INFO SelfUpdater] Current running agent version is 4.255.0
[2025-07-07 06:06:30Z INFO SelfUpdater] An update is available.
[2025-07-07 06:06:30Z INFO Terminal] WRITE LINE: Agent update in progress, do not shutdown agent.
[2025-07-07 06:06:30Z INFO MessageListener] Sent GetAgentMessage to keep alive agent 23, session '09c0547e-028c-4131-99ba-eed9aabeb223'.
[2025-07-07 06:06:30Z INFO Terminal] WRITE LINE: Downloading 4.258.1 agent
[2025-07-07 06:06:31Z INFO HostContext] Well known directory 'Bin': 'C:\agent\bin'
[2025-07-07 06:06:31Z INFO HostContext] Well known directory 'Root': 'C:\agent'
[2025-07-07 06:06:31Z INFO HostContext] Well known directory 'Work': 'D:\agent\_work'
[2025-07-07 06:06:31Z INFO SelfUpdater] Attempt 1: save latest agent into D:\agent\_work\_update\agent1.zip.
[2025-07-07 06:06:31Z INFO SelfUpdater] Download agent: begin download
[2025-07-07 06:06:32Z INFO SelfUpdater] Download agent: finished download
[2025-07-07 06:06:34Z WARN SelfUpdater] Checksum validation failed
  Expected hash: '4f854d13f57af8a7ddb2b034945fc84751fc77281ab18beae12b40e8f76974e9'
  Actual hash: 'CF-9C-FC-3D-C7-A1-08-6B-72-0D-CF-37-0B-1C-B0-87-6C-BB-2B-A6-2B-75-ED-EB-DF-6A-17-94-57-B8-4E-EA'
[2025-07-07 06:06:34Z INFO SelfUpdater] Attempt 2: save latest agent into D:\agent\_work\_update\agent1.zip.
[2025-07-07 06:06:34Z INFO SelfUpdater] Download agent: begin download
[2025-07-07 06:06:35Z INFO SelfUpdater] Download agent: finished download
[2025-07-07 06:06:36Z WARN SelfUpdater] Checksum validation failed
  Expected hash: '4f854d13f57af8a7ddb2b034945fc84751fc77281ab18beae12b40e8f76974e9'
  Actual hash: 'CF-9C-FC-3D-C7-A1-08-6B-72-0D-CF-37-0B-1C-B0-87-6C-BB-2B-A6-2B-75-ED-EB-DF-6A-17-94-57-B8-4E-EA'
[2025-07-07 06:06:36Z INFO SelfUpdater] Attempt 3: save latest agent into D:\agent\_work\_update\agent1.zip.
[2025-07-07 06:06:36Z INFO SelfUpdater] Download agent: begin download
[2025-07-07 06:06:37Z INFO SelfUpdater] Download agent: finished download
[2025-07-07 06:06:39Z WARN SelfUpdater] Checksum validation failed
  Expected hash: '4f854d13f57af8a7ddb2b034945fc84751fc77281ab18beae12b40e8f76974e9'
  Actual hash: 'CF-9C-FC-3D-C7-A1-08-6B-72-0D-CF-37-0B-1C-B0-87-6C-BB-2B-A6-2B-75-ED-EB-DF-6A-17-94-57-B8-4E-EA'
[2025-07-07 06:06:39Z INFO Agent] Ignore agent update exception. System.Threading.Tasks.TaskCanceledException: Agent package checksum validation failed.
There are possible reasons why this happened:
  1) The agent package was compromised.
  2) The agent package was not fully downloaded or was corrupted during the download process.
You can skip checksum validation for the agent package by setting the environment variable DISABLE_HASH_VALIDATION=true
   at Microsoft.VisualStudio.Services.Agent.Listener.SelfUpdater.DownloadLatestAgent(CancellationToken token) in D:\a\_work\1\s\src\Agent.Listener\SelfUpdater.cs:line 340
   at Microsoft.VisualStudio.Services.Agent.Listener.SelfUpdater.SelfUpdate(AgentRefreshMessage updateMessage, IJobDispatcher jobDispatcher, Boolean restartInteractiveAgent, CancellationToken token) in D:\a\_work\1\s\src\Agent.Listener\SelfUpdater.cs:line 82
   at Microsoft.VisualStudio.Services.Agent.Listener.Agent.RunAsync(AgentSettings settings, Boolean runOnce) in D:\a\_work\1\s\src\Agent.Listener\Agent.cs:line 424
[2025-07-07 06:06:39Z INFO Agent] Auto update task finished at backend, there is no available agent update needs to apply, continue message queue looping.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions