Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

[Backport 5.0] searcher: always call Wait on comby processes#50313

Merged
keegancsmith merged 1 commit into
5.0from
backport-50034-to-5.0
Apr 3, 2023
Merged

[Backport 5.0] searcher: always call Wait on comby processes#50313
keegancsmith merged 1 commit into
5.0from
backport-50034-to-5.0

Conversation

@github-actions

@github-actions github-actions Bot commented Apr 3, 2023

Copy link
Copy Markdown
Contributor

If you call Start you must always call Wait to free up resources. In particular this is the likely cause of a huge goroutine leak in the searcher process which all blames to the os/exec package waiting on a context.

This was an accidental regression introduced when this code was ported to using conc. Previously it would always call Wait, but now if something in the introduced pool fails, we don't call Wait.

Test Plan: CI

Likely fix for https://github.com/sourcegraph/sourcegraph/issues/49987
Backport 257ba04 from #50034

If you call Start you _must_ always call Wait to free up resources. In
particular this is the likely cause of a huge goroutine leak in the
searcher process which all blames to the os/exec package waiting on a
context.

This was an accidental regression introduced when this code was ported
to using conc. Previously it would always call Wait, but now if
something in the introduced pool fails, we don't call Wait.

Test Plan: CI

(cherry picked from commit 257ba04)
@github-advanced-security

Copy link
Copy Markdown

You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@keegancsmith keegancsmith merged commit ea3bef8 into 5.0 Apr 3, 2023
@keegancsmith keegancsmith deleted the backport-50034-to-5.0 branch April 3, 2023 20:25
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.

2 participants