Skip to content

Add zombie-event option to debug leaked Http2ClientSessions.#3713

Merged
shinrich merged 1 commit intoapache:masterfrom
shinrich:h2-zombie-debug
May 25, 2018
Merged

Add zombie-event option to debug leaked Http2ClientSessions.#3713
shinrich merged 1 commit intoapache:masterfrom
shinrich:h2-zombie-debug

Conversation

@shinrich
Copy link
Copy Markdown
Member

Debugging option. If you enable the feature, it will schedule zombie events when one but not both of the Session shutdown requirements is set. If the zombie event goes off (presumably long after the session should have finished cleaning up), the traffic server process will assert.

This has been incredibly useful in debugging some Http2ClientSession clean scenarios (more PR's to come).

case VC_EVENT_INACTIVITY_TIMEOUT:
case VC_EVENT_ERROR:
case VC_EVENT_EOS:
this->set_dying_event(event);
Copy link
Copy Markdown
Collaborator

@a-canary a-canary May 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set_dying_event() is not called anywhere else in code. Should it be?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, all the dying eventually comes through this handler.

@shinrich shinrich force-pushed the h2-zombie-debug branch 2 times, most recently from a3aae5b to c423ac2 Compare May 24, 2018 21:34
Comment thread proxy/http2/Http2ConnectionState.cc Outdated
Http2StreamDebug(cstate.ua_session, id, "Received DATA frame");

if (cstate.get_zombie_event()) {
Warning("Data frame for zombied sessoin %" PRId64, cstate.ua_session->connection_id());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"sessoin"?

Comment thread proxy/http2/Http2ConnectionState.cc Outdated
Http2StreamDebug(cstate.ua_session, stream_id, "Received PING frame");

if (cstate.get_zombie_event()) {
Warning("Ping frame for zombied sessoin %" PRId64, cstate.ua_session->connection_id());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought you had said you were going to handle PING differently and reset the zombie timeout in that case.

if (edata == fini_event) {
if (edata == zombie_event) {
// zombie session is still around. Assert
ink_release_assert(zombie_event == nullptr);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want something more like ink_release_assert(!"Zombie HTTP/2 event occurred");

@shinrich shinrich merged commit aa5ead6 into apache:master May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants