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

Unlock Statsd when stopping to prevent deadlock #3258

Merged
merged 1 commit into from
Sep 22, 2017

Conversation

danielnelson
Copy link
Contributor

@danielnelson danielnelson commented Sep 21, 2017

I noticed we have a TCP Benchmark but not one for UDP, which would be useful for #3254 so I added one based on the existing test. When running this I found that the plugin can deadlock on shutdown if there are messages pending on the input channel.

cc @agnivade

Required for all PRs:

  • Associated README.md updated. NA
  • Has appropriate unit tests.

@danielnelson danielnelson added the fix pr to fix corresponding bug label Sep 21, 2017
}

time.Sleep(time.Millisecond * 25)
conn, err := net.Dial("udp", "127.0.0.1:8125")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we write another benchmark which tests concurrent writing to multiple connections spawned in goroutines ? I think that might be closer to real world scenarios.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure it will change much in the case of UDP to have multiple senders. I do wish we had a test that we could run forever, similar to https://github.com/influxdata/influx-stress. Maybe something as already been written for statsd?

@danielnelson danielnelson merged commit 5239358 into master Sep 22, 2017
@danielnelson danielnelson deleted the fix-statsd-stop-deadlock branch September 22, 2017 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants