This is an automated email from the ASF dual-hosted git repository. masaori pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push: new 763be6c Make sure ua_session is not nullptr 763be6c is described below commit 763be6c2aa883f898804cd85e4baabeb09d20394 Author: Masaori Koshiba <masa...@apache.org> AuthorDate: Tue Oct 30 08:20:39 2018 +0900 Make sure ua_session is not nullptr Workaround fix for GitHub 4504. The `ua_session` could be freed while waiting for acquiring the lock. --- proxy/http2/Http2ConnectionState.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index add8df7..a7cf6e7 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -1244,6 +1244,10 @@ Http2ConnectionState::release_stream(Http2Stream *stream) if (ua_session) { SCOPED_MUTEX_LOCK(lock, this->ua_session->mutex, this_ethread()); + if (!ua_session) { + // Workaround fix for GitHub #4504. The `ua_session` could be freed while waiting for acquiring the above lock. + return; + } // If the number of clients is 0 and ua_session is active, then mark the connection as inactive if (total_client_streams_count == 0 && ua_session->is_active()) {