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

IOException when building from file share #7967

Open
1 task done
murphyjawow opened this issue Jan 22, 2024 · 5 comments
Open
1 task done

IOException when building from file share #7967

murphyjawow opened this issue Jan 22, 2024 · 5 comments
Labels

Comments

@murphyjawow
Copy link

WiX Version

4.03

.NET or MSBuild or Visual Studio Version

Visual Studio 2022 Version 17.8.5

HeatWave Version

1.0.2.1

Windows Version

Win10 22H2 19045.3930

Repro Repo

N/A

Repro Steps

Hello,

The source code for my WiX project resides on a file share that is protected by Carbon Black and is replicated across sites via Windows Distributed File System (DFS). Ever since our company implemented DFS on the file share, my builds of of a WiX solution with 2 .MSI projects and 3 custom actions has been failing intermittently. The build will eventually succeed, but lately it has been taking upwards of 20 attempts to successfully build it via the file share.

The error is as follows (with the project-specific paths replaced with more anonymous ones):

1>Error : Unexpected error : System.IO.IOException: Failed to save resource. Error 5
1> at WixToolset.Dtf.Resources.ResourceCollection.Save(String file) in D:\a\wix\wix\src\dtf\WixToolset.Dtf.Resources\ResourceCollection.cs:line 210
1> at WixToolset.Dtf.MakeSfxCA.MakeSfxCA.Build(String output, String sfxDll, IList`1 inputs, TextWriter log) in D:\a\wix\wix\src\dtf\WixToolset.Dtf.MakeSfxCA\MakeSfxCA.cs:line 219
1> at WixToolset.Dtf.MakeSfxCA.MakeSfxCA.Main(String[] args) in D:\a\wix\wix\src\dtf\WixToolset.Dtf.MakeSfxCA\MakeSfxCA.cs:line 87
1>K:\packages\WixToolset.Dtf.CustomAction.4.0.3\build\WixToolset.Dtf.CustomAction.targets(87,5): error MSB3073: The command ""K:\packages\WixToolset.Dtf.CustomAction.4.0.3\build..\tools\WixToolset.Dtf.MakeSfxCA.exe" "K:\GeneralSetup\obj\x86\Release\GeneralSetup.CA.dll" "K:\packages\WixToolset.Dtf.CustomAction.4.0.3\build..\tools\x86\SfxCA.dll" "K:\GeneralSetup\obj\x86\Release\GeneralSetup.dll" "@k:\GeneralSetup\obj\x86\Release\GeneralSetup.CA.rsp"" exited with code 1.

I see that previous issues, like #6882 , exist and have already been addressed -- but it looks like that particular project group would have went out with WiX 4.0, which I upgraded to today in an effort to fix this issue.

The project will build with a 100% success rate when built from the local computer, so I suspect that the "Retry file operations" logic may need to be adjusted?

Actual Result

The build fails w/ "Unexpected error : System.IO.IOException: Failed to save resource. Error 5" around 95% of the time.

Expected Result

The build succeed

Acknowledgements

  • I acknowledge that this is a fully completed bug report. It is not a question or attempt to get help debugging my issue (because those should be sent to Discussions).
@barnson
Copy link
Member

barnson commented Jan 26, 2024

If you're getting failures in a package (not custom action) build, please attach a binlog.

@murphyjawow
Copy link
Author

Hi Bob, I'm sorry for the miscommunication. I should've stated in the original post that I only encounter this issue with the Custom Action builds.

@chrpai
Copy link

chrpai commented Jan 30, 2024

This is a very unusual arrangement. The performance, concurrency and availability issues hurts my head.

Could you use something like robocopy /mir to mirror the files locally and do the build?

@murphyjawow
Copy link
Author

It would be possible to do the build locally and then transfer the products of the build back to the share, but it would be cumbersome and inconsistent with our other build processes, given that all of our other projects reside and are built on the share.

@chrpai
Copy link

chrpai commented Jan 31, 2024

I haven't seen that pattern since the 1990s. I'd say 99% of the world uses some sort of source control system (typically Git) and a CI/CD system that stores the built artifact in some sort of artifact repository. Now you could set up automation to mirror the source and the artifacts to the sites but to use this DFS share they way you are using it... well I'd be lobbying for big change. I've been a CM lead for many companies huge and small over the years fwiw.

That's all I'll say on this subject. If this is something WiX can fix, great. But I wouldn't really expect any windows process, especially a heavy IO build process, to work flawlessly against a network share. Networks just aren't that reliable to be honest.

@barnson barnson added dtf and removed triage labels Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants