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

[JENKINS-63520] Sequence the startup and receiving to avoid a deadlock. #445

Merged
merged 2 commits into from
Apr 25, 2021

Conversation

jeffret-b
Copy link
Contributor

See JENKINS-63520.

Some users have reported a rare thread deadlock when starting an inbound TCP agent. There are no known reports of this occurring at other times. The reporter included a stack track showing information about the deadlock. It occurs when the agent ProtocolStack is still initializing and a message is received on the networking layer.

Personally, I've never observed the problem and have no way of testing it. I've tested normal behavior and this fix has worked fine.

This fix delays the processing of any received messages until after the ProtocolStack has fully initialized.

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • [n/a] Link to relevant pull requests, esp. upstream and downstream changes
  • [n/p] Ensure you have provided tests - that demonstrates feature works or fixes the issue

Attempt to resolve the deadlock by making the receive operation wait until the ProtocolStack has fully started.
@jeffret-b
Copy link
Contributor Author

Looks like we lost the agent mid-build. Let's try again.

@jeffret-b jeffret-b closed this Apr 14, 2021
@jeffret-b jeffret-b reopened this Apr 14, 2021
@jeffret-b jeffret-b requested a review from jvz April 17, 2021 14:49
@jenkinsci jenkinsci deleted a comment from jeffret-bg Apr 17, 2021
Copy link
Member

@jvz jvz left a comment

Choose a reason for hiding this comment

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

Excellent!

@jeffret-b jeffret-b added bug For changelog: Fixes a bug. ready-to-merge labels Apr 25, 2021
@jeffret-b jeffret-b merged commit 6e16d3a into jenkinsci:master Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Fixes a bug. ready-to-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants