Skip to content

Fix debugger attach+read on Linux 32 bit - #45506

Merged
hoyosjs merged 1 commit into
dotnet:masterfrom
hoyosjs:juhoyosa/linux-arm-debug-fix
Dec 11, 2020
Merged

Fix debugger attach+read on Linux 32 bit#45506
hoyosjs merged 1 commit into
dotnet:masterfrom
hoyosjs:juhoyosa/linux-arm-debug-fix

Conversation

@hoyosjs

@hoyosjs hoyosjs commented Dec 2, 2020

Copy link
Copy Markdown
Member

The debug PAL was undefining of macros that cause 32 bit POSIX syscalls to use 64 bit offsets. The offsets are defined in a signed manner, which means that any address over the 2GB range that we use will result in an incoherent call to pread and similar APIs. This has been the case for years, but it only affected ARM32 systems as they are currently our only Unix 32 bit target. Customers started reporting issues where the debugger wouldn't attach. This happened as we changed the debugger startup path to use symbol exports in CoreCLR for our single file story, meaning that the DAC no longer used a compile time header but an export read that caused to read on the >2GB region of the process when run in a device with enough memory available.

@ghost

ghost commented Dec 2, 2020

Copy link
Copy Markdown

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

Issue Details
Author: hoyosjs
Assignees: -
Labels:

area-Diagnostics-coreclr

Milestone: -

@janvorli janvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thank you! Can you please add description and the issue closing reference for the 44745?

@hoyosjs

hoyosjs commented Dec 3, 2020

Copy link
Copy Markdown
Member Author

Will do, and will need to backport. I just need to do some more testing.

@ViktorHofer

Copy link
Copy Markdown
Member

// Auto-generated message

69e114c which was merged 12/7 removed the intermediate src/coreclr/src/ folder. This PR needs to be updated as it touches files in that directory which causes conflicts.

To update your commits you can use this bash script: https://gist.github.com/ViktorHofer/6d24f62abdcddb518b4966ead5ef3783. Feel free to use the comment section of the gist to improve the script for others.

@hoyosjs
hoyosjs force-pushed the juhoyosa/linux-arm-debug-fix branch from cdda3dc to 002e7d1 Compare December 10, 2020 06:18
@hoyosjs hoyosjs linked an issue Dec 10, 2020 that may be closed by this pull request
@hoyosjs hoyosjs added this to the 6.0.0 milestone Dec 10, 2020
@hoyosjs hoyosjs self-assigned this Dec 10, 2020
@hoyosjs
hoyosjs marked this pull request as ready for review December 10, 2020 06:34
@hoyosjs

hoyosjs commented Dec 10, 2020

Copy link
Copy Markdown
Member Author

/backport to release/5.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/5.0: https://github.com/dotnet/runtime/actions/runs/412433334

@hoyosjs
hoyosjs merged commit 56ecd32 into dotnet:master Dec 11, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 10, 2021
@hoyosjs
hoyosjs deleted the juhoyosa/linux-arm-debug-fix branch June 29, 2021 23:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux arm 5.0 launch fails with CORDBG_E_MISSING_DEBUGGER_EXPORTS

4 participants