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

[6.3.0] Fix potential memory leak in UI #18659

Merged
merged 2 commits into from
Jun 14, 2023

Commits on Jun 13, 2023

  1. Fix potential memory leak in UI

    We report download progress to UI when downloading outputs from remote cache. UI thread keeps track of active downloads. There are two cases the UI thread could leak memory:
    
    1. If we failed to close the output stream, the `reporter.finished()` will never be called, prevent UI thread from releasing the active download. This is fixed by calling `reporter.finished()` in `finally` block.
    2. Normally, UI thread stops after `BuildCompleted` event. However, if we have background download after build is completed, UI thread is not stopped to continue printing out download progress. But after all downloads are done, we forgot to stop the UI thread, resulting all referenced objects leaked. This is fixed by calling `checkActivities()` for every download progress.
    
    Fixes bazelbuild#18145.
    
    Closes bazelbuild#18593.
    
    PiperOrigin-RevId: 539923685
    Change-Id: I7e2887035e540b39e382ab5fcbc06bad03b10427
    coeuvre authored and iancha1992 committed Jun 13, 2023
    Configuration menu
    Copy the full SHA
    59748fb View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2023

  1. Configuration menu
    Copy the full SHA
    e31d648 View commit details
    Browse the repository at this point in the history