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

Changes to the posix poller to ensure that fini is always safe. #1111

Merged
merged 1 commit into from
Jan 5, 2020

Conversation

gdamore
Copy link
Contributor

@gdamore gdamore commented Jan 5, 2020

We reap the connections when closing, to ensure that the clean up is
done outside the pollq thread. This also reduces pressure on the
pollq, we think. But more importantly it eliminates some complex
code that was meant to avoid deadlocks, but ultimately created other
use-after-free challenges. This work is an enabler for further
simplifications in the aio/task logic.

fixes #

Note that the above format should be used in your git commit comments.
You agree that by submitting a PR, you have read and agreed to our
contributing guidelines.

@codecov
Copy link

codecov bot commented Jan 5, 2020

Codecov Report

Merging #1111 into master will increase coverage by 0.07%.
The diff coverage is 88.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1111      +/-   ##
==========================================
+ Coverage   78.75%   78.83%   +0.07%     
==========================================
  Files         120      120              
  Lines       19146    19146              
==========================================
+ Hits        15079    15094      +15     
+ Misses       4067     4052      -15
Impacted Files Coverage Δ
src/supplemental/tls/mbedtls/tls.c 81.41% <100%> (+0.29%) ⬆️
src/platform/posix/posix_pollq_epoll.c 86.01% <100%> (ø) ⬆️
src/platform/posix/posix_tcpconn.c 87.17% <100%> (+3.12%) ⬆️
src/platform/posix/posix_ipcconn.c 78.41% <100%> (+0.38%) ⬆️
src/supplemental/tcp/tcp.c 78.96% <100%> (-0.69%) ⬇️
src/platform/posix/posix_pollq_kqueue.c 88.19% <100%> (ø) ⬆️
src/platform/posix/posix_resolv_gai.c 77.59% <60%> (+0.96%) ⬆️
src/platform/posix/posix_tcplisten.c 73.79% <60%> (-0.26%) ⬇️
src/platform/posix/posix_ipclisten.c 66.35% <60%> (+0.15%) ⬆️
src/platform/posix/posix_tcpdial.c 72.33% <71.42%> (-3.62%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36ff889...1eaf9e8. Read the comment docs.

We reap the connections when closing, to ensure that the clean up is
done outside the pollq thread.  This also reduces pressure on the
pollq, we think.  But more importantly it eliminates some complex
code that was meant to avoid deadlocks, but ultimately created other
use-after-free challenges.  This work is an enabler for further
simplifications in the aio/task logic.  While here we converted some
potentially racy locking of the dialers and reference counts to simpler
lock-free reference counting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant