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

Internal Code Merge and update branding to 5.0.3 #46888

Merged
merged 14 commits into from
Jan 14, 2021
Merged

Internal Code Merge and update branding to 5.0.3 #46888

merged 14 commits into from
Jan 14, 2021

Conversation

Anipik
Copy link
Contributor

@Anipik Anipik commented Jan 12, 2021

  • Internal Code Merge
  • Update Branding to 5.0.3
  • Update PackageIndex
  • Remove building of shipped packages

@ghost
Copy link

ghost commented Jan 12, 2021

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

Issue Details
  • Internal Code Merge
  • Update Branding to 5.0.3
  • Update PackageIndex
  • Remove building of shipped packages
Author: Anipik
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

@Anipik
Copy link
Contributor Author

Anipik commented Jan 13, 2021

@akoeplinger can you take a look at the mono failure here ?

@akoeplinger
Copy link
Member

akoeplinger commented Jan 13, 2021

@Anipik hmm there's no Mono-specifics at that point, it should be identical to CoreCLR. I do see that the projects it complains about missing are indeed disabled on Mono:

/Users/runner/work/1/s/src/coreclr/tests/src/Directory.Build.targets(153,6): error : The native project files are missing in /Users/runner/work/1/s/artifacts/tests/coreclr/obj/OSX.x64.Release/Native/Interop/ICustomMarshaler/ConflictingNames/ please run build from the root of the repo at least once [/Users/runner/work/1/s/src/tests/Interop/ICustomMarshaler/ConflictingNames/SameNameDifferentAssembly.csproj]
/Users/runner/work/1/s/src/coreclr/tests/src/Directory.Build.targets(153,6): error : The native project files are missing in /Users/runner/work/1/s/artifacts/tests/coreclr/obj/OSX.x64.Release/Native/Interop/ICustomMarshaler/ConflictingNames/ please run build from the root of the repo at least once [/Users/runner/work/1/s/src/tests/Interop/ICustomMarshaler/ConflictingNames/MultipleALCs.csproj]
/Users/runner/work/1/s/src/coreclr/tests/src/Directory.Build.targets(153,6): error : The native project files are missing in /Users/runner/work/1/s/artifacts/tests/coreclr/obj/OSX.x64.Release/Native/Interop/LayoutClass/ please run build from the root of the repo at least once [/Users/runner/work/1/s/src/tests/Interop/LayoutClass/LayoutClassTest.csproj]
/Users/runner/work/1/s/src/coreclr/tests/src/Directory.Build.targets(153,6): error : The native project files are missing in /Users/runner/work/1/s/artifacts/tests/coreclr/obj/OSX.x64.Release/Native/Interop/PInvoke/DateTime/ please run build from the root of the repo at least once [/Users/runner/work/1/s/src/tests/Interop/PInvoke/DateTime/DateTimeTest.csproj]

Not sure why/how that could be triggered due to this PR though.

@Anipik
Copy link
Contributor Author

Anipik commented Jan 13, 2021

@akoeplinger any suggestions on fixing this ?

@danmoseley
Copy link
Member

danmoseley commented Jan 13, 2021

Raw log from the Unzip native test artifacts step just before this failing Copy native test components to test output folder step

https://dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_apis/build/builds/947215/logs/1954

In there I see .dylib files being extracted for other test libraries, but not for these four.

Now if I look in the CoreCLR native test builds, I see them being built for Debug but not for Release
https://dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_apis/build/builds/947215/logs/829
https://dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_apis/build/builds/947215/logs/528

@danmoseley
Copy link
Member

The release build seems to have failed here (silently)

2021-01-12T23:29:37.5425270Z [ 97%] Linking CXX shared library libDllImportPath_Local.dylib
2021-01-12T23:29:37.5530700Z [ 97%] Linking CXX shared library libAnsiBStrTestNative.dylib
2021-01-12T23:29:37.6099410Z /bin/sh: /bin/sh: cannot execute binary file
2021-01-12T23:29:37.6201080Z make[1]: *** [Interop/StringMarshalling/AnsiBSTR/CMakeFiles/AnsiBStrTestNative.dir/all] Error 126
2021-01-12T23:29:37.6301230Z make[1]: *** Waiting for unfinished jobs....

whereas on debug it did not.

@danmoseley
Copy link
Member

It seems this error can mean that the system is asked to execute a binary that was built for a different architecture, but perhaps that's not the only possibility.
Adding @jkoritzinsky -- any reason why linking this test folder failed this way?

More (?) importantly, why did the build step not fail as a whole? See it failed even though make returned error 2:

2021-01-12T23:29:37.5319300Z [ 97%] Linking CXX shared library libExecInDefAppDomDll.dylib
2021-01-12T23:29:37.5425270Z [ 97%] Linking CXX shared library libDllImportPath_Local.dylib
2021-01-12T23:29:37.5530700Z [ 97%] Linking CXX shared library libAnsiBStrTestNative.dylib
2021-01-12T23:29:37.6099410Z /bin/sh: /bin/sh: cannot execute binary file
2021-01-12T23:29:37.6201080Z make[1]: *** [Interop/StringMarshalling/AnsiBSTR/CMakeFiles/AnsiBStrTestNative.dir/all] Error 126
2021-01-12T23:29:37.6301230Z make[1]: *** Waiting for unfinished jobs....
2021-01-12T23:29:37.6401920Z [ 97%] Built target ExecInDefAppDomDll
2021-01-12T23:29:37.6478070Z [ 97%] Built target DllImportPath_Local
2021-01-12T23:29:37.6579990Z [ 98%] Linking CXX shared library libExactSpellingNative.dylib
2021-01-12T23:29:37.6974160Z [ 98%] Built target ExactSpellingNative
2021-01-12T23:29:37.6981190Z make: *** [all] Error 2
2021-01-12T23:29:37.7002170Z Test build successful.
2021-01-12T23:29:37.7009820Z Test binaries are available at /Users/runner/work/1/s/artifacts/tests/coreclr/OSX.x64.Release

https://dev.azure.com/dnceng/public/_build/results?buildId=947215&view=logs&jobId=d9e9ad30-bad9-5a6a-fbc8-d1db16d2799e&j=f2a23cee-3431-50cb-c21a-1d5929055501&t=f6769e10-5d04-5826-7c9b-eeb756bab9ac

@danmoseley
Copy link
Member

I do not know how to continue investigation as I'm not familiar with how cmake works/our makefiles.

@akoeplinger
Copy link
Member

Hmm yeah the build step not failing even though there's an error is concerning.

@safern
Copy link
Member

safern commented Jan 13, 2021

It seems like somehow we're loosing the last exit code:

if [[ "$?" -ne 0 ]]; then

@danmoseley
Copy link
Member

If we had an idea how to generate that message, probably you could easily track down where the error code went. But I do not - if the linker itself was corrupted, I would imagine the other libraries would fail to build.

is there anything special these 4 have in common? or perhaps there is a race condition that only affected them - something getting overwritten?

@safern
Copy link
Member

safern commented Jan 13, 2021

Actually this is where we lost the exit code:

if [[ "$?" -ne 0 ]]; then

And that's why build_Tests didn't exit with exit code 1.

I can see this executed because of this message print in the logs:

echo "Commencing build of \"$message\" for $__TargetOS.$__BuildArch.$__BuildType in $intermediatesDir"

So it seems like build_native didn't return a failing exit code here:

exit "$exit_code"

@danmoseley
Copy link
Member

Which presumably means that cmake --build "/Users/runner/work/1/s/artifacts/tests/coreclr/obj/OSX.x64.Release/Native" --target install -- -j 4 did not return an error code for some reason.

Question remains what 2021-01-12T23:29:37.6099410Z /bin/sh: /bin/sh: cannot execute binary file is coming from...

@danmoseley
Copy link
Member

Might it be interesting to pull down the payload (that the test step is extracting from) -- it contains the cmake files for each library?

@safern
Copy link
Member

safern commented Jan 13, 2021

In that case I think @trylek or @jkoritzinsky could point us towards the right direction on how to try and repro this with what we have from the build to figure out what's swallowing the exit code

@trylek
Copy link
Member

trylek commented Jan 13, 2021

$cmake_command --build "$intermediatesDir" --target install -- -j "$__NumProc"

seems to be missing the error check bit we now have in the equivalent place

exit_code="$?"

@danmoseley
Copy link
Member

Aha - yes, that's necessary because the next line CFLAGS="${SAVED_CFLAGS}" resets the error code!

dan@LAPTOP-P6UJDVTA:~$ echo $?
127
dan@LAPTOP-P6UJDVTA:~$ FOO=BAR
dan@LAPTOP-P6UJDVTA:~$ echo $?
0

This is not the case on Windows.

Any way we could search for any other such places to fix?

@safern
Copy link
Member

safern commented Jan 13, 2021

Ah right. Thanks @trylek I totally missed that setting vars resets the exit code 😄

@Anipik
Copy link
Contributor Author

Anipik commented Jan 13, 2021

would it make sense to merge this branding PR and create an issue to track this failure ? this will help us make progress on merging the servicing approved changes.

@safern
Copy link
Member

safern commented Jan 13, 2021

Yeah, however it would be good to actually add this:

exit_code="$?"
to 5.0 branch.

@trylek
Copy link
Member

trylek commented Jan 14, 2021

For "other places to fix", we have some that Jarret collected based on developer reports in

#44393

I'm not sure if I see any easy way to auto-scan the scripts for swallowed error codes like this.

@danmoseley
Copy link
Member

@Anipik the change to cherry-pick is cd7d23f

@Anipik
Copy link
Contributor Author

Anipik commented Jan 14, 2021

@Anipik the change to cherry-pick is cd7d23f

i will cherry-pick and push

When native build fails, handle exit code properly by checking it immediately after cmake is called
@danmoseley
Copy link
Member

The only failure is this on Mono:
System.Threading.Tests.ThreadLocalTests.RunThreadLocalTest8_Values

probably not worth logging/investigating unless it reoccurs, since this is a servicing branch.


Error message
System.Threading.Tasks.TaskSchedulerException : An exception was thrown by a TaskScheduler.\n---- System.ExecutionEngineException : Couldn't create thread. Error 0x0


Stack trace
   at System.Threading.Tasks.Task.ScheduleAndStart(Boolean needsProtection) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 1696
   at System.Threading.Tasks.Task`1[[System.Int32, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].StartNew(Task parent, Func`1 function, CancellationToken cancellationToken, TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler scheduler) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:line 333
   at System.Threading.Tasks.TaskFactory.StartNew[Int32](Func`1 function, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskFactory.cs:line 629
   at System.Threading.Tests.ThreadLocalTests.RunThreadLocalTest8_Values() in /_/src/libraries/System.Threading/tests/ThreadLocalTests.cs:line 253
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in /_/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs:line 384
----- Inner Stack Trace -----
   at System.Threading.Thread.Start(Object parameter) in /_/src/mono/netcore/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs:line 265
   at System.Threading.Tasks.ThreadPoolTaskScheduler.QueueTask(Task task) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs:line 50
   at System.Threading.Tasks.TaskScheduler.InternalQueueTask(Task task) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskScheduler.cs:line 237
   at System.Threading.Tasks.Task.ScheduleAndStart(Boolean needsProtection) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 1668

@danmoseley
Copy link
Member

@Anipik mergeable?

@Anipik
Copy link
Contributor Author

Anipik commented Jan 14, 2021

@Anipik mergeable?

yes we can merge this one. waiting for a review cc @safern @ViktorHofer @ericstj @aik-jahoda for a review ?

@Anipik Anipik merged commit 9874123 into dotnet:release/5.0 Jan 14, 2021
@Anipik Anipik deleted the branding503 branch January 14, 2021 03:34
@ghost ghost locked as resolved and limited conversation to collaborators Feb 13, 2021
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.

8 participants