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

Function build hangs if COREHOST_TRACE=1 #604

Open
vivlimmsft opened this issue Jan 12, 2023 · 7 comments
Open

Function build hangs if COREHOST_TRACE=1 #604

vivlimmsft opened this issue Jan 12, 2023 · 7 comments

Comments

@vivlimmsft
Copy link

If the environment variable COREHOST_TRACE is set to 1, building a function project hangs during the target _GenerateFunctionsPostBuild. The only way to stop it is to terminate msbuild.exe in Task Manager, when building in a terminal ctrl+c fails to actually stop it. The experience in VS is even worse, the build cannot be cancelled and blocks many actions including closing VS.

Removing COREHOST_TRACE or setting it to 0 seems to fix the issue. The hint I could find that this could have been causing the issue is this stackoverflow post: https://stackoverflow.com/a/66884272

#264 seems to be related, but it's from 2018 and hasn't been touched since 2019.

I'm running Win10 and tried both Microsoft.NET.SDK.Functions 4.1.3 and Microsoft.Azure.Functions.Worker.Sdk 1.7.0, both inside VS and using msbuild /bl from powershell.

@bhagyshricompany
Copy link

Thanks for the update will check and update you soon

@bhagyshricompany
Copy link

The issue you are experiencing is likely caused by the COREHOST_TRACE environment variable being set to 1, which causes the build process to hang. This is a known issue, and the recommended solution is to remove the variable or set it to 0. This should resolve the issue and allow you to build your function project without any issues. Additionally, you can also try to use the latest version of the SDKs, as there may have been updates that have resolved this issue.

@vivlimmsft
Copy link
Author

Yes, that's the workaround I already mentioned in my post. Is this the latest version of the Functions SDK? That's what I have installed.

Deadlocking the build indefinitely with no indication of what's wrong or how to fix it in the logs is a really bad experience.

@bhagyshricompany
Copy link

bhagyshricompany commented Jan 18, 2023

@vivlimmsft Deadlocking a build indefinitely with no indication of what is causing the issue or how to fix it in the logs can be a frustrating experience for developers. It can lead to wasted time and difficulty in identifying and resolving the problem. To improve this experience, it would be helpful to have detailed logs that provide information on what is causing the deadlock and possible solutions to fix it. Additionally, providing troubleshooting steps or documentation on how to handle similar issues in the future can help to mitigate the impact of future build deadlocks.
youcan try with latest sdk and share the output

@vivlimmsft
Copy link
Author

I said that I tried with 4.1.3, which is the newest SDK available on nuget.org. Is there somewhere else I can get a newer one?
Exactly what feedback are you looking for from me?

Did you use a model to generate your last reply or did you seriously just rephrase my bug report back at me?

@bhagyshricompany
Copy link

bhagyshricompany commented Jan 20, 2023

@vivlimmsft what info I had I provided you and its already am started looking on that issue will update asap.

@fabiocav
Copy link
Member

@vivlimmsft thank you for reporting. Flagging this for investigation and will reach out if we need any additional information.

@soninaren / @brettsam for awareness.

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

No branches or pull requests

3 participants