Skip to content

Flaky test failure: msbuild.binlog file lock (IOException: being used by another process) #54817

Closed

Description

@Evangelink

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1467980
Build error leg or test failing: Various tests (file lock on msbuild.binlog during test execution)
Pull request: #54729

Error Message

DO NOT USE JSON BELOW IF THIS IS A BUILD BREAK otherwise build analysis will allow pull requests to merge that break the build worse. For a build break, do not use this issue form. Make a regular new issue.

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "",
  "ErrorPattern": "System\\.IO\\.IOException : The process cannot access the file '.*msbuild\\.binlog' because it is being used by another process\\.",
  "BuildRetry": true,
  "ExcludeConsoleLog": false
}

Details

Error message

System.IO.IOException : The process cannot access the file '/datadisks/disk1/work/AA09096E/w/AEB00993/uploads/AEB00993-e-msbuild.binlog' because it is being used by another process.

Stack trace

at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
   at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
   at Microsoft.NET.TestFramework.Commands.TestCommand.Execute(IEnumerable`1 args) in /_/test/Microsoft.NET.TestFramework/Commands/TestCommand.cs:line 227
   at Microsoft.DotNet.Cli.Utils.ExponentialRetry.ExecuteAsyncWithRetry[T](Func`1 action, Func`2 shouldStopRetry, Int32 maxRetryCount, Func`1 timer, String taskDescription) in /_/src/Cli/Microsoft.DotNet.Cli.Utils/ExponentialRetry.cs:line 46
   at Microsoft.DotNet.Cli.Utils.ExponentialRetry.ExecuteWithRetry[T](Func`1 action, Func`2 shouldStopRetry, Int32 maxRetryCount, Func`1 timer, String taskDescription) in /_/src/Cli/Microsoft.DotNet.Cli.Utils/ExponentialRetry.cs:line 68
   at Microsoft.NET.TestFramework.Commands.TestCommand.Execute(String[] args) in /_/test/Microsoft.NET.TestFramework/Commands/TestCommand.cs:line 147
   at Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink1.ILLink_links_simple_app_without_analysis_warnings_and_it_runs(String targetFramework) in /_/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs:line 134
   at InvokeStub_GivenThatWeWantToRunILLink1.ILLink_links_simple_app_without_analysis_warnings_and_it_runs(Object, Span`1)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1467980
Error message validated: [System\.IO\.IOException : The process cannot access the file '/datadisks/disk1/work/.*-msbuild.binlog' because it is being used by another process\.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/17/2026 3:34:51 PM UTC

Report

Build Repository Test Pull Request
1467980 dotnet/sdk Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink1.ILLink_links_simple_app_without_analysis_warnings_and_it_runs #54729

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 1 1

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1467980
Error message validated: [System\.IO\.IOException : The process cannot access the file '/datadisks/disk1/work/.*-msbuild.binlog' because it is being used by another process\.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/17/2026 3:34:51 PM UTC

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1467980
Error message validated: [System\.IO\.IOException : The process cannot access the file '.*msbuild\.binlog' because it is being used by another process\.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/17/2026 7:16:45 PM UTC

Report

Build Repository Test Pull Request
1469529 dotnet/sdk Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink1.ILLink_links_simple_app_without_analysis_warnings_and_it_runs #52302
1469315 dotnet/sdk Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink1b.ILLink_IsTrimmable_metadata_can_override_attribute #54744
1469283 dotnet/sdk Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink1.ILLink_links_simple_app_without_analysis_warnings_and_it_runs
1469216 dotnet/sdk Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink1b.ILLink_errors_fail_the_build #54722
1467980 dotnet/sdk Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink1.ILLink_links_simple_app_without_analysis_warnings_and_it_runs #54729

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
5 5 5

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1467980
Error message validated: [System\.IO\.IOException : The process cannot access the file '/datadisks/disk1/work/.*-msbuild.binlog' because it is being used by another process\.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/17/2026 3:34:51 PM UTC

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1467980
Error message validated: [System\.IO\.IOException : The process cannot access the file '.*msbuild\.binlog' because it is being used by another process\.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/17/2026 7:16:45 PM UTC

Activity

  1. changed the title [-]Test flakiness[/-] [+]Test flakiness with Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink1.ILLink_links_simple_app_without_analysis_warnings_and_it_runs[/+] on Jun 17, 2026
  2. github-actions commented on Jun 17, 2026

    @github-actions
    Contributor

    This Known Build Error has had 0 hits in the past month and has been labeled stale. It will be auto-closed in 7 days if the hit count remains at 0. Add the keep-open label to prevent auto-closure.

  3. changed the title [-]Test flakiness with Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink1.ILLink_links_simple_app_without_analysis_warnings_and_it_runs[/-] [+]Flaky test failure: msbuild.binlog file lock (IOException: being used by another process)[/+] on Jun 17, 2026
  4. MichaelSimons commented on Jun 17, 2026

    @MichaelSimons
    Member

    Pattern Updated

    Updated the Known Build Error pattern to cover both Linux and Windows paths:

    Old pattern (Linux-only):

    System\.IO\.IOException : The process cannot access the file '/datadisks/disk1/work/.*-msbuild.binlog' because it is being used by another process\.
    

    New pattern (cross-platform):

    System\.IO\.IOException : The process cannot access the file '.*msbuild\.binlog' because it is being used by another process\.
    

    Other changes:

    • BuildRetry changed from false to true — this is a transient file lock issue that typically clears on retry
    • Title and leg description generalized (not specific to one test)

    Triggered by: Build 1468429 (PR #54804) — same IOException but on Windows (C:\h\w\...\msbuild.binlog)

    Validation:

    • ✅ Pattern matches the Windows error from build 1468429
    • ✅ Pattern matches the original Linux error
    • ✅ Pattern did not match 3 recent passing builds (good specificity)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions