You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Sudheer Vinukonda (JIRA)" <ji...@apache.org> on 2014/11/11 00:34:33 UTC

[jira] [Commented] (TS-3184) spdy window_update not triggered correctly..

    [ https://issues.apache.org/jira/browse/TS-3184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14205561#comment-14205561 ] 

Sudheer Vinukonda commented on TS-3184:
---------------------------------------

A simple fix (thanks to [~yzlai]) for this issue:

{code}
diff --git a/proxy/spdy/SpdyCallbacks.cc b/proxy/spdy/SpdyCallbacks.cc
index 252f9a2..470ed71 100644
--- a/proxy/spdy/SpdyCallbacks.cc
+++ b/proxy/spdy/SpdyCallbacks.cc
@@ -373,6 +373,21 @@ spdy_on_data_chunk_recv_callback(spdylay_session * /*session*/, uint8_t /*flags*
   return;
 }
 
+unsigned
+spdy_session_delta_window_size(SpdyClientSession *sm)
+{
+  unsigned sess_delta_window_size = 0;
+  map<int, SpdyRequest*>::iterator iter = sm->req_map.begin();
+  map<int, SpdyRequest*>::iterator endIter = sm->req_map.end();
+  for (; iter != endIter; ++iter) {
+    SpdyRequest* req = iter->second;
+    sess_delta_window_size += req->delta_window_size;
+  }
+  Debug("spdy", "----sm_id:%" PRId64 ", session delta_window_size:%u",
+        sess_delta_window_size);
+  return sess_delta_window_size;
+}
+
 void
 spdy_on_data_recv_callback(spdylay_session *session, uint8_t flags,
                            int32_t stream_id, int32_t length, void *user_data)
@@ -397,7 +412,7 @@ spdy_on_data_recv_callback(spdylay_session *session, uint8_t flags,
   Debug("spdy", "----sm_id:%" PRId64 ", stream_id:%d, delta_window_size:%u",
         sm->sm_id, stream_id, req->delta_window_size);
 
-  if (req->delta_window_size >= spdy_initial_window_size/2) {
+  if (spdy_session_delta_window_size(sm) >= spdy_initial_window_size/2) {
     Debug("spdy", "----Reenable write_vio for WINDOW_UPDATE frame, delta_window_size:%u",
           req->delta_window_size);

{code}

> spdy window_update not triggered correctly..
> --------------------------------------------
>
>                 Key: TS-3184
>                 URL: https://issues.apache.org/jira/browse/TS-3184
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: SPDY
>            Reporter: Sudheer Vinukonda
>
> During a session start, spdy advertises the initial window size as the configured {{proxy.config.spdy.initial_window_size_in}}. A window_update is triggered whenever the current delta_window_size reaches half this advertised window size. However, the condition that checks for triggering the window update compares the delta_window_size for each stream with the initial window size. This fails to trigger a window_update when the delta_window_size for each stream individually is not half the initial_window_size, but, the aggregate of all the streams is high enough. Consequently, the sender stalls upon exhausting the send window size and eventually times out waiting for a window update (which never happens, since, individually, each stream doesn't hit half the initial window size).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)