Skip to content

Fix bsup deadlock#6624

Merged
mattnibs merged 1 commit intomainfrom
bsup-deadlock
Feb 11, 2026
Merged

Fix bsup deadlock#6624
mattnibs merged 1 commit intomainfrom
bsup-deadlock

Conversation

@mattnibs
Copy link
Collaborator

Closes #6458

@mattnibs mattnibs requested a review from a team February 10, 2026 22:34
@@ -79,18 +79,22 @@ func (s *scanner) Pull(done bool) (sbuf.Batch, error) {
for {
select {
case ch := <-s.resultChCh:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the goroutine created by scanner.start closes resultChCh when it exits, you should be able to do this instead of adding another select statement.

Suggested change
case ch := <-s.resultChCh:
case ch, ok := <-s.resultChCh:
if !ok {
return nil, s.ctx.Err()
}

Copy link
Collaborator Author

@mattnibs mattnibs Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, let's try it

@philrz
Copy link
Contributor

philrz commented Feb 11, 2026

I tested this branch on its latest commit ce285ec using the repro recipe from #6458 and did not trigger any deadlocks so this is a functional 👍 for me.

@mattnibs mattnibs merged commit 4121139 into main Feb 11, 2026
3 of 4 checks passed
@mattnibs mattnibs deleted the bsup-deadlock branch February 11, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deadlock symptom when running group-by aggregation on BSUP input

3 participants