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

SelfContained_NetCoreApp3_CompatMode_SingleFile_APITests failed in CI #43917

Closed
ericstj opened this issue Oct 27, 2020 · 7 comments
Closed

SelfContained_NetCoreApp3_CompatMode_SingleFile_APITests failed in CI #43917

ericstj opened this issue Oct 27, 2020 · 7 comments

Comments

@ericstj
Copy link
Member

ericstj commented Oct 27, 2020

System.ComponentModel.Win32Exception : Text file busy

Stack trace
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Microsoft.DotNet.Cli.Build.Framework.Command.Start() in /_/src/installer/tests/TestUtils/Command.cs:line 199
   at Microsoft.DotNet.Cli.Build.Framework.Command.Execute(Boolean fExpectedToFail) in /_/src/installer/tests/TestUtils/Command.cs:line 239
   at Microsoft.DotNet.Cli.Build.Framework.Command.Execute() in /_/src/installer/tests/TestUtils/Command.cs:line 171
   at AppHost.Bundle.Tests.SingleFileApiTests.SelfContained_NetCoreApp3_CompatMode_SingleFile_APITests() in /_/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/SingleFileApiTests.cs:line 50

Similar to #42101, #43316, #38530, and #35068

Runfo Tracking Issue: selfcontained_netcoreapp3_compatmode_singlefile_apitests

Build Definition Kind Run Name

Build Result Summary

Day Hit Count Week Hit Count Month Hit Count
0 0 0
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-Single-File untriaged New issue has not been triaged by the area owner labels Oct 27, 2020
@ghost
Copy link

ghost commented Oct 27, 2020

Tagging subscribers to this area: @agocke, @vitek-karas
See info in area-owners.md if you want to be subscribed.

@ericstj
Copy link
Member Author

ericstj commented Oct 27, 2020

Lots of similar issues to this. All seem to have a common symptom: "Text file busy"

https://runfo.azurewebsites.net/search/tests/?bq=definition%3Aruntime++started%3A%7E3&tq=message%3A%22Text+file+busy%22

I believe this is Unix's version of "file in use" for the executable you're trying to launch. From what I read, this should only happen when a write handle is open on the executable. This could be a product bug like someone forgot to Dispose a handle. The tests are seeing it because they are writing the exe in proc then running it immediately afterwards. We should examine the bundler codepath to make sure it disposes all files.

Edit: product code seems to protect against this:

using (BinaryWriter writer = new BinaryWriter(File.OpenWrite(bundlePath)))

Perhaps these tests are running concurrently with the same path?

@agocke
Copy link
Member

agocke commented Oct 27, 2020

Yeah this is interesting, we should investigate.

@agocke agocke removed the untriaged New issue has not been triaged by the area owner label Oct 27, 2020
@agocke agocke added this to the 6.0.0 milestone Oct 27, 2020
@v-haren
Copy link

v-haren commented Oct 29, 2020

failed again in job: runtime 20201028.64

failed test: AppContext_Native_Search_Dirs_Contains_Bundle_Dir

Installer-coreclr-Linux_x64-Release

Error message

System.ComponentModel.Win32Exception : Text file busy


Stack trace
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Microsoft.DotNet.Cli.Build.Framework.Command.Start() in /_/src/installer/tests/TestUtils/Command.cs:line 199
   at Microsoft.DotNet.Cli.Build.Framework.Command.Execute(Boolean fExpectedToFail) in /_/src/installer/tests/TestUtils/Command.cs:line 239
   at Microsoft.DotNet.Cli.Build.Framework.Command.Execute() in /_/src/installer/tests/TestUtils/Command.cs:line 171
   at AppHost.Bundle.Tests.SingleFileApiTests.AppContext_Native_Search_Dirs_Contains_Bundle_Dir() in /_/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/SingleFileApiTests.cs:line 98

@v-haren
Copy link

v-haren commented Nov 2, 2020

similar issues failed in job: runtime 20201101.47

failed test: Bundle_extraction_is_reused

Installer-coreclr-Linux_musl_x64-Release

Error message

System.ComponentModel.Win32Exception : Text file busy


Stack trace
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Microsoft.DotNet.Cli.Build.Framework.Command.Start() in /_/src/installer/tests/TestUtils/Command.cs:line 199
   at AppHost.Bundle.Tests.BundleExtractToSpecificPath.Bundle_extraction_is_reused() in /_/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleExtractToSpecificPath.cs:line 96

@danmoseley
Copy link
Member

I hit this again on Installer-coreclr-Linux_x64-Release

@agocke

@agocke
Copy link
Member

agocke commented Aug 23, 2021

Dup of #53587

@agocke agocke closed this as completed Aug 23, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants