GitHub user masaori335 opened a pull request:

    https://github.com/apache/trafficserver/pull/1455

    Set nullptr to ua_session after it is destoryed

    Issue:
    TS crushes 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

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/masaori335/trafficserver fix_h2_bad_access

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/1455.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1455
    
----
commit 16d36720b15068d0c0bae0ca1fc321d0e1fa7a71
Author: Masaori Koshiba <[email protected]>
Date:   2017-02-15T08:31:54Z

    Set nullptr to ua_session after it is destoryed
    
    Issue:
    TS crushes 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

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to