[release/5.0] Fix debugger attach+read on Linux 32 bit - #45882
Merged
Conversation
Member
|
Activation tests are known, fixed on 5.0 by #45525 The mono failures are #45524. @akoeplinger any idea why the Windows tests are failing fatally on mono because of the VS update? We'd seen this in master when I disabled the leg, I started the backport PR as it's blocking 5.0, but I don't know if it's a good idea. |
Member
sdmaclea
approved these changes
Dec 10, 2020
jeffschwMSFT
approved these changes
Dec 10, 2020
jeffschwMSFT
left a comment
Member
There was a problem hiding this comment.
Approved. We should consider this for 5.0.2
Member
|
tactics approved by email |
Contributor
|
All the three failures are known and fixed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #45506 to release/5.0, fixes #44745
Description
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 ARMv7 systems as they are currently our only Unix 32 bit target. Customers started reporting being unable to attach to their processes using the debugger. The bug became a blocker 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. That read resulted in an access on the >2GB virtual memory region when run in a device with enough memory available with a signed address. In this sense, this is a regression from 3.1.
Customer Impact
Customers targeting linux-arm running on devices with more than 2 GB of memory will see spurious failures. Most of the times it will manifest as being unable to attach. There are no work arounds.
Testing
Manual testing on a device that matches the requirements for the bug to repro using VS as the test debugger.
Risk
Very low. Only impacts ARMv7 and the functions in this file are only used by the debugger.