-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Test failure: baseservices/exceptions/stackoverflow/stackoverflowtester/stackoverflowtester.cmd #109499
Comments
Failed in: runtime-coreclr outerloop 20241104.8 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr r2r 20241104.1 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr pgo 20241106.1 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr crossgen2 20241106.1 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr pgostress 20241108.1 Failed tests:
Error message:
Stack trace:
|
In the last four cases something causes the process that hits stack overflow to never exit. The main thread should exit and the secondary threads should wait forever if they hit a stack overflow. There was no change in the related code for months, so it seems like some seemingly unrelated recent change started to trigger this problem. |
I have tried to repro it locally on the same Ubuntu with the same settings as the lab used and I was unable to repro it in hundreds of iterations. |
Failed in: runtime-coreclr outerloop 20241112.2 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr outerloop 20241113.1 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr crossgen2 20241113.1 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr pgostress 20241115.1 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr pgo 20241118.1 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr crossgen2 20241118.1 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr outerloop 20241120.2 Failed tests:
Error message:
Stack trace:
|
I still cannot repro the issue locally, but I have looked at couple of the logs from the failing runs above and I've noticed that in some of those part of the stack trace shows the following:
It indicates that when we were creating a helper thread to report the stack overflow, the runtime/src/coreclr/pal/src/thread/thread.cpp Lines 1490 to 1492 in 09b30a4
This _ASSERTE was added in #109470 and the current issue started to occur at the same day it went in. While I don't know why would the Since the I am going to try to add one more page to that space and see if the problem goes away. |
I was actually able to repro it by running the stackoverflow test under LLDB. The runtime/src/coreclr/vm/threads.cpp Lines 2016 to 2023 in 09b30a4
And as you can see, the call to SetThreadName is invoked even if the CreateThread returns INVALID_HANDLE_VALUE indicating it has failed. The pthread_setname_np then fails as the thread doesn't exist.
And finally, the thread creation fails due to the stack space of the stack overflow helper stack not being sufficient anymore, as I have thought. Adding one more page to this helper stack fixed the problem. |
The stack overflow coreclr tests started to fail recently. It turns out that was caused by the size of the helper stack allocated for stack overflow handling case is no longer sufficient. Moreover, there is a bug in `Thread::CreateUtilityThread` that calls the `SetThreadName` even when the thread creation fails. Close dotnet#109499
Failed in: runtime-coreclr pgo 20241121.1 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr jitstress-random 20241103.1
Failed tests:
Error message:
Stack trace:
The text was updated successfully, but these errors were encountered: