Skip to content

Conversation

@rahulkhinchi-wq
Copy link

Pull Request — Semgrep Rule Fix
Rule ID: missing-unlock-before-return
Rule Message: Missing mutex unlock (c.outputMux variable) before returning from a function. This could result in panics resulting from double lock operations
File Path: /tools/scanResult/unzipped-1969552506/acceptance/invoke/pack.go
Line: 163

Summary

This pull request resolves a concurrency issue detected by Semgrep, where a mutex (outputMux) was not unlocked before an early return. Failing to unlock a mutex can lead to deadlocks and unpredictable behavior.

Change Details

Modified File

acceptance/invoke/pack.go

Update

  • Added a missing c.outputMux.Unlock() immediately before the early return statement to ensure the mutex is always released.

Rationale

The Semgrep check identified that the function could return without unlocking the mutex, which can result in blocked goroutines and test instability. This PR ensures proper lock management and prevents potential deadlocks.

root and others added 2 commits November 18, 2025 10:26
…-before-return-163-ZOt25WBdla

fix: semgrep-missing-unlock-before-return
@rahulkhinchi-wq rahulkhinchi-wq requested review from a team as code owners November 25, 2025 16:06
@github-actions github-actions bot added this to the 0.39.0 milestone Nov 25, 2025
@github-actions github-actions bot added type/enhancement Issue that requests a new feature or improvement. type/chore Issue that requests non-user facing changes. labels Nov 25, 2025
@jjbustamante jjbustamante modified the milestones: 0.39.0, 0.40.0 Nov 27, 2025
@rahulkhinchi-wq
Copy link
Author

Hi @jjbustamante, can you please look into it and let me know if any changes are required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/chore Issue that requests non-user facing changes. type/enhancement Issue that requests a new feature or improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants