ARM segmentation fault: JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b31878/b31878/b31878.sh
See http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/arm_emulator_cross_debug_ubuntu_prtest/511/console:
12:14:41 FAILED - JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b31878/b31878/b31878.sh
12:14:41 BEGIN EXECUTION
12:14:41 /home/coreclr/Windows_NT.x64.Debug/Tests/coreoverlay/corerun b31878.exe
12:14:41
./b31878.sh: line 117: 10078 Segmentation fault (core dumped) $_DebuggerFullPath "$CORE_ROOT/corerun" b31878.exe $CLRTestExecutionArguments
12:14:41 Expected: 100
12:14:41 Actual: 139
12:14:41 END EXECUTION - FAILED
/cc @RussKeldorph these are the tests reported by Samsung as failing?
@jashook Looks different than dotnet/runtime#6332.
@jashook @RussKeldorph After PR dotnet/coreclr#6021 is merged, there are many regressions in CoreCLR ARM (softp) Release build:
Here is the result from bdfce9ed7fb:
=======================
Test Results
=======================
# CoreCLR Bin Dir :
# Tests Discovered : 9870
# Passed : 8953
# Failed : 579
# Skipped : 338
=======================
Here is the result from bdfce9ed7fb without PR dotnet/coreclr#6021 (revert PR dotnet/coreclr#6021 manually):
=======================
Test Results
=======================
# CoreCLR Bin Dir :
# Tests Discovered : 9870
# Passed : 9504
# Failed : 28
# Skipped : 338
=======================
[bdfce9ed7fb][TC 387d9fc0a Release] [include-aab8856ce03].txt [bdfce9ed7fb][TC 387d9fc0a Release] [revert-aab8856ce03].txt
Interestingly, b31878 is passed on my side.
On the PR that triggered this failure, this test looked like it passed on the Release build but segfaulted on the Debug build here - could be why it passed on a Release build for @parjong .
Seen again http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/arm_emulator_cross_debug_ubuntu_prtest/245/consoleFull#2096352037c7af6a29-b465-404a-b249-90a3911e4354
10:13:31 FAILED - JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b31878/b31878/b31878.sh
10:13:31 BEGIN EXECUTION
10:13:31 /bindings/tmp/arm32_ci_temp/coreclr/Windows_NT.x64.Debug/Tests/coreoverlay/corerun b31878.exe
10:13:31
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
10:13:31 ./b31878.sh: line 117: 56638 Segmentation fault (core dumped) $_DebuggerFullPath "$CORE_ROOT/corerun" b31878.exe $CLRTestExecutionArguments
@RussKeldorph @swgillespie is there a way I can get the dump off that box for you ?
In theory, the dump should have been uploaded to the dumpling service, although looking at the logs I don't see anything indicating that the upload occurred.
Can I go ahead and reset the CI?
Yeah, I'd say it's fine.
@swgillespie Where can we find out more about this "dumpling" service? I wouldn't be surprised it doesn't "just work" for the ARM emulator jobs.
/cc @jashook
@RussKeldorph I don't know the specifics, but as I understand it dumpling is an HTTP endpoint that can receive crash dumps (https://github.com/dotnet/coreclr/pull/6083) and view them (http://aka.ms/dumpling). @adityamandaleeka or @bryanar might know more about how it works vis-a-vis ARM and other platforms.
@hqueue @leemgs @myungjoo @parjong @wateret @sjsinju This issue is causing spurious failures in our PR and rolling tests. Can you investigate? Note that we believe @CarolEidt fixed the ARM regression introduced by dotnet/coreclr#6021 before resubmitting her change.
You may want to try adding the new --limitedDumpGeneration option to the ARM CI runtest.sh so you can use dumpling as @swgillespie suggests above.
@RussKeldorph The issue seems to be related with emulator-based testing environment. I tried to reproduce this issue with Raspberry Pi 3 and another ARM soft-fp devices, but failed.
@sjsinju @wateret Could you let me know about the current ARM CI in detail?
I checked current the debug builds of ARM CI status. It was hard to find the failure in b31878 tc. But I found failures of below links.
http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/arm_emulator_cross_debug_ubuntu_prtest/988/ and http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/arm_emulator_cross_debug_ubuntu_prtest/990/
are the PRs that just changed documentation of 'linux-instructions.md'. But they made each other different test failures. The release build of the same PR on the CI cloud was successful.
http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/arm_emulator_cross_release_ubuntu_prtest/960/
It seems that is the same problem with this issue. I think the segmentation fault is caused by not only b31878 but any test cases randomly with only debug CI likes @swgillespie said. So I think we have to investigate debug build.
@sjsinju Sorry for not being clear. Yes, we believe this failure is not specific to b31878. It seems to happen nondeterministically in many, if not all, tests currently running in ARM CI. I believe this is another example (in the release build): http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/arm_emulator_cross_release_ubuntu/232/console.
Due to the difficulty of reproducing, it may be better to enable capturing the dump in the CI rather than attempting to reproduce locally. If the --limitedDumpGeneration switch I mentioned above works in the emulator, that might be the easiest thing to try.
The PR dotnet/coreclr#8019 that running tests using a archived root-fs with sequential option was merged. But it seems to be not enough to resolve this issue. Although the frequency has decreased, the segmentation fault is occurred still(Local tests were all successful).
Additional investigations are needed.
Per dotnet/coreclr#11069, I unfortunately recommend adding retry logic to runtest.sh. It should be enabled for ARM32 only, and I would prefer that a test only be retried if its output matches a very specific pattern, e.g. qemu: uncaught target signal 11 (Segmentation fault) - core dumped that is unique to this failure. In no case should a single test be retried more than three times. Please also add clear logging to indicate a retry is taking place so we can determine how often this continues to hit in the future.
I think retry logic can be implemented in two ways.
- (1) Update
runtest.shwith a new option to retry failed tests whenqemurelated error observed and ARM32 CI make use of the option. - (2) Use existing
runtest.sh, andarm32_ci_test.shimplements all retry logic.
(1) may be preferred over (2) in general (right?)
What do you think of it ?
I'm less concerned about how it's implemented and more concerned about the requirements. I strongly prefer retrying at the lowest level possible (e.g. individual test cases) rather than retrying all the tests if only one fails spuriously. I assumed that meant going with your option (1), but I suppose you could achieve the same goal in other ways. I think if a single invocation of runtest.sh is running multiple tests, however, you probably need to modify runtest.sh.
I'm not sure we need a new script option to enable retry on failure. Retries are a huge hack that we should remove eventually, and I'm not a fan of adding unnecessary complexity hacks. I would just enable retry only when the --testDirFile option is used, since that currently only happens in the scenario we care about.
I strongly prefer retrying at the lowest level possible (e.g. individual test cases) rather than retrying all the tests if only one fails spuriously
I definitely agree with this idea.
I would just enable retry only when the --testDirFile option is used, since that currently only happens in the scenario we care about.
I had similar idea in mind. Minor problems related to this approach is that (1) it may take more time to setup test environment if we invoke runtest.sh again with only failed test and (2) there will be multiple results of of runtest.sh and a result of the last execution of runtest.sh will show at the end of CI.
If this doesn't matter, then I also think this 2nd approach (by exploiting --testDirFile or --testDirFile option) is a reasonable choice, because this is a temporary hack for arm CI only as you said.
I will prepare a retrial logic with 2nd approach.