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

Fix ReplaceModuleMapping for 32bit binary on 64bit kernel #66640

Merged
merged 1 commit into from
Mar 21, 2022

Conversation

HJLeee
Copy link
Contributor

@HJLeee HJLeee commented Mar 15, 2022

During dotnet-dump collect on 32bit binary + 64bit kernel, ReplaceModuleMapping always fails due to address mismatch as follows.

W/STDOUT  ( 9535): EnumerateManagedModules: Module enumeration STARTED
W/STDOUT  ( 9535): MODULE: ffffffffefa4c000 dyn 0 inmem 0 file 0 pe 00e8cbd0 pdb 00000000GetMemoryRegionFlags: FAILED
W/STDOUT  ( 9535): MODULE: ADD ffffffffefa4c000 - fffffffff03fd000 (0009b1) 00000000 rwx--- 07 /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.0/System.Private.CoreLib.dll
W/STDOUT  ( 9535): MODULE: timestamp aa6efd46 size 009b1000 d22cb4e759db4fc3825a86706dba1fa9 /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.0/System.Private.CoreLib.dll
W/STDOUT  ( 9535): MODULE: fffffffff45fc000 dyn 0 inmem 0 file 1 pe 00e930e0 pdb 00000000GetMemoryRegionFlags: FAILED
W/STDOUT  ( 9535): MODULE: ADD fffffffff45fc000 - fffffffff45ff000 (000003) 00000000 rwx--- 07 /usr/share/dotnet.tizen/framework/Tizen.Runtime.dll
W/STDOUT  ( 9535): MODULE: timestamp 82a77f6e size 00008000 8e75eedb11d5453b8fac7729b8991ef1 /usr/share/dotnet.tizen/framework/Tizen.Runtime.dll
W/STDOUT  ( 9535): MODULE: fffffffff45c0000 dyn 0 inmem 0 file 0 pe 00e94d00 pdb 00000000GetMemoryRegionFlags: FAILED
W/STDOUT  ( 9535): MODULE: ADD fffffffff45c0000 - fffffffff45fc000 (00003c) 00000000 rwx--- 07 /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.0/System.Runtime.ni.dll
W/STDOUT  ( 9535): MODULE: timestamp c44f9ada size 0003c000 108a3f6230874a7fa0f3b090464402a1 /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.0/System.Runtime.ni.dll

Older impl in coreclr used to cast the address with ULONG_PTR and it fixes the problem.
https://github.com/dotnet/coreclr/blob/259ce7d4619478cfefe7b0c0f6fa765f765f7e37/src/debug/createdump/crashinfo.cpp#L794

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Mar 15, 2022
@ghost
Copy link

ghost commented Mar 15, 2022

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

Issue Details

During dotnet-dump collect on 32bit binary + 64bit kernel, ReplaceModuleMapping always fails due to address mismatch as follows.

W/STDOUT  ( 9535): EnumerateManagedModules: Module enumeration STARTED
W/STDOUT  ( 9535): MODULE: ffffffffefa4c000 dyn 0 inmem 0 file 0 pe 00e8cbd0 pdb 00000000GetMemoryRegionFlags: FAILED
W/STDOUT  ( 9535): MODULE: ADD ffffffffefa4c000 - fffffffff03fd000 (0009b1) 00000000 rwx--- 07 /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.0/System.Private.CoreLib.dll
W/STDOUT  ( 9535): MODULE: timestamp aa6efd46 size 009b1000 d22cb4e759db4fc3825a86706dba1fa9 /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.0/System.Private.CoreLib.dll
W/STDOUT  ( 9535): MODULE: fffffffff45fc000 dyn 0 inmem 0 file 1 pe 00e930e0 pdb 00000000GetMemoryRegionFlags: FAILED
W/STDOUT  ( 9535): MODULE: ADD fffffffff45fc000 - fffffffff45ff000 (000003) 00000000 rwx--- 07 /usr/share/dotnet.tizen/framework/Tizen.Runtime.dll
W/STDOUT  ( 9535): MODULE: timestamp 82a77f6e size 00008000 8e75eedb11d5453b8fac7729b8991ef1 /usr/share/dotnet.tizen/framework/Tizen.Runtime.dll
W/STDOUT  ( 9535): MODULE: fffffffff45c0000 dyn 0 inmem 0 file 0 pe 00e94d00 pdb 00000000GetMemoryRegionFlags: FAILED
W/STDOUT  ( 9535): MODULE: ADD fffffffff45c0000 - fffffffff45fc000 (00003c) 00000000 rwx--- 07 /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.0/System.Runtime.ni.dll
W/STDOUT  ( 9535): MODULE: timestamp c44f9ada size 0003c000 108a3f6230874a7fa0f3b090464402a1 /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.0/System.Runtime.ni.dll

Older impl in coreclr used to cast the address with ULONG_PTR and it fixes the problem.
https://github.com/dotnet/coreclr/blob/259ce7d4619478cfefe7b0c0f6fa765f765f7e37/src/debug/createdump/crashinfo.cpp#L794

Author: HJLeee
Assignees: -
Labels:

area-Diagnostics-coreclr, community-contribution

Milestone: -

@HJLeee
Copy link
Contributor Author

HJLeee commented Mar 15, 2022

cc @alpencolt @gbalykov @clamp03

@HJLeee
Copy link
Contributor Author

HJLeee commented Mar 21, 2022

@jkotas Please take a look.

@jkotas jkotas requested a review from mikem8361 March 21, 2022 02:03
@jkotas
Copy link
Member

jkotas commented Mar 21, 2022

@mikem8361 Could you please review this change?

@jkotas jkotas merged commit eb51b02 into dotnet:main Mar 21, 2022
radekdoulik pushed a commit to radekdoulik/runtime that referenced this pull request Mar 30, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Diagnostics-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants