Skip to content

Builds hang if pub get has errors #74700

Description

@dnfield

This builder: https://ci.chromium.org/p/flutter/builders/try/Linux%20flutter_plugins
e.g. https://ci.chromium.org/p/flutter/builders/try/Linux%20flutter_plugins/1858

Here and several other cases, pub get failed. Instead of printing the error and exiting, the test just hangs until it times out.

@godofredoc @keyonghan

Activity

  1. godofredoc commented on Jan 26, 2021

    @godofredoc
    Contributor

    This happens when a command does not close subprocesses correctly. e.g the main process completes but leaves behind detached subprocesses.

  2. godofredoc commented on Jan 28, 2021

    @godofredoc
    Contributor

    Is this something we can assign to people more familiar with pub?

  3. self-assigned this
    on Jan 28, 2021
  4. added
    infra: metricsInfrastructure metrics-related issues
    and removed
    infra: metricsInfrastructure metrics-related issues
    on Feb 2, 2021
  5. changed the title [-]Linux flutter_plugins hangs if an error occurs[/-] [+]Builds hang if pub get has errors[/+] on Feb 3, 2021
  6. godofredoc commented on Feb 3, 2021

    @godofredoc
    Contributor

    @sigurdm is this something you can help us debug? we believe that when pub get fails it may not be closing some subprocesses. In LUCI when the main process is closed but somehow a detached subprocess continues running the task does not complete and times out.

  7. sigurdm commented on Feb 4, 2021

    @sigurdm
    Contributor

    Hmm flutter pub getinvokes bin/pub.dart from pub (compiled to a snapshot) that does an explicit call to exit(): https://github.com/dart-lang/pub/blob/master/bin/pub.dart#L9

    I think that should terminate lingering processes (unless they are completely detached - which we never do)...

    The only subprocesses pub get is invoking is tar for unzipping (https://github.com/dart-lang/pub/blob/master/lib/src/io.dart#L832).
    Another possible source of hanging is not closing a http-client - but again I believe exit() should save us.

    How reliably can we reproduce this? It would be helpful to run this with --verbose.

    @jonasfj any ideas?

  8. jonasfj commented on Feb 4, 2021

    @jonasfj
    Member

    We also have git subprocesses, if there are git dependencies.

    But maybe share the bits of the logs that problematic, I can't even see where it's hanging. What pubspec, etc.

  9. dnfield commented on Feb 4, 2021

    @dnfield
    ContributorAuthor

    This ends up happening I'd there is a version solving error, e.g. two incompatible constraints

  10. godofredoc commented on Oct 20, 2022

    @godofredoc
    Contributor

    @nehalvpatel this is related to the the pub cli timeouts

  11. removed their assignment
    on Oct 20, 2022
  12. nehalvpatel commented on Oct 20, 2022

    @nehalvpatel
    Contributor

    Thanks, looks like this will be able to be addressed after the retry refactoring / updates are done

  13. nehalvpatel commented on Nov 14, 2022

    @nehalvpatel
    Contributor

    Taking a look at this now that dart-lang/pub#3590 has been merged

  14. added
    P3Issues that are less important to the Flutter project
    triaged-infraTriaged by Infrastructure team
    on Aug 23, 2023
  15. github-actions commented on Mar 8, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  16. locked as resolved and limited conversation to collaborators on Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: contributor-productivityTeam-specific productivity, code health, technical debt.team-infraOwned by Infrastructure teamtriaged-infraTriaged by Infrastructure team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions