-
Notifications
You must be signed in to change notification settings - Fork 223
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
elasticapm/transport: specific shutdown handling for http transport #2085
Conversation
568c0ba
to
20d51c0
Compare
It looks like the tests that replicates the submission timeout is flaky on windows:
|
Honestly, I've been extremely tempted to remove our windows support entirely. I don't think anyone uses it, and the majority of our flakey tests have been on windows. (You can easily search for some of our other tests we skip on windows due to flakiness.) |
20d51c0
to
08136b4
Compare
We have a race condition at http transport shutdown where our atexit handler is racing against urllib3 ConnectionPool weakref finalizer. Having the urllib3 finalizer called before atexit would lead to have our thread hang waiting for send any eventual queued data via urllib3 pools that are closed. Force the creation of a new PoolManager so that we are always able to flush.
08136b4
to
25c4f9e
Compare
This time the problem was the test itself :) |
…lastic#2085) We have a race condition at http transport shutdown where our atexit handler is racing against urllib3 ConnectionPool weakref finalizer. Having the urllib3 finalizer called before atexit would lead to have our thread hang waiting for send any eventual queued data via urllib3 pools that are closed. Force the creation of a new PoolManager so that we are always able to flush.
…2085) We have a race condition at http transport shutdown where our atexit handler is racing against urllib3 ConnectionPool weakref finalizer. Having the urllib3 finalizer called before atexit would lead to have our thread hang waiting for send any eventual queued data via urllib3 pools that are closed. Force the creation of a new PoolManager so that we are always able to flush.
What does this pull request do?
We have a race condition at http transport shutdown where our atexit handler is racing against urllib3 ConnectionPool weakref finalizer. Having the urllib3 finalizer called before atexit would lead to have our thread hang waiting for send any eventual queued data via urllib3 pools that are closed.
Force the creation of a new PoolManager so that we are always able to flush.
Related issues
Closes #1975