Skip to content

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

Closed

Description

@janvorli

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

Activity

  1. added this to the 5.0 milestone on Apr 3, 2020
  2. janvorli commented on Apr 3, 2020

    @janvorli
    MemberAuthor
  3. janvorli commented on Apr 3, 2020

    @janvorli
    MemberAuthor

    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.

  4. janvorli commented on Apr 3, 2020

    @janvorli
    MemberAuthor

    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.

  5. janvorli commented on Apr 3, 2020

    @janvorli
    MemberAuthor

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

  6. hoyosjs commented on Apr 3, 2020

    @hoyosjs
    Member

    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.

  7. removed
    untriagedNew issue has not been triaged by the area owner
    on Apr 6, 2020
  8. modified the milestones: 5.0.0, 6.0.0 on Aug 3, 2020
  9. davidwrighton commented on Sep 11, 2020

    @davidwrighton
    Member

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

  10. ghost locked as resolved and limited conversation to collaborators on Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions