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

Fix to the panic due to the send on a closed channel #2804

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

wonwuakpa-msft
Copy link

PR for GitHub issue #2703

Implemented a RWMutex to ensure exclusive access to critical parts of the codebase i.e channel closures and sends. The issue linked above is related specifically to the xferDone channel. Similar implementation was done for other channels in jobStatusManager with the mutually exclusive read and write locks.

ste/mgr-JobMgr.go Outdated Show resolved Hide resolved
@dphulkar-msft
Copy link
Collaborator

Just wondering if we could add a testcase around it.
@wonwuakpa-msft

@wonwuakpa-msft
Copy link
Author

@dphulkar-msft This bug fix, to me, seems tricky to test because of its non-deterministic nature. I was able to repro the error the customer had without having a panic on my end. In some cases, it might panic, in others it might not. It boils down to the timing of closing a channel before sending a message down it.

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.

4 participants