-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Crossgen'ed powershell assemblies cause an intermittent hang when running our tests on Linux and OSX #7495
Comments
@rahku any possibility we can get this fixed in 2.0.0 servicing? |
@rahku does not work on CoreCLR anymore. |
I'm surprised it's still not addressed. It would be unpleasant if some Azure service using PowerShell Core were to be freeze. |
I took a look at this today and was able to reproduce the issue. I think I've figured out why this hang is occurring. When the LoaderAllocator gets destroyed, it calls ...on another thread, |
@adityamandaleeka it would be great if we can get a fix in 2.0.x servicing |
@SteveL-MSFT @daxian-dbw I agree that this issue should be fixed. We'll try to find a good solution. Out of curiosity, though, have you tried crossgen-ing the assemblies with the FragileNonVersionable switch? If you pass that switch to crossgen, it will generate non-ReadyToRun images, which should work around this issue (at least, that's what I'd assume based on my analysis above). The images generated with the FragileNonVersionable switch will be brittle (not resilient to changes in the runtime/framework or other dependencies), but as far as I can tell you ship all the dependencies in the PowerShell packages anyway, so that might be okay for you. |
These are quite a bit bigger, and we do not have any extensive testing for this config - it is pretty likely you will hit different bugs. |
@SteveL-MSFT @daxian-dbw Update on this: I have a PR out with a fix in master. Once that's in, I'll go through the process to get it ported to the release/2.0.0 branch. |
@adityamandaleeka Thanks for the fix! When will we have a servicing package that includes the fix? Could you please point me to any docs about how .NET Core servicing works? |
@daxian-dbw This will go into the next release after 2.0.3. There will be a pre-release build soon if you're interested in trying that out. |
We found the crossgen’ed powershell assemblies (targeting .NET Core) cause an intermittent hang when running our powershell class basic parsing tests on Linux/OSX. We have been seeing this issue in our Travis CI builds for some time. I tried to reproduce it locally by running the tests in a loop and found it only reproducible with the crossgen’ed assemblies (see an example screenshot below).
Repro step
powershell -command 'foreach ($i in 1..20) { Invoke-Pester tests/Scripting.Classes.BasicParsing.Tests.ps1 }'
. This command basically runs that test file in a loop for 20 times, and a hang will happen for most of the time.Things worth mentioning
tests.tar.gz
The text was updated successfully, but these errors were encountered: