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 debugger attach+read on Linux 32 bit #45506

Merged
merged 1 commit into from
Dec 11, 2020

Conversation

hoyosjs
Copy link
Member

@hoyosjs hoyosjs commented Dec 2, 2020

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
Copy link

ghost commented Dec 2, 2020

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: -

Copy link
Member

@janvorli janvorli left a comment

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
Copy link
Member Author

hoyosjs commented Dec 3, 2020

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

@ViktorHofer
Copy link
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
Copy link
Member Author

hoyosjs commented Dec 10, 2020

/backport to release/5.0

@github-actions
Copy link
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