Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Dont run the Span CopyToLargeSizeTest for 32-bit process.#18563

Merged
danmoseley merged 1 commit intodotnet:masterfrom
ahsonkhan:FixCopyToTest
Apr 19, 2017
Merged

Dont run the Span CopyToLargeSizeTest for 32-bit process.#18563
danmoseley merged 1 commit intodotnet:masterfrom
ahsonkhan:FixCopyToTest

Conversation

@ahsonkhan
Copy link

@ahsonkhan ahsonkhan commented Apr 18, 2017

Fixes #18540

cc @shiftylogic, @WinCPP

@shiftylogic
Copy link
Contributor

@dotnet-bot help

@dotnet-bot
Copy link

Welcome to the dotnet/corefx Repository

The following is a list of valid commands on this PR. To invoke a command, comment the indicated phrase on the PR

The following commands are valid for all PRs and repositories.

Click to expand
Comment Phrase Action
@dotnet-bot test this please Re-run all legs. Use sparingly
@dotnet-bot test ci please Generates (but does not run) jobs based on changes to the groovy job definitions in this branch
@dotnet-bot help Print this help message

The following jobs are launched by default for each PR against dotnet/corefx:master.

Click to expand
Comment Phrase Job Launched
@dotnet-bot test Windows_NT Debug AllConfigurations Build Windows_NT Debug AllConfigurations Build
@dotnet-bot test Innerloop CentOS7.1 Debug x64 Build and Test Innerloop CentOS7.1 Debug x64 Build and Test
@dotnet-bot test Innerloop CentOS7.1 Release x64 Build and Test Innerloop CentOS7.1 Release x64 Build and Test
@dotnet-bot test Vertical netfx Build Vertical netfx Build
@dotnet-bot test Innerloop OSX10.12 Debug x64 Build and Test Innerloop OSX10.12 Debug x64 Build and Test
@dotnet-bot test Innerloop OSX10.12 Release x64 Build and Test Innerloop OSX10.12 Release x64 Build and Test
@dotnet-bot test Innerloop PortableLinux Debug x64 Build and Test Innerloop PortableLinux Debug x64 Build and Test
@dotnet-bot test Innerloop PortableLinux Release x64 Build and Test Innerloop PortableLinux Release x64 Build and Test
@dotnet-bot test Innerloop Tizen armel Debug Cross Build Innerloop Tizen armel Debug Cross Build
@dotnet-bot test Innerloop Tizen armel Release Cross Build Innerloop Tizen armel Release Cross Build
@dotnet-bot test Vertical uap Build Vertical uap Build
@dotnet-bot test Vertical uapaot Build Vertical uapaot Build
@dotnet-bot test Innerloop Ubuntu14.04 arm Release Cross Build Innerloop Ubuntu14.04 arm Release Cross Build
@dotnet-bot test Innerloop Ubuntu14.04 Debug x64 Build and Test Innerloop Ubuntu14.04 Debug x64 Build and Test
@dotnet-bot test Innerloop Ubuntu14.04 Release x64 Build and Test Innerloop Ubuntu14.04 Release x64 Build and Test
@dotnet-bot test Innerloop Ubuntu16.04 arm Debug Cross Build Innerloop Ubuntu16.04 arm Debug Cross Build
@dotnet-bot test Innerloop Windows_NT Debug x86 Build and Test Innerloop Windows_NT Debug x86 Build and Test
@dotnet-bot test Innerloop Windows_NT Release x64 Build and Test Innerloop Windows_NT Release x64 Build and Test

The following optional jobs are available in PRs against dotnet/corefx:master.

Click to expand
Comment Phrase Job Launched
@dotnet-bot test code coverage Queues Code Coverage Windows Debug
@dotnet-bot test innerloop Debian8.4 Debug Queues Innerloop Debian8.4 Debug x64 Build and Test
@dotnet-bot test innerloop Debian8.4 Release Queues Innerloop Debian8.4 Release x64 Build and Test
@dotnet-bot test innerloop Fedora24 Debug Queues Innerloop Fedora24 Debug x64 Build and Test
@dotnet-bot test innerloop Fedora24 Release Queues Innerloop Fedora24 Release x64 Build and Test
@dotnet-bot test code formatter check Queues Code Formatter Check
@dotnet-bot test innerloop OpenSUSE13.2 Debug Queues Innerloop OpenSUSE13.2 Debug x64 Build and Test
@dotnet-bot test innerloop OpenSUSE13.2 Release Queues Innerloop OpenSUSE13.2 Release x64 Build and Test
@dotnet-bot test innerloop OpenSUSE42.1 Debug Queues Innerloop OpenSUSE42.1 Debug x64 Build and Test
@dotnet-bot test innerloop OpenSUSE42.1 Release Queues Innerloop OpenSUSE42.1 Release x64 Build and Test
@dotnet-bot test outerloop netcoreapp CentOS7.1 Debug Queues OuterLoop netcoreapp CentOS7.1 Debug x64
@dotnet-bot test outerloop netcoreapp CentOS7.1 Release Queues OuterLoop netcoreapp CentOS7.1 Release x64
@dotnet-bot test outerloop netcoreapp Debian8.4 Debug Queues OuterLoop netcoreapp Debian8.4 Debug x64
@dotnet-bot test outerloop netcoreapp Debian8.4 Release Queues OuterLoop netcoreapp Debian8.4 Release x64
@dotnet-bot test outerloop netcoreapp Fedora24 Debug Queues OuterLoop netcoreapp Fedora24 Debug x64
@dotnet-bot test outerloop netcoreapp Fedora24 Release Queues OuterLoop netcoreapp Fedora24 Release x64
@dotnet-bot test outerloop netcoreapp OpenSUSE13.2 Debug Queues OuterLoop netcoreapp OpenSUSE13.2 Debug x64
@dotnet-bot test outerloop netcoreapp OpenSUSE13.2 Release Queues OuterLoop netcoreapp OpenSUSE13.2 Release x64
@dotnet-bot test outerloop netcoreapp OpenSUSE42.1 Debug Queues OuterLoop netcoreapp OpenSUSE42.1 Debug x64
@dotnet-bot test outerloop netcoreapp OpenSUSE42.1 Release Queues OuterLoop netcoreapp OpenSUSE42.1 Release x64
@dotnet-bot test outerloop netcoreapp OSX10.12 Debug Queues OuterLoop netcoreapp OSX10.12 Debug x64
@dotnet-bot test outerloop netcoreapp OSX10.12 Release Queues OuterLoop netcoreapp OSX10.12 Release x64
@dotnet-bot test outerloop netcoreapp PortableLinux Debug Queues OuterLoop netcoreapp PortableLinux Debug x64
@dotnet-bot test outerloop netcoreapp PortableLinux Release Queues OuterLoop netcoreapp PortableLinux Release x64
@dotnet-bot test outerloop netcoreapp RHEL7.2 Debug Queues OuterLoop netcoreapp RHEL7.2 Debug x64
@dotnet-bot test outerloop netcoreapp RHEL7.2 Release Queues OuterLoop netcoreapp RHEL7.2 Release x64
@dotnet-bot test outerloop netcoreapp Ubuntu14.04 Debug Queues OuterLoop netcoreapp Ubuntu14.04 Debug x64
@dotnet-bot test outerloop netcoreapp Ubuntu14.04 Release Queues OuterLoop netcoreapp Ubuntu14.04 Release x64
@dotnet-bot test outerloop netcoreapp Ubuntu16.04 Debug Queues OuterLoop netcoreapp Ubuntu16.04 Debug x64
@dotnet-bot test outerloop netcoreapp Ubuntu16.04 Release Queues OuterLoop netcoreapp Ubuntu16.04 Release x64
@dotnet-bot test outerloop netcoreapp Ubuntu16.10 Debug Queues OuterLoop netcoreapp Ubuntu16.10 Debug x64
@dotnet-bot test outerloop netcoreapp Ubuntu16.10 Release Queues OuterLoop netcoreapp Ubuntu16.10 Release x64
@dotnet-bot test outerloop netcoreapp Windows 10 Debug Queues OuterLoop netcoreapp Windows 10 Debug x64
@dotnet-bot test outerloop netcoreapp Windows 10 Release Queues OuterLoop netcoreapp Windows 10 Release x64
@dotnet-bot test outerloop netcoreapp Windows 7 Debug Queues OuterLoop netcoreapp Windows 7 Debug x64
@dotnet-bot test outerloop netcoreapp Windows 7 Release Queues OuterLoop netcoreapp Windows 7 Release x64
@dotnet-bot test outerloop netcoreapp Windows_NT Debug Queues OuterLoop netcoreapp Windows_NT Debug x64
@dotnet-bot test outerloop netcoreapp Windows_NT Release Queues OuterLoop netcoreapp Windows_NT Release x64
@dotnet-bot test outerloop netfx Windows_NT Debug Queues OuterLoop netfx Windows_NT Debug x64
@dotnet-bot test outerloop netfx Windows_NT Release Queues OuterLoop netfx Windows_NT Release x64
@dotnet-bot test outerloop Windows Nano 2016 Debug Queues OuterLoop Windows Nano 2016 Debug
@dotnet-bot test outerloop Windows Nano 2016 Release Queues OuterLoop Windows Nano 2016 Release
@dotnet-bot test innerloop RHEL7.2 Debug Queues Innerloop RHEL7.2 Debug x64 Build and Test
@dotnet-bot test innerloop RHEL7.2 Release Queues Innerloop RHEL7.2 Release x64 Build and Test
@dotnet-bot test innerloop Ubuntu14.04 arm Debug Queues Innerloop Ubuntu14.04 arm Debug Cross Build
@dotnet-bot test innerloop Ubuntu16.04 arm Release Queues Innerloop Ubuntu16.04 arm Release Cross Build
@dotnet-bot test innerloop Ubuntu16.04 Debug Queues Innerloop Ubuntu16.04 Debug x64 Build and Test
@dotnet-bot test innerloop Ubuntu16.04 Release Queues Innerloop Ubuntu16.04 Release x64 Build and Test
@dotnet-bot test innerloop Ubuntu16.10 Debug Queues Innerloop Ubuntu16.10 Debug x64 Build and Test
@dotnet-bot test innerloop Ubuntu16.10 Release Queues Innerloop Ubuntu16.10 Release x64 Build and Test

Have a nice day!

@shiftylogic
Copy link
Contributor

@dotnet-bot test Innerloop Windows_NT Debug x86 Build and Test

@ahsonkhan ahsonkhan changed the title Dont run the test for 32-bit process. Dont run the Span CopyToLargeSizeTest for 32-bit process. Apr 18, 2017
@shiftylogic
Copy link
Contributor

@dotnet-bot test outerloop Windows Nano 2016 Debug
@dotnet-bot test outerloop netcoreapp Windows_NT Debug

@shiftylogic
Copy link
Contributor

@dotnet-bot test outerloop netcoreapp Windows 10 Debug

public static void CopyToLargeSizeTest(long bufferSize)
{
// If this test is run in a 32-bit process, the large allocation will fail.
if (Unsafe.SizeOf<IntPtr>() != sizeof(long))
Copy link
Member

Choose a reason for hiding this comment

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

does !Environment.Is64BitProcess not work?

Copy link
Contributor

@mellinoe mellinoe Apr 18, 2017

Choose a reason for hiding this comment

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

Or just use IntPtr.Size == 8.

Copy link
Author

@ahsonkhan ahsonkhan Apr 18, 2017

Choose a reason for hiding this comment

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

I followed the examples here:
https://github.com/dotnet/corefx/blob/master/src/System.Memory/tests/Span/Overflow.cs#L25

Or just use IntPtr.Size == 8.

I could do:
https://github.com/dotnet/corefx/blob/master/src/System.Memory/tests/Span/Clear.cs#L233

What is the advantage of doing that? What is the difference between Unsafe.SizeOf<>() and sizeof()?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's just more convoluted, and involves unnecessary usage of Unsafe. It also relies on an unclear relationship between the size of IntPtr and the size of Int64.

I think we use IntPtr.Size == 8 in other parts of corefx, but if this pattern is more consistent with the Span tests, then it's okay.

Copy link
Contributor

Choose a reason for hiding this comment

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

What is the difference between Unsafe.SizeOf<>() and sizeof()?

sizeof(IntPtr) can only be called from an "unsafe" context. Unsafe.SizeOf<T>() can be called anywhere. They are otherwise identical. IntPtr.Size will also give you the same value.

Copy link
Author

Choose a reason for hiding this comment

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

It also relies on an unclear relationship between the size of IntPtr and the size of Int64.

Is the relationship unclear? I thought IntPtr can only be one of 32-bit or 64-bit.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it's a subtle distinction. What you want to know is whether the pointer size is 8 bytes or larger, because you are making a large memory allocation which might fail otherwise. Comparing it to the size of another type feels a little roundabout to me, when you really just want to know if it is 8 bytes or larger.

Copy link
Member

Choose a reason for hiding this comment

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

It's probably obvious but Environment.Is64BitProcess literally returns IntPtr.Size == 8. I don't know why not to use it but it's boviously not a big deal :)

@ahsonkhan
Copy link
Author

@dotnet-bot test outerloop Windows Nano 2016 Debug

@ahsonkhan
Copy link
Author

@danmosemsft
How do we run outerloop tests in the CI for these configs?

Failing configurations:
Windows.10.Amd64
x86-Debug
x86-Release

The outerloop tests only run for x64.

@danmoseley
Copy link
Member

We don't run x86 at all on outer loop, which is not great. I'll follow up on that offline. Meantime you will have to run locally.

@danmoseley
Copy link
Member

ie add /p:outerloop=true

@danmoseley
Copy link
Member

@ahsonkhan
Copy link
Author

What is the resolution for this CI failure (if one exists)?

12:56:58 First time build. Skipping changelog. 12:56:59 Schedule job dotnet_corefx » master » outerloop_winnano16_debug_bld_prtest 13:05:52 Build dotnet_corefx » master » outerloop_winnano16_debug_bld_prtest #10 started 13:15:11 dotnet_corefx » master » outerloop_winnano16_debug_bld_prtest #10 completed 13:15:11 ERROR: Failed to run DSL Script 13:15:11 com.cloudbees.plugins.flow.JobNotFoundException: Item dotnet_corefx/master/outerloop_winnano16_debug_tst_prtest not found (or isn't a job). 13:15:11 at sun.reflect.GeneratedConstructorAccessor770.newInstance(Unknown Source) 13:15:11 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ...

@ahsonkhan
Copy link
Author

We don't run x86 at all on outer loop, which is not great. I'll follow up on that offline. Meantime you will have to run locally.

How did we catch this issue then? https://github.com/dotnet/corefx/issues/18540

@ahsonkhan
Copy link
Author

@dotnet-bot test outerloop Windows Nano 2016 Debug

@danmoseley
Copy link
Member

Yeah offline @weshaggard pointed out they just aren't labeled right on the main page of MC. If you drill down, they are x86.
I'll use the other issue ot track Jenkins.

@ahsonkhan
Copy link
Author

Meantime you will have to run locally.

I ran the tests locally using:

msbuild /t:rebuildandtest /p:ArchGroup=x86 /p:outerloop=true

=== TEST EXECUTION SUMMARY ===
System.Memory.Tests Total: 414, Errors: 0, Failed: 0, Skipped: 0, Time: 1.302s
Finished running tests. End time=13:39:55.33, Exit code = 0

There are 6 outerloop tests that "run" and 5 of them just return since they get skipped for x86 architecture (as expected).

@ahsonkhan
Copy link
Author

@shiftylogic, can this be merged?

@shiftylogic
Copy link
Contributor

I'd say yes. The failing Outerloop test is not from this change. The change is benign other than disabling the test for 32-bit.

@danmoseley
Copy link
Member

@mmitche is OuterLoop netcoreapp Windows 10 Debug x64 hung?

@danmoseley danmoseley merged commit 166e73f into dotnet:master Apr 19, 2017
@mmitche
Copy link
Member

mmitche commented Apr 19, 2017

@danmosemsft It looks like Azure has stopped deploying the VM image correctly (it's timing out). I'm contacting support.

@mmitche
Copy link
Member

mmitche commented Apr 19, 2017

@danmosemsft I think this might be just that this was an old TP5 2016 image that expired. Looking into whether I can just move this forward to another image.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants