-
Notifications
You must be signed in to change notification settings - Fork 779
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
Set nullptr to ua_session after it is destoryed #1455
Conversation
We need to backport this to 7.1.x ( I'll send another PR after we verified this works well) |
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1559/ for details. |
Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1454/ for details. |
clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/124/ for details. |
16d3672
to
c0fbc4b
Compare
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1561/ for details. |
Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1455/ for details. |
Issue: Crash by EXC_BAD_ACCESS in Http2ConnectionState::release_stream() under heavy load Cause: While total_connections_in is larger than max_connections_per_thread_in (in NetHandler::manage_keep_alive_queue()), Http2ConnectionState::release_stream() is called recurcively from add_to_keep_alive_queue(). At the bottom of recursion, ua_session is destroyed and Http2ConnectionState::release_stream() access to it. Fix: 1. Set nullptr to ua_session after it is destoryed 2. Swap calls of add_to_keep_alive_queue() and cancel_active_timeout() for ua_session nullptr check 3. Check m_active of ua_session to reduce recursion
c0fbc4b
to
a8c389f
Compare
clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/126/ for details. |
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1562/ for details. |
Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1456/ for details. |
clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/127/ for details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been running with this on Docs and on a small number of prod boxes without problems. I'm comfortable landing this.
I cherry-picked this to 7.1.x, so no need to make an additional PR. |
Issue:
Crash by EXC_BAD_ACCESS in Http2ConnectionState::release_stream() under heavy load
Cause:
While total_connections_in is larger than max_connections_per_thread_in (in NetHandler::manage_keep_alive_queue()),
Http2ConnectionState::release_stream() is called recurcively from add_to_keep_alive_queue().
At the bottom of recursion, ua_session is destroyed and Http2ConnectionState::release_stream() access to it.
Fix: