Skip to content
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

Log the environment variables and failures that occur as part of DRIVEALL #325

Merged
merged 2 commits into from
Apr 28, 2021

Conversation

tannergooding
Copy link
Member

This simply logs the environment variables that are set as part of the invoked command and failures information to allow easier debugging and investigation into failures.

Before

DRIVEALL: Invoking D:\Users\tagoo\Source\repos\runtime_base\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\corerun.exe C:\Users\tagoo\Source\repos\jitutils\bin\pmi.dll PREPALL-QUIET D:\Users\tagoo\Source\repos\runtime_base\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\System.Private.CoreLib.dll 0

DllNotFoundException Interop+HostPolicy::corehost_resolve_component_dependencies (Unable to load DLL 'hostpolicy.dll' or one of its dependencies: The specified module could not be found. (0x8007007E))

DllNotFoundException Interop+HostPolicy::corehost_set_error_writer (Unable to load DLL 'hostpolicy.dll' or one of its dependencies: The specified module could not be found. (0x8007007E))

Failed PREPALL on D:\Users\tagoo\Source\repos\runtime_base\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\System.Private.CoreLib.dll

After

DRIVEALL: Invoking D:\Users\tagoo\Source\repos\runtime_base\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\corerun.exe C:\Users\tagoo\Source\repos\jitutils\bin\pmi.dll PREPALL-QUIET D:\Users\tagoo\Source\repos\runtime_base\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\System.Private.CoreLib.dll 0
    COMPlus_JitDisasm=*
    COMPlus_JitDisasmAssemblies=System.Private.CoreLib
    COMPlus_JitUnwindDump=*
    COMPlus_JitEHDump=*
    COMPlus_JitDiffableDasm=1
    COMPlus_ReadyToRun=0
    COMPlus_ZapDisable=1
    COMPlus_JitEnableNoWayAssert=1
    COMPlus_JitNoForceFallback=1
    COMPlus_JitRequired=1
    COMPlus_TieredCompilation=0
    COMPlus_JitStdOutFile=D:\Users\tagoo\Source\repos\runtime_base\artifacts\diffs\dasmset_5\diff\System.Private.CoreLib.dasm

DllNotFoundException Interop+HostPolicy::corehost_resolve_component_dependencies (Unable to load DLL 'hostpolicy.dll' or one of its dependencies: The specified module could not be found. (0x8007007E))
Failed type# 53 method# 194 Interop+HostPolicy::corehost_resolve_component_dependencies

DllNotFoundException Interop+HostPolicy::corehost_set_error_writer (Unable to load DLL 'hostpolicy.dll' or one of its dependencies: The specified module could not be found. (0x8007007E))
Failed type# 53 method# 195 Interop+HostPolicy::corehost_set_error_writer

Failed PREPALL on D:\Users\tagoo\Source\repos\runtime_base\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\System.Private.CoreLib.dll

@tannergooding
Copy link
Member Author

CC. @dotnet/jit-contrib, @BruceForstall

@tannergooding
Copy link
Member Author

I also logged #326, to track that we don't properly track assertions and so these 6 failures don't actually show: dotnet/runtime#51728.

We actually exit early on the first failure, which doesn't seem desirable.

@@ -194,6 +194,11 @@ private static PrepAllResult Compute(PrepAllInfo pi)

Console.WriteLine($"DRIVEALL: Invoking {driverName} {newCommandLine}");

foreach (var pair in pi.environment)
{
Console.WriteLine($" {pair.Key}={pair.Value}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this going to be pretty noisy?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its going to print around 12-15 lines per .log file. Compared to the diff file this isn't a lot, but it might be noisier than desired.

In your particular case above, are you running PMI asm diffs as part of jit-diff? There's some magic happening there that simply outputting the environment variables won't help identify, namely, it copies the base or diff JIT into the Core_Root directory.

Yes, this is jit-diff.bat diff --diff --pmi.

If there is a better/easier way to do that, I'd be all ears 😄. But as of now, printing the failing method number and these environment variables allows me to do something similar to:

$env:COMPlus_JitDisasm="*"
$env:COMPlus_JitDisasmAssemblies="System.Private.CoreLib"
$env:COMPlus_JitUnwindDump="*"
$env:COMPlus_JitEHDump="*"
$env:COMPlus_JitDiffableDasm=1
$env:COMPlus_ReadyToRun=0
$env:COMPlus_ZapDisable=1
$env:COMPlus_JitEnableNoWayAssert=1
$env:COMPlus_JitNoForceFallback=1
$env:COMPlus_JitRequired=1
$env:COMPlus_TieredCompilation=0
$env:COMPlus_JitStdOutFile="D:\Users\tagoo\Source\repos\runtime_base\artifacts\diffs\dasmset_5\diff\System.Private.CoreLib.dasm" 

copy D:\Users\tagoo\Source\repos\runtime\artifacts\tests\coreclr\windows.x64.Debug\Tests\Core_Root\clrjit.dll D:\Users\tagoo\Source\repos\runtime\artifacts\tests\coreclr\windows.x64.Debug\Tests\Core_Root

devenv /debugexe D:\Users\tagoo\Source\repos\runtime\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\corerun.exe D:\Users\tagoo\Source\repos\jitutils\bin\pmi.dll PREPONE D:\Users\tagoo\Source\repos\runtime_base\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\System.Private.CoreLib.dll #####

(Setting AltJit to the debug clrjit.dll also works)

#326 is also slightly problematic as you have to debug to see certain asserts.

@BruceForstall
Copy link
Member

In your particular case above, are you running PMI asm diffs as part of jit-diff? There's some magic happening there that simply outputting the environment variables won't help identify, namely, it copies the base or diff JIT into the Core_Root directory.

Shouldn't jit-diff diff --verbose do the output, instead of PMI?

@BruceForstall
Copy link
Member

(btw, the succeeded/failed changes seem useful)

Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@tannergooding tannergooding merged commit 3c7bb1c into dotnet:main Apr 28, 2021
jashook pushed a commit to jashook/jitutils that referenced this pull request Mar 8, 2022
…EALL (dotnet#325)

* Log the environment variables that are set in DRIVEALL

* Print the method and type # on failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants