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 Runtime_76194 test #78760

Merged
merged 14 commits into from
Dec 6, 2022
Merged

Fix Runtime_76194 test #78760

merged 14 commits into from
Dec 6, 2022

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Nov 23, 2022

Should fix #78758

cc @jakobbotsch

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 23, 2022
@ghost ghost assigned EgorBo Nov 23, 2022
@ghost
Copy link

ghost commented Nov 23, 2022

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

Issue Details

Should fix #78758

cc @jakobbotsch

Author: EgorBo
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@EgorBo
Copy link
Member Author

EgorBo commented Nov 23, 2022

/azp list

@azure-pipelines

This comment was marked as outdated.

@EgorBo
Copy link
Member Author

EgorBo commented Nov 23, 2022

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@EgorBo
Copy link
Member Author

EgorBo commented Nov 23, 2022

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@EgorBo
Copy link
Member Author

EgorBo commented Nov 23, 2022

mmap(null, 2 * PageSize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);

returns -1 on Linux_musl arm with errno 22 which should be EINVAL

EINVAL
  We don't like addr, length, or offset (e.g., they are too large, or not aligned on a page boundary).
EINVAL
  (since Linux 2.6.12) length was 0.
EINVAL
  flags contained neither MAP_PRIVATE or MAP_SHARED, or contained both of these values.

Log: https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-78760-merge-876e510b87fc47e5bb/JIT.Regression/1/console.affca64c.log?helixlogtype=result

Test: https://github.com/dotnet/runtime/blob/ce5929a75b4f7272dcc1000b16a13e45e0d4d997/src/tests/JIT/Regression/JitBlue/Runtime_76194/Runtime_76194.cs

@jkotas @jakobbotsch does it ring a bell to you by any chance what could be the reason?
I mean in theory the test is expected to reserve 2 pages (in a loop of 100 iterations)

@jakobbotsch
Copy link
Member

I think the problem might be that the value of MAP_ANONYMOUS is different depending on the standard lib. I can see that we define MAP_ANONYMOUS = 0x10 in our own sources:

https://source.dot.net/#System.IO.MemoryMappedFiles/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MMap.cs,89e5b8f2195492e1

Likely you can pinvoke this SystemNative version and it will handle the conversions for us?

@jakobbotsch
Copy link
Member

This also explains why we only were seeing this issue in outerloop runs.

@jkotas
Copy link
Member

jkotas commented Nov 23, 2022

Likely you can pinvoke this SystemNative version and it will handle the conversions for us?

If the tests need native dependencies, we typically create a test local native dependency for the tests that does what the test needs.

@EgorBo
Copy link
Member Author

EgorBo commented Nov 25, 2022

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

EgorBo and others added 3 commits December 5, 2022 10:33
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
@EgorBo
Copy link
Member Author

EgorBo commented Dec 5, 2022

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@EgorBo
Copy link
Member Author

EgorBo commented Dec 5, 2022

@dotnet/jit-contrib @jkotas PTAL, this unblocks outerloop CI

@EgorBo
Copy link
Member Author

EgorBo commented Dec 5, 2022

Had to disable the test for some mono targets: Wasm, Android, iOS where other tests with native libs are also ignored.

@EgorBo
Copy link
Member Author

EgorBo commented Dec 6, 2022

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@EgorBo EgorBo merged commit 2b52095 into dotnet:main Dec 6, 2022
@EgorBo EgorBo deleted the fix-76194-test branch December 6, 2022 16:40
@EgorBo
Copy link
Member Author

EgorBo commented Dec 6, 2022

Failures are #79170 and #79255

@ghost ghost locked as resolved and limited conversation to collaborators Jan 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runtime_76194 fails on ARM32
3 participants