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

ProcessModule.BaseAddress is sometimes incorrect on Linux #45482

Closed
tmds opened this issue Dec 2, 2020 · 4 comments
Closed

ProcessModule.BaseAddress is sometimes incorrect on Linux #45482

tmds opened this issue Dec 2, 2020 · 4 comments
Labels
area-System.Diagnostics.Process untriaged New issue has not been triaged by the area owner

Comments

@tmds
Copy link
Member

tmds commented Dec 2, 2020

For example, libcoreclr.so base address is reported 7ffff7371000 instead of 7ffff72ff000 for the following maps file:

7ffff72ff000-7ffff7371000 r--p 00000000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff7371000-7ffff7657000 r-xp 00072000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff7657000-7ffff7659000 rwxp 00358000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff7659000-7ffff780b000 r-xp 0035a000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff780b000-7ffff7812000 r--p 0050c000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff7812000-7ffff7813000 r--p 00513000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff7813000-7ffff7958000 r--p 00514000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff7958000-7ffff797c000 r--p 00658000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff797c000-7ffff7994000 rw-p 0067c000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so

This happens because we skip entries with don't have rx set, before merging entries for the same file.

@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Dec 2, 2020
@am11
Copy link
Member

am11 commented Dec 2, 2020

It is like this since the initial implementation in 2015. Interesting that we have noticed it around the same time. :)
Discussion: #45180. PR: #45401.

@ghost
Copy link

ghost commented Dec 2, 2020

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

Issue Details

For example, libcoreclr.so base address is reported 7ffff7371000 instead of 7ffff72ff000 for the following maps file:

7ffff72ff000-7ffff7371000 r--p 00000000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff7371000-7ffff7657000 r-xp 00072000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff7657000-7ffff7659000 rwxp 00358000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff7659000-7ffff780b000 r-xp 0035a000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff780b000-7ffff7812000 r--p 0050c000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff7812000-7ffff7813000 r--p 00513000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff7813000-7ffff7958000 r--p 00514000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff7958000-7ffff797c000 r--p 00658000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so
7ffff797c000-7ffff7994000 rw-p 0067c000 fd:00 18097725                   /usr/lib64/dotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclr.so

This happens because we skip entries with don't have rx set, before merging entries for the same file.

Author: tmds
Assignees: -
Labels:

area-System.Diagnostics.Process, untriaged

Milestone: -

@danmoseley
Copy link
Member

Closing as dupe 🙂

@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Diagnostics.Process untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

4 participants