runtime icon indicating copy to clipboard operation
runtime copied to clipboard

[JitStress=2] JIT/Regression/JitBlue/devdiv_902271/DevDiv_9202271/DevDiv_902271.exe crashes with JitStress=2

Open sivarv opened this issue 10 years ago • 6 comments

Configuration: Debug Coreclr and Mscorlib.dll Release CoreFx assemblies Release CoreCLR tests OS: Linux

Without COMPlus_JitStress=2 Pass

With COMPlus_JitStress=2 Crashes with Segmentation fault

sivarv avatar Dec 14 '15 22:12 sivarv

Investigation reveals that this test has two methods Work1 and Work2 that call each other in mutual recursion. These mutually recursive calls are tail prefixed and depend on tail prefix being honored to pass. Jitstress=2, introduces GS_CHECK which will disable tail call optimization and as a result, it will lead to stack overflow exception.

We should tag this test case to be excluded from Jitstress=2 or tail call stress runs. For now marking this as test issue and moving to future.

sivarv avatar Jan 13 '16 00:01 sivarv

@richardlford - Assigning it to you as this test needs work as mentioned above.

sivarv avatar Feb 12 '16 00:02 sivarv

We can just mark this as optimization sensitive now, right?

AndyAyersMS avatar Apr 24 '18 19:04 AndyAyersMS

Yes, I think that's correct.

erozenfeld avatar Apr 25 '18 00:04 erozenfeld

I am not sure that it is doable in Hackathon time frame by somebody who has not worked with CoreCLR before.

To do this issue on Linux machine do:

  1. build debug CoreCLR(`build.sh x64 debug);
  2. build release CoreCLR(`build.sh x64 release) ;
  3. build release version of 'JIT/Regression/JitBlue/devdiv_902271/DevDiv_9202271/DevDiv_902271 (msbuild /p:Configuration=Release /p:Platform=x64 DevDiv_902271.ilproj`), assuming that it is possible to build this test on Linux;
  4. ??? Copy '"coreclr\bin\tests\Linux.x64.Debug\Tests\Core_Root\System.Private.CoreLib.dll" to "coreclr\bin\tests\Linux.x64.Release\Tests\Core_Root";
  5. export Core_Root=coreclr\bin\tests\Linux.x64.Release\Tests\Core_Root;
  6. run ./CoreRun.exe DevDiv_902271.exe, check that it returns `100';
  7. export COMPlus_JitStress=2;
  8. repeat step 6, check that the test fails;
  9. add <JitOptimizationSensitive>True</JitOptimizationSensitive> to the test's project file (see example in coreclr\tests\src\JIT\Regression\CLR-x86-JIT\V1.2-Beta1\b103058\b103058.csproj ;
  10. rebuild test with COMPlus_JitStress=2 enabled and check that the test doesn't build?

Am I right?

sandreenko avatar May 30 '18 23:05 sandreenko

It was marked as JitOptimizationSensitive>True</JitOptimizationSensitive> 2+ years ago in dotnet/coreclr#3659.

sandreenko avatar Jun 14 '18 18:06 sandreenko