Bamboo builds fail with Error "mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file"
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Bamboo builds are failing with the below error and as a result, build artefacts are not getting published and are erroring out:
build 01-Aug-2022 17:28:10 mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file "simcontrol\project_reducer\projectReducer.exe". The requested operation cannot be performed on a file with a user-mapped section open.
Environment
Issue is seen on 8.0.4
Diagnosis
Build fails while generating artifacts, below error can be seen in the logs:
build 01-Aug-2022 17:28:10 mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file "simcontrol\project_reducer\projectReducer.exe". The requested operation cannot be performed on a file with a user-mapped section open.
Cause
The error means that a portion of a file is locked, and this is usually caused by Antivirus software.
Solution
- Please disable the antivirus completely on the remote agent. If disabling the antivirus is not an option, please try setting exclusions on .exe files in the remote agent.
- Post disabling the antivirus please restart your agent machine so that we are sure there is no other process keeping a lock on this file. Rerun the build after restarting.
Note
In some cases, you may have multiple anti-viruses running on the remote agent. Try disabling all of them and then perform a clean restart of the agent machine.