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

TS-4916 Add safety net to avoid H2-infinite-loop deadlock. #1157

Merged
merged 1 commit into from
Oct 27, 2016
Merged

TS-4916 Add safety net to avoid H2-infinite-loop deadlock. #1157

merged 1 commit into from
Oct 27, 2016

Conversation

gtenev
Copy link
Contributor

@gtenev gtenev commented Oct 27, 2016

Current Http2ConnectionState implementation uses a memory pool for
instantiating streams and DLL<> stream_list for storing active streams.
Destroying a stream before deleting it from stream_list and then creating
a new one + reusing the same chunk from the memory pool right away always
leads to destroying the DLL structure (deadlocks, inconsistencies).
Added a safety net since the consequences are disastrous.
Until the design/implementation changes it seems less error prone
to (double) delete before destroying (noop if already deleted).

(cherry picked from commit a6f9337)

Conflicts:
proxy/http2/Http2ConnectionState.cc

Current Http2ConnectionState implementation uses a memory pool for
instantiating streams and DLL<> stream_list for storing active streams.
Destroying a stream before deleting it from stream_list and then creating
a new one + reusing the same chunk from the memory pool right away always
leads to destroying the DLL structure (deadlocks, inconsistencies).
Added a safety net since the consequences are disastrous.
Until the design/implementation changes it seems less error prone
to (double) delete before destroying (noop if already deleted).

(cherry picked from commit a6f9337)

Conflicts:
	proxy/http2/Http2ConnectionState.cc
@atsci
Copy link

atsci commented Oct 27, 2016

Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/1002/ for details.

@atsci
Copy link

atsci commented Oct 27, 2016

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1109/ for details.

@PSUdaemon PSUdaemon merged commit eb1d019 into apache:6.2.x Oct 27, 2016
@PSUdaemon PSUdaemon added this to the 6.2.1 milestone Nov 2, 2016
@PSUdaemon PSUdaemon added HTTP/2 Backport Marked for backport for an LTS patch release labels Nov 2, 2016
@PSUdaemon PSUdaemon self-assigned this Nov 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport Marked for backport for an LTS patch release HTTP/2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants