Skip to content

[Race Detector-3] Add go vet#2082

Open
syeleti-msft wants to merge 1 commit intomainfrom
syeleti/lint
Open

[Race Detector-3] Add go vet#2082
syeleti-msft wants to merge 1 commit intomainfrom
syeleti/lint

Conversation

@syeleti-msft
Copy link
Member

@syeleti-msft syeleti-msft commented Dec 3, 2025

Type of Change

  • Bug fix
  • New feature
  • Code quality improvement
  • Other (describe):

Description

This will pass the test once these PR's 1, 2 are merged

How Has This Been Tested?

Checklist

  • The purpose of this PR is explained in this or a referenced issue.
  • Tests are included and/or updated for code changes.
  • Documentation update required.
  • Updates to module CHANGELOG.md are included.
  • License headers are included in each file.

Related Links

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds go vet static analysis to the CI pipeline and fixes race detector issues in the stress tests by replacing direct t.FailNow() calls from goroutines with an error signaling channel. The change also removes an unused context cancellation function in cmd/mount.go.

Key Changes

  • Added go vet step to CI pipeline to catch concurrency issues and other code problems
  • Refactored stress test workers to use error channels instead of calling t.FailNow() from goroutines (which is unsafe)
  • Removed unused cancel function from context creation in mount command

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
test/stress_test/stress_test.go Refactored worker functions to use error signaling channels and select statements for error handling instead of calling t.FailNow() directly from goroutines
cmd/mount.go Removed unused cancel function from context.WithCancel() call, replaced with context.Background()
blobfuse2-1es_ci.yaml Added go vet static analysis step to CI pipeline after build and before lint checks

Critical Issues Found: The error channel implementation has several race conditions and potential deadlocks that need to be addressed:

  1. The errSig channels are unbuffered, which can cause workers to block when sending errors
  2. Workers continue to send to the results channel even after reporting errors, leading to race conditions when the main goroutine calls t.FailNow()

@syeleti-msft syeleti-msft force-pushed the syeleti/lint branch 2 times, most recently from d46185b to 55b6cfb Compare December 3, 2025 12:16
@syeleti-msft syeleti-msft added this to the v2-2.5.2 milestone Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants