dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.28k stars 4.74k forks source link

Test failure baseservices/exceptions/stackoverflow/stackoverflowtester/stackoverflowtester.cmd #108215

Closed JulieLeeMSFT closed 3 weeks ago

JulieLeeMSFT commented 1 month ago

Pipeline: runtime-coreclr superpmi-collect/20240922.1

Failed test:

coreclr linux arm64 Checked no_tiered_compilation @ (Ubuntu.2004.Arm64)Ubuntu.2004.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-helix-arm64v8
- baseservices/exceptions/stackoverflow/stackoverflowtester/stackoverflowtester.cmd

Error Message:

Return code:      1
Raw output file:      /root/helix/work/workitem/uploads/stackoverflow/stackoverflowtester/output.txt
Raw output:
BEGIN EXECUTION
/root/helix/work/correlation/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true stackoverflowtester.dll ''
Running stackoverflow test(smallframe main)
"Stack overflow."
"Repeated 174487 times:"
"--------------------------------"
"   at TestStackOverflow.Program.InfiniteRecursionC()"
"   at TestStackOverflow.Program.InfiniteRecursionB()"
"   at TestStackOverflow.Program.InfiniteRecursionA()"
"--------------------------------"
"   at TestStackOverflow.Program.Test(Boolean)"
"   at TestStackOverflow.Program.Main(System.String[])"
""
Running stackoverflow test(smallframe secondary)
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Stack overflow."
"Repeated 174616 times:"
"--------------------------------"
"   at TestStackOverflow.Program.InfiniteRecursionC()Stack overflow."
""
"   at TestStackOverflow.Program.InfiniteRecursionB()"
"   at TestStackOverflow.Program.InfiniteRecursionA()"
"--------------------------------"
"   at TestStackOverflow.Program.Test(Boolean)"
"   at TestStackOverflow.Program+<>c__DisplayClass7_0.<SecondaryThreadsTest>b__0()"
""
System.Exception: Missing "InfiniteRecursionC" method frame
at TestStackOverflow.Program.TestStackOverflowSmallFrameSecondaryThread()
at __GeneratedMainWrapper.Main()
Expected: 100
Actual: 101
END EXECUTION - FAILED
Test failed. Trying to see if dump file was created in /home/helixbot/dotnetbuild/dumps since 9/22/2024 8:16:04 PM
Test Harness Exitcode is : 1
To run the test:
Set up CORE_ROOT and run.

/root/helix/work/workitem/e/baseservices/exceptions/baseservices-exceptions/../stackoverflow/stackoverflowtester/stackoverflowtester.sh

Stack trace:

[at Xunit.Assert.True(Nullable`1 condition, String userMessage) in /_/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 146](https://dev.azure.com/dnceng/internal/_git/a2f9a77f-0d37-4eaf-aecc-5b3ff7457ad6?path=%2F_%2Fsrc%2FMicrosoft.DotNet.XUnitAssert%2Fsrc%2FBooleanAsserts.cs&version=GBmain&_a=contents&line=146&lineEnd=147&lineStartColumn=1&lineEndColumn=1&lineStyle=plain)
at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix)
at Program.<<Main>$>g__TestExecutor134|0_135(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)
JulieLeeMSFT commented 1 month ago

@janvorli PTAL. cc @dotnet/jit-contrib.

JulieLeeMSFT commented 1 month ago

Related to https://github.com/dotnet/runtime/issues/106742.

markples commented 1 month ago

This appears to be different form #106742.

The output

"Repeated 174616 times:"
"--------------------------------"
"   at TestStackOverflow.Program.InfiniteRecursionC()Stack overflow."
""
"   at TestStackOverflow.Program.InfiniteRecursionB()"
"   at TestStackOverflow.Program.InfiniteRecursionA()"
"--------------------------------"
"   at TestStackOverflow.Program.Test(Boolean)"
"   at TestStackOverflow.Program+<>c__DisplayClass7_0.<SecondaryThreadsTest>b__0()"
""
System.Exception: Missing "InfiniteRecursionC" method frame

has an InfiniteRecursionC frame, but the check is

if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionC()

so I think the question is whether the output interleaving is allowed and then either the output or the test should be fixed.

janvorli commented 1 month ago

The interleaving occurs only with superpmi due to its hooking into the sigsegv handler and the possibility that we hit it without the current thread being registered with the superpmi's PAL. I think that it would actually be better to not to run this test with superpmi at all.

JulieLeeMSFT commented 1 month ago

The interleaving occurs only with superpmi due to its hooking into the sigsegv handler and the possibility that we hit it without the current thread being registered with the superpmi's PAL. I think that it would actually be better to not to run this test with superpmi at all.

@BruceForstall, can you plz remove this test from spmi?

dotnet-policy-service[bot] commented 1 month ago

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.