Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File used by another process #33956

Closed
lewing opened this issue Jul 12, 2023 · 2 comments · Fixed by #34307
Closed

File used by another process #33956

lewing opened this issue Jul 12, 2023 · 2 comments · Fixed by #34307
Assignees
Labels

Comments

@lewing
Copy link
Member

lewing commented Jul 12, 2023

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=336802
Build error leg or test failing: Microsoft.DotNet.Cli.New.IntegrationTests.TemplateDiscoveryTests.CanRunDiscoveryTool
Pull request: #33949

Error Message

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

{
  "ErrorMessage": "error : The process cannot access the file",
  "ErrorPattern": "",
  "BuildRetry": true,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=336802
Error message validated: error : The process cannot access the file
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/12/2023 4:34:24 PM UTC

Report

Build Definition Test Pull Request
370415 dotnet/sdk Microsoft.DotNet.Cli.New.IntegrationTests.TemplateDiscoveryTests.CanRunDiscoveryTool #34522
365401 dotnet/sdk Microsoft.DotNet.Cli.New.IntegrationTests.DotnetNewDetailsTest.CanDisplayDetails_LocalPackage #34476
361227 dotnet/sdk Microsoft.DotNet.Cli.New.IntegrationTests.TemplateDiscoveryTests.CanRunDiscoveryTool #34412
344492 dotnet/sdk Microsoft.NET.Restore.Tests.dll.WorkItemExecution #34076

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 1 4
@marcpopMSFT
Copy link
Member

https://dev.azure.com/dnceng-public/public/_test/analytics?definitionId=101&contextType=build
The test failed 5 times in the last month with this failure. Poking through the file lock, it appears because multiple tests build the same project but output to a different pack location. It's the obj folder that stays locked between different test runs.

@joeloff @MiYanni as template owners. I see a few options for fixing this:

  1. shut down dotnet in between tests (not sure what side effect this would have)
  2. Set the BaseIntermediateOutputPath for each build of the shared project (only fixes 10 tests and doesn't affect locking of the build output, only the obj)
  3. Copy the test project to a unique folder before building (this is what the other sdk tests do but there isn't existing infrastructure for this in the templating tests).

Opinions?

@MiYanni
Copy link
Member

MiYanni commented Jul 28, 2023

If the output for each is in the different location, I'd just do the same for the intermediary files too. So, option 2 in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants