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
Our build script tests hang when run with Mono on Windows #3222
Comments
By adding |
The test passes when it is the only test in the test run but not when grouped with all the others. If I remove the WaitMessage code from it so that it just
I went so far as to remove all the aborting logic I added in #2023, but running one extra normal timeout test still hangs when it should be timing out. Thread.CurrentThread.ThreadState is AbortRequested, but no ThreadAbortException gets raised.
|
Crazy. You could write a test for that, of course. @migueldeicaza does that sound possible to you? @jnm2 what version of mono? |
@CharliePoole I haven't verified that. I'm working on it as we speak. But I just had a thought. In #3221 (comment), a stray ThreadAbortException comes along out of nowhere. Here, none shows up. I wonder if somehow something is delaying it so that it only shows up when it's no longer relevant. Unfortunately I'll be stopping for the evening in ten minutes due to another commitment. I don't mind the break though; I've been banging my head against the wall for six hours at this point. In light of that, everything I say should probably be taken with a grain of salt now that I think of it. :D |
Now that I'm coming back with fresh eyes, I'm noticing that a number of our timeout tests have this line: [Platform(Exclude = "Mono", Reason = "Runner hangs at end when this is run")] This was introduced ten years ago: fc04253 nunit/src/NUnitFramework/tests/Attributes/TimeoutTests.cs Lines 65 to 76 in 9f2d8ea
|
I nailed down the actual bug in Mono and worked around it so that none of these tests need to be ignored on Mono anymore! To bring closure to this issue, there are more details starting at #3095 (comment). tl;dr: Under some circumstances, if you swallow a ThreadAbortException without calling ResetAbort, Mono does not throw ThreadAbortException when the control flow leaves the catch block. Instead, it resurrects it when control flow leaves the next unrelated catch block that happens to execute. |
When I run the equivalent of test45 using Mono 5.20 on Windows just like we do on Linux, the test run hangs consistently. It looks similar to what we've seen intermittently in CI.
Steps to reproduce from a PowerShell prompt on Windows:
choco install mono -y
if you don't have it already.\build.ps1 -t build
The test run has never completed for me.
The text was updated successfully, but these errors were encountered: