You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/07/31 20:54:10 UTC

[trafficserver] branch 8.0.x updated (3af405e -> d6cc938)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a change to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


    from 3af405e  Removes old commented-out code
     new 6ef4915  Clarifies alternate # selected in log output
     new fedd26d  Removes no-op macros ACQUIRE_PRINT_LOCK and RELEASE_PRINT_LOCK
     new 6f961fa  ASAN: stack-use-after-scope
     new 13c267d  Fixed http/2 issue with Http2Stream being updated after it was destroyed
     new d6cc938  TS-4765: Removes previously deprecated cqbl and pqbl log tags

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 proxy/http/HttpTransact.h       |  5 -----
 proxy/http/HttpTransactCache.cc |  6 +-----
 proxy/http2/Http2Stream.cc      |  4 +++-
 proxy/logging/Log.cc            | 12 ------------
 proxy/logging/YamlLogConfig.cc  |  6 +++---
 5 files changed, 7 insertions(+), 26 deletions(-)


[trafficserver] 01/05: Clarifies alternate # selected in log output

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 6ef4915f25783178a002d956ef70bd4b37c90d7d
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Tue Jul 3 13:08:08 2018 -0700

    Clarifies alternate # selected in log output
    
    Addresses issue #3914
    
    (cherry picked from commit 4813721fd6ca9cca65034e3be187acafe8963da2)
---
 proxy/http/HttpTransactCache.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxy/http/HttpTransactCache.cc b/proxy/http/HttpTransactCache.cc
index 70f2d76..fa735a3 100644
--- a/proxy/http/HttpTransactCache.cc
+++ b/proxy/http/HttpTransactCache.cc
@@ -257,7 +257,7 @@ HttpTransactCache::SelectFromAlternates(CacheHTTPInfoVector *cache_vector, HTTPH
   Debug("http_seq", "[SelectFromAlternates] Chosen alternate # %d", best_index);
   if (is_debug_tag_set("http_alts")) {
     ACQUIRE_PRINT_LOCK()
-    fprintf(stderr, "[alts] and the winner is alternate number %d\n", best_index + 1);
+    fprintf(stderr, "[alts] and the winner is alternate number %d\n", best_index);
     RELEASE_PRINT_LOCK()
   }
 


[trafficserver] 02/05: Removes no-op macros ACQUIRE_PRINT_LOCK and RELEASE_PRINT_LOCK

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit fedd26d56ee8c492c4bb8d09530643319366fb9d
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Tue Jul 3 13:12:52 2018 -0700

    Removes no-op macros ACQUIRE_PRINT_LOCK and RELEASE_PRINT_LOCK
    
    (cherry picked from commit fdab3cdd764ed53e3b6506e88a1642b3aee36734)
---
 proxy/http/HttpTransact.h       | 5 -----
 proxy/http/HttpTransactCache.cc | 4 ----
 2 files changed, 9 deletions(-)

diff --git a/proxy/http/HttpTransact.h b/proxy/http/HttpTransact.h
index f9ccd38..3cae78f 100644
--- a/proxy/http/HttpTransact.h
+++ b/proxy/http/HttpTransact.h
@@ -43,13 +43,9 @@
 
 #define HTTP_RELEASE_ASSERT(X) ink_release_assert(X)
 
-#define ACQUIRE_PRINT_LOCK() // ink_mutex_acquire(&print_lock);
-#define RELEASE_PRINT_LOCK() // ink_mutex_release(&print_lock);
-
 #define DUMP_HEADER(T, H, I, S)                                 \
   {                                                             \
     if (diags->on(T)) {                                         \
-      ACQUIRE_PRINT_LOCK()                                      \
       fprintf(stderr, "+++++++++ %s +++++++++\n", S);           \
       fprintf(stderr, "-- State Machine Id: %" PRId64 "\n", I); \
       char b[4096];                                             \
@@ -66,7 +62,6 @@
           fprintf(stderr, "%s", b);                             \
         } while (!done);                                        \
       }                                                         \
-      RELEASE_PRINT_LOCK()                                      \
     }                                                           \
   }
 
diff --git a/proxy/http/HttpTransactCache.cc b/proxy/http/HttpTransactCache.cc
index fa735a3..7a6be4e 100644
--- a/proxy/http/HttpTransactCache.cc
+++ b/proxy/http/HttpTransactCache.cc
@@ -180,9 +180,7 @@ HttpTransactCache::SelectFromAlternates(CacheHTTPInfoVector *cache_vector, HTTPH
   Debug("http_match", "[SelectFromAlternates] # alternates = %d", alt_count);
   Debug("http_seq", "[SelectFromAlternates] %d alternates for this cached doc", alt_count);
   if (is_debug_tag_set("http_alts")) {
-    ACQUIRE_PRINT_LOCK()
     fprintf(stderr, "[alts] There are %d alternates for this request header.\n", alt_count);
-    RELEASE_PRINT_LOCK()
   }
 
   if (!client_request->valid()) {
@@ -256,9 +254,7 @@ HttpTransactCache::SelectFromAlternates(CacheHTTPInfoVector *cache_vector, HTTPH
   }
   Debug("http_seq", "[SelectFromAlternates] Chosen alternate # %d", best_index);
   if (is_debug_tag_set("http_alts")) {
-    ACQUIRE_PRINT_LOCK()
     fprintf(stderr, "[alts] and the winner is alternate number %d\n", best_index);
-    RELEASE_PRINT_LOCK()
   }
 
   if ((best_index != -1) && (best_Q > unacceptable_Q)) {


[trafficserver] 04/05: Fixed http/2 issue with Http2Stream being updated after it was destroyed

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 13c267df80e653e9ba490df37b4527d18de98db4
Author: Bryan Call <bc...@apache.org>
AuthorDate: Tue Jul 10 17:30:28 2018 -0700

    Fixed http/2 issue with Http2Stream being updated after it was destroyed
    
    (cherry picked from commit e57679c565effcc066945d19e99314cb6a3b7724)
---
 proxy/http2/Http2Stream.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc
index 85453e2..672b553 100644
--- a/proxy/http2/Http2Stream.cc
+++ b/proxy/http2/Http2Stream.cc
@@ -679,6 +679,7 @@ void
 Http2Stream::send_response_body(bool call_update)
 {
   Http2ClientSession *parent = static_cast<Http2ClientSession *>(this->get_parent());
+  inactive_timeout_at        = Thread::get_hrtime() + inactive_timeout;
 
   if (Http2::stream_priority_enabled) {
     SCOPED_MUTEX_LOCK(lock, parent->connection_state.mutex, this_ethread());
@@ -689,8 +690,9 @@ Http2Stream::send_response_body(bool call_update)
     SCOPED_MUTEX_LOCK(lock, parent->connection_state.mutex, this_ethread());
     parent->connection_state.send_data_frames(this);
     this->signal_write_event(call_update);
+    // XXX The call to signal_write_event can destroy/free the Http2Stream.
+    // Don't modify the Http2Stream after calling this method.
   }
-  inactive_timeout_at = Thread::get_hrtime() + inactive_timeout;
 }
 
 void


[trafficserver] 03/05: ASAN: stack-use-after-scope

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 6f961fa9b5a82f3fb2a240ae3171407e5faf06f6
Author: Gancho Tenev <ga...@apache.org>
AuthorDate: Tue Jul 10 23:36:44 2018 -0700

    ASAN: stack-use-after-scope
    
    in YamlLogConfig::decodeLogObject(YAML::Node const&)
       const char *mode_str = node["mode"].as<std::string>().c_str();
    results in dangling mode_str pointer.
    
    (cherry picked from commit 7e5e6ede04fd74056636ab928ed9078aa19fe87a)
---
 proxy/logging/YamlLogConfig.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/proxy/logging/YamlLogConfig.cc b/proxy/logging/YamlLogConfig.cc
index e6b9e8c..dc93f1c 100644
--- a/proxy/logging/YamlLogConfig.cc
+++ b/proxy/logging/YamlLogConfig.cc
@@ -139,10 +139,10 @@ YamlLogConfig::decodeLogObject(const YAML::Node &node)
   // file format
   LogFileFormat file_type = LOG_FILE_ASCII; // default value
   if (node["mode"]) {
-    const char *mode_str = node["mode"].as<std::string>().c_str();
-    file_type            = (strncasecmp(mode_str, "bin", 3) == 0 || (mode_str[0] == 'b' && mode_str[1] == 0) ?
+    std::string mode = node["mode"].as<std::string>();
+    file_type        = (0 == strncasecmp(mode.c_str(), "bin", 3) || (1 == mode.size() && mode[0] == 'b') ?
                    LOG_FILE_BINARY :
-                   (strcasecmp(mode_str, "ascii_pipe") == 0 ? LOG_FILE_PIPE : LOG_FILE_ASCII));
+                   (0 == strcasecmp(mode.c_str(), "ascii_pipe") ? LOG_FILE_PIPE : LOG_FILE_ASCII));
   }
 
   int obj_rolling_enabled      = 0;


[trafficserver] 05/05: TS-4765: Removes previously deprecated cqbl and pqbl log tags

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit d6cc938973a9a4122ee4f16cfa92a3083d82f307
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Mon Jul 23 11:19:56 2018 -0700

    TS-4765: Removes previously deprecated cqbl and pqbl log tags
    
    (cherry picked from commit 175143e32b719ccc70a1a99229bcbe5a28cf9ab8)
---
 proxy/logging/Log.cc | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/proxy/logging/Log.cc b/proxy/logging/Log.cc
index 753516b..c10d39c 100644
--- a/proxy/logging/Log.cc
+++ b/proxy/logging/Log.cc
@@ -484,12 +484,6 @@ Log::init_fields()
   global_field_list.add(field, false);
   ink_hash_table_insert(field_symbol_hash, "puuid", field);
 
-  // TS-4765: This alias is deprecated to be removed in 8.0.
-  field = new LogField("client_req_body_len", "cqbl", LogField::sINT, &LogAccess::marshal_client_req_content_len,
-                       &LogAccess::unmarshal_int_to_str);
-  global_field_list.add(field, false);
-  ink_hash_table_insert(field_symbol_hash, "cqbl", field);
-
   field = new LogField("client_req_content_len", "cqcl", LogField::sINT, &LogAccess::marshal_client_req_content_len,
                        &LogAccess::unmarshal_int_to_str);
   global_field_list.add(field, false);
@@ -656,12 +650,6 @@ Log::init_fields()
   global_field_list.add(field, false);
   ink_hash_table_insert(field_symbol_hash, "pqql", field);
 
-  // TS-4765: This alias is deprecated to be removed in 8.0.
-  field = new LogField("proxy_req_body_len", "pqbl", LogField::sINT, &LogAccess::marshal_proxy_req_content_len,
-                       &LogAccess::unmarshal_int_to_str);
-  global_field_list.add(field, false);
-  ink_hash_table_insert(field_symbol_hash, "pqbl", field);
-
   field = new LogField("proxy_req_content_len", "pqcl", LogField::sINT, &LogAccess::marshal_proxy_req_content_len,
                        &LogAccess::unmarshal_int_to_str);
   global_field_list.add(field, false);