You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2017/07/25 23:59:32 UTC

[trafficserver] branch master updated: H2 Assert fails sometimes at Http2DependencyTree::deactivate

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 f5b5ff8  H2 Assert fails sometimes at Http2DependencyTree::deactivate
f5b5ff8 is described below

commit f5b5ff8f923a1873560e14be8cb7ed709ed0e7bb
Author: scw00 <sc...@apache.org>
AuthorDate: Sat Jul 22 05:30:09 2017 +0800

    H2 Assert fails sometimes at Http2DependencyTree::deactivate
---
 proxy/http2/Http2ConnectionState.cc | 10 +++++-----
 proxy/http2/Http2ConnectionState.h  |  2 +-
 proxy/http2/Http2DependencyTree.h   |  2 --
 proxy/http2/Http2Stream.h           |  2 --
 4 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index d1639a5..c397d36 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -1029,7 +1029,7 @@ Http2ConnectionState::create_stream(Http2StreamId new_id, Http2Error &error)
   ink_assert(nullptr != new_stream);
   ink_assert(!stream_list.in(new_stream));
 
-  stream_list.push(new_stream);
+  stream_list.enqueue(new_stream);
   if (client_streamid) {
     latest_streamid_in = new_id;
     ink_assert(client_streams_in_count < UINT32_MAX);
@@ -1055,7 +1055,7 @@ Http2ConnectionState::create_stream(Http2StreamId new_id, Http2Error &error)
 Http2Stream *
 Http2ConnectionState::find_stream(Http2StreamId id) const
 {
-  for (Http2Stream *s = stream_list.head; s; s = s->link.next) {
+  for (Http2Stream *s = stream_list.head; s; s = static_cast<Http2Stream *>(s->link.next)) {
     if (s->get_id() == id) {
       return s;
     }
@@ -1070,7 +1070,7 @@ Http2ConnectionState::restart_streams()
   Http2Stream *s = stream_list.head;
 
   while (s) {
-    Http2Stream *next = s->link.next;
+    Http2Stream *next = static_cast<Http2Stream *>(s->link.next);
     if (!s->is_closed() && s->get_state() == Http2StreamState::HTTP2_STREAM_STATE_HALF_CLOSED_REMOTE &&
         min(this->client_rwnd, s->client_rwnd) > 0) {
       s->send_response_body();
@@ -1085,7 +1085,7 @@ Http2ConnectionState::cleanup_streams()
 {
   Http2Stream *s = stream_list.head;
   while (s) {
-    Http2Stream *next = s->link.next;
+    Http2Stream *next = static_cast<Http2Stream *>(s->link.next);
     this->delete_stream(s);
     ink_assert(s != next);
     s = next;
@@ -1177,7 +1177,7 @@ void
 Http2ConnectionState::update_initial_rwnd(Http2WindowSize new_size)
 {
   // Update stream level window sizes
-  for (Http2Stream *s = stream_list.head; s; s = s->link.next) {
+  for (Http2Stream *s = stream_list.head; s; s = static_cast<Http2Stream *>(s->link.next)) {
     s->client_rwnd = new_size - (client_settings.get(HTTP2_SETTINGS_INITIAL_WINDOW_SIZE) - s->client_rwnd);
   }
 }
diff --git a/proxy/http2/Http2ConnectionState.h b/proxy/http2/Http2ConnectionState.h
index 3e8e75f..94d1d2c 100644
--- a/proxy/http2/Http2ConnectionState.h
+++ b/proxy/http2/Http2ConnectionState.h
@@ -274,7 +274,7 @@ private:
   //   is CLOSED.
   //   If given Stream Identifier is not found in stream_list and it is greater
   //   than latest_streamid_in, the state of Stream is IDLE.
-  DLL<Http2Stream> stream_list;
+  Queue<Http2Stream> stream_list;
   Http2StreamId latest_streamid_in  = 0;
   Http2StreamId latest_streamid_out = 0;
   int stream_requests               = 0;
diff --git a/proxy/http2/Http2DependencyTree.h b/proxy/http2/Http2DependencyTree.h
index 8a16c13..007603b 100644
--- a/proxy/http2/Http2DependencyTree.h
+++ b/proxy/http2/Http2DependencyTree.h
@@ -316,8 +316,6 @@ Http2DependencyTree<T>::deactivate(Node *node, uint32_t sent)
   node->active = false;
 
   while (node->queue->empty() && node->parent != NULL) {
-    ink_assert(node->parent->queue->top() == node->entry);
-
     node->parent->queue->pop();
     node->queued = false;
 
diff --git a/proxy/http2/Http2Stream.h b/proxy/http2/Http2Stream.h
index e77a2a2..d9828cc 100644
--- a/proxy/http2/Http2Stream.h
+++ b/proxy/http2/Http2Stream.h
@@ -153,8 +153,6 @@ public:
   ssize_t client_rwnd;
   ssize_t server_rwnd = Http2::initial_window_size;
 
-  LINK(Http2Stream, link);
-
   uint8_t *header_blocks        = nullptr;
   uint32_t header_blocks_length = 0;  // total length of header blocks (not include
                                       // Padding or other fields)

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].