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

CI build of Linux runtime doesn't stop on coreclr compilation errors #34496

Closed
janvorli opened this issue Apr 3, 2020 · 6 comments
Closed

CI build of Linux runtime doesn't stop on coreclr compilation errors #34496

janvorli opened this issue Apr 3, 2020 · 6 comments

Comments

@janvorli
Copy link
Member

janvorli commented Apr 3, 2020

I have noticed that when a native coreclr stuff compilation failed, the build was continuing, tried to run corerun that was not produced and failed. Then it tried to generate packages for coreclr and failed again. But it still continued building further stuff, finally failing when trying to crossgen something else.

We should fail the build as soon as coreclr build failed.

Here is an example, see lines 3129 and on:
https://dev.azure.com/dnceng/public/_build/results?buildId=587189&view=logs&j=da3b6fae-2b9c-515e-f961-941b19f305e4&t=e211c71e-116d-5222-99f8-68e08c58ca66

@janvorli janvorli added this to the 5.0 milestone Apr 3, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Apr 3, 2020
@janvorli
Copy link
Member Author

janvorli commented Apr 3, 2020

cc: @jkoritzinsky, @trylek

@janvorli
Copy link
Member Author

janvorli commented Apr 3, 2020

cc: @ViktorHofer - I can see it repros locally on Linux as well if I just run the root build script and have some error in one of the coreclr native cpp sources. I haven't spotted this before as I use just the src/coreclr/build.sh script in my workflow.
It seems the failure exit codes from the .sh scripts invoked by Exec command in the src/coreclr/runtime.proj are not detected / propagated for some reason.

@janvorli
Copy link
Member Author

janvorli commented Apr 3, 2020

In my local testing, I can see this logged to the console, similar to the CI job:
/home/janvorli/git/runtime/src/coreclr/runtime.proj(26,5): error MSB3073: The command ""/home/janvorli/git/runtime/src/coreclr/build-runtime.sh" -x64 -debug -os Linux" exited with code 2.
But the build keeps going on.

@janvorli
Copy link
Member Author

janvorli commented Apr 3, 2020

Hmm, it seems that the crossgen-build.proj doesn't have any dependency on the runtime.proj - how are the dependencies specified then?

@hoyosjs
Copy link
Member

hoyosjs commented Apr 3, 2020

They are specified as separate projects to build here

<ProjectToBuild Include="@(CoreClrNativeCoreLibProjectToBuild)" />

And they get run in arcade here: https://github.com/dotnet/arcade/blob/011efe624f0cfed1f218cc9893864e2d712c8845/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj#L249

crossgen-corelib.proj is marked to be built serially, so it builds after the other defined projects. I do agree the experience here isn't great to not stop of failure. However, I think StopOnFailure gets ignored sadly.

@jashook jashook removed the untriaged New issue has not been triaged by the area owner label Apr 6, 2020
@jashook jashook modified the milestones: 5.0.0, 6.0.0 Aug 3, 2020
@davidwrighton
Copy link
Member

Fixed by #42104. This was a simple issue of capturing the exit code at the wrong point.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants