Skip to content

Conversation

@AaronRobinsonMSFT
Copy link
Member

Example output:

0:000> !DumpMT /d 00007ffaeb7b88a0
EEClass:             00007ffaeb7ad6a0
Module:              00007ffaeb7b68f0
Name:                Program
mdToken:             0000000002000004
File:                ...\Hello\bin\Debug\net6.0\Hello.dll
AssemblyLoadContext: Default ALC - The managed instance of this context doesn't exist yet.
BaseSize:            0x18
ComponentSize:       0x0
DynamicStatics:      false
ContainsPointers:    false
Slots in VTable:     7
Number of IFaces in IFaceMap: 0
0:000> !DumpMT /d 00007ffaeb7cf360
EEClass:             00007ffaeb7d6518
Module:              00007ffaeb7c8318
Name:                Program
mdToken:             0000000002000004
File:                ...\Hello\bin\Debug\net6.0\Hello.dll
AssemblyLoadContext: 0x20ecb360
BaseSize:            0x18
ComponentSize:       0x0
DynamicStatics:      false
ContainsPointers:    false
Slots in VTable:     7
Number of IFaces in IFaceMap: 0

/cc @janvorli @mikem8361

@AaronRobinsonMSFT AaronRobinsonMSFT requested a review from a team as a code owner November 14, 2022 20:00
@AaronRobinsonMSFT AaronRobinsonMSFT changed the title Add the ALC to DumpMT Add the ALC to DumpMT Nov 14, 2022
@AaronRobinsonMSFT
Copy link
Member Author

Failures are due to dotnet/runtime#78400

@mikem8361
Copy link
Contributor

Looks like the DumpMT tests in SOS.OtherCommands is failing against 3.1.28 runtimes.

@AaronRobinsonMSFT
Copy link
Member Author

Looks like the DumpMT tests in SOS.OtherCommands is failing against 3.1.28 runtimes.

Yuck. It appears to be the same issue. I don't think we want to fix this in 3.1. What are our options here? Disable the test there also?

@mikem8361
Copy link
Contributor

Can you make the output the same as it was for 3.1.28 or any runtime version < 7? I guess I did look at exactly how your changes affected the output (I'm on vacation).

@AaronRobinsonMSFT
Copy link
Member Author

I've no idea what the issue is/was on 3.1.28. I'm even attempting to run this new logic prior to .NET 7 since it seems to be very flakey. Any concerns with the added check for .NET 7+ I made?

@hoyosjs
Copy link
Member

hoyosjs commented Nov 22, 2022

@AaronRobinsonMSFT I'd revert the check in SOS. The bug is going to affect 7.0.0 and 7.0.1, but the fix is slated for 7.0.2. I don't think it's worth it. The check is also not great for dumps and it's not complete right now (would always return false):

bool IsRuntimeVersionAtLeast(VS_FIXEDFILEINFO& fileInfo, DWORD major)
{
switch (major)
{
case 3:
if (HIWORD(fileInfo.dwFileVersionMS) == 4 && LOWORD(fileInfo.dwFileVersionMS) == 700)
{
return true;
}
// fall through
case 5:
if (HIWORD(fileInfo.dwFileVersionMS) >= 5)
{
return true;
}
// fall through
break;
default:
_ASSERTE(FALSE);
break;
}
return false;
}

@AaronRobinsonMSFT
Copy link
Member Author

@AaronRobinsonMSFT I'd revert the check in SOS. The bug is going to affect 7.0.0 and 7.0.1, but the fix is slated for 7.0.2. I don't think it's worth it. The check is also not great for dumps and it's not complete right now (would always return false):

bool IsRuntimeVersionAtLeast(VS_FIXEDFILEINFO& fileInfo, DWORD major)
{
switch (major)
{
case 3:
if (HIWORD(fileInfo.dwFileVersionMS) == 4 && LOWORD(fileInfo.dwFileVersionMS) == 700)
{
return true;
}
// fall through
case 5:
if (HIWORD(fileInfo.dwFileVersionMS) >= 5)
{
return true;
}
// fall through
break;
default:
_ASSERTE(FALSE);
break;
}
return false;
}

I specifically updated that in this PR. It is now correct, which is why it isn't asserting but instead verifying the version.

@hoyosjs hoyosjs merged commit ac9b0dc into main Nov 22, 2022
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the add_alc_dumpmt branch November 22, 2022 22:50
@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants