apache / trafficserver

Apache Traffic Server™ is a fast, scalable and extensible HTTP/1.1 and HTTP/2 compliant caching proxy server.
https://trafficserver.apache.org/
Apache License 2.0
1.82k stars 805 forks source link

Assertion with gzip plugin enabled together with escalation #2913

Closed zwoop closed 6 years ago

zwoop commented 6 years ago

Tested with #1993, but got a different crash (assertion) now :-/

(gdb) bt full
#0  0x00002ad91874486d in waitpid () from /lib64/libc.so.6
No symbol table info available.
#1  0x0000555858f5e244 in crash_logger_invoke (signo=6, info=0x2ad920a11430, ctx=0x2ad920a11300) at Crash.cc:164
        status = 0
#2  <signal handler called>
No symbol table info available.
#3  0x00002ad9186ca495 in raise () from /lib64/libc.so.6
No symbol table info available.
#4  0x00002ad9186cbc75 in abort () from /lib64/libc.so.6
No symbol table info available.
#5  0x00002ad916236054 in ink_abort (message_format=<optimized out>) at ink_error.cc:99
        ap = {{
            gp_offset = 32,
            fp_offset = 48,
            overflow_arg_area = 0x2ad920a11ab0,
            reg_save_area = 0x2ad920a119d0
          }}
#6  0x00002ad916234085 in _ink_assert (expression=0x2ad9186ca495 <raise+53> "H=", file=0x3ef6 <error: Cannot access memory at address 0x3ef6>, line=6) at ink_assert.cc:37
No locals.
#7  0x000055585903dc25 in HttpSM::state_http_server_open (this=0x2ad950121240, event=2301, data=<optimized out>) at HttpSM.cc:1826
No locals.
#8  0x00005558590324a1 in HttpSM::main_handler (this=0x2ad950121240, event=2301, data=0x2ad9501225a0) at HttpSM.cc:2696
        jump_point = <optimized out>
#9  0x00005558590806a6 in Continuation::handleEvent (this=<optimized out>, event=2301, data=<optimized out>) at /home/lhedstrom/gitlab/trafficserver/iocore/eventsystem/I_Continuation.h:153
No locals.
#10 HttpTunnel::main_handler (this=0x2ad9501225a0, event=<optimized out>, data=<optimized out>) at HttpTunnel.cc:1665
        p = <optimized out>
        c = <optimized out>
#11 0x00002adde150e6b3 in compress_transform_do (contp=<optimized out>) at gzip/gzip.cc:591
        upstream_vio = <optimized out>
        upstream_todo = <optimized out>
        upstream_avail = <optimized out>
#12 0x00002adde150def6 in compress_transform (contp=0x2ad974068ad0, event=TS_EVENT_IMMEDIATE) at gzip/gzip.cc:620
No locals.
#13 0x0000555858f718a0 in INKContInternal::handle_event (this=0x2ad974068ad0, event=1, edata=0x2adde403c9a0) at InkAPI.cc:1050
        retval = <optimized out>
#14 0x00005558591cf240 in Continuation::handleEvent (this=<optimized out>, event=1, data=<optimized out>) at ./I_Continuation.h:153
No locals.
#15 EThread::process_event (this=0x2ad91b020010, e=0x2adde403c9a0, calling_code=1) at UnixEThread.cc:140
        c_temp = <optimized out>
#16 0x00005558591cf7f0 in EThread::execute_regular (this=<optimized out>) at UnixEThread.cc:221
        done_one = true
        sleep_time = <optimized out>
        next_time = 0
#17 0x00005558591ce9c7 in spawn_thread_internal (a=0x55585a9b91f0) at Thread.cc:84
No locals.
#18 0x00002ad918a33aa1 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#19 0x00002ad918780bcd in clone () from /lib64/libc.so.6
No symbol table info available.

This is in

int
HttpSM::state_http_server_open(int event, void *data)
{
.
.
.

  default:
    Error("[HttpSM::state_http_server_open] Unknown event: %d", event);
    ink_release_assert(0);
    return 0;

The history shows:

(gdb) print this->history
(gdb) print history
$4 = {{
    fileline = 0x5558591ef905 "HttpSM.cc:2008",
    event = 102,
    reentrancy = 1
  }, {
    fileline = 0x5558591ef905 "HttpSM.cc:2008",
    event = 103,
    reentrancy = 1
  }, {
    fileline = 0x5558591f0470 "HttpSM.cc:3838",
    event = 103,
    reentrancy = 0
  }, {
    fileline = 0x5558591ef7a5 "HttpSM.cc:1742",
    event = 2301,
    reentrancy = 1
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 4
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 5
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 5
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 6
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 6
  }, {
    fileline = 0x5558591f1cee "HttpSM.cc:7421",
    event = 65535,
    reentrancy = 6
  }, {
    fileline = 0x5558591ea841 "HttpCacheSM.cc:118",
    event = 1103,
    reentrancy = -1
  }, {
    fileline = 0x5558591efd86 "HttpSM.cc:2607",
    event = 1103,
    reentrancy = 7
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 8
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 8
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 9
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 9
  }, {
    fileline = 0x5558591f1cd0 "HttpSM.cc:7381",
    event = 65535,
    reentrancy = 9
  }, {
    fileline = 0x5558591f1d1b "HttpSM.cc:7536",
    event = 65535,
    reentrancy = 9
  }, {
    fileline = 0x5558591ea8f7 "HttpCacheSM.cc:177",
    event = 1108,
    reentrancy = -1
  }, {
    fileline = 0x5558591efcd9 "HttpSM.cc:2488",
    event = 1108,
    reentrancy = 10
  }, {
    fileline = 0x5558591f1d0c "HttpSM.cc:7434",
    event = 65535,
    reentrancy = 10
  }, {
    fileline = 0x5558591ef7a5 "HttpSM.cc:1742",
    event = 200,
    reentrancy = 11
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 12
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 12
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 13
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 13
  }, {
    fileline = 0x5558591f0a95 "HttpSM.cc:4587",
    event = 0,
    reentrancy = 6
  }, {
    fileline = 0x5558591ef905 "HttpSM.cc:2008",
    event = 102,
    reentrancy = 1
  }, {
    fileline = 0x5558591ef905 "HttpSM.cc:2008",
    event = 103,
    reentrancy = 1
  }, {
    fileline = 0x5558591ef882 "HttpSM.cc:1836",
    event = 100,
    reentrancy = 1
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 2
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 2
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 3
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 3
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 4
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 4
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 5
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 5
  }, {
    fileline = 0x5558591f13df "HttpSM.cc:6481",
    event = 65535,
    reentrancy = 5
  }, {
    fileline = 0x5558591f0049 "HttpSM.cc:3000",
    event = 102,
    reentrancy = 0
  }, {
    fileline = 0x5558591f0260 "HttpSM.cc:3462",
    event = 103,
    reentrancy = 0
  }, {
    fileline = 0x5558591ef584 "HttpSM.cc:1243",
    event = 2000,
    reentrancy = 1
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 2
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 2
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 3
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 3
  }, {
    fileline = 0x5558591f1cee "HttpSM.cc:7421",
    event = 65535,
    reentrancy = 3
  }, {
    fileline = 0x5558591ea841 "HttpCacheSM.cc:118",
    event = 1103,
    reentrancy = -1
  }, {
    fileline = 0x5558591efd86 "HttpSM.cc:2607",
    event = 1103,
    reentrancy = 4
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 5
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 5
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 6
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 6
  }, {
    fileline = 0x5558591f1cd0 "HttpSM.cc:7381",
    event = 65535,
    reentrancy = 6
  }, {
    fileline = 0x5558591f1d1b "HttpSM.cc:7536",
    event = 65535,
    reentrancy = 6
  }, {
    fileline = 0x5558591efcd9 "HttpSM.cc:2488",
    event = 1109,
    reentrancy = 7
  }, {
    fileline = 0x5558591f0a95 "HttpSM.cc:4587",
    event = 40768,
    reentrancy = 3
  }, {
    fileline = 0x5558591efcd9 "HttpSM.cc:2488",
    event = 1109,
    reentrancy = 1
  }, {
    fileline = 0x5558591f1d0c "HttpSM.cc:7434",
    event = 65535,
    reentrancy = 1
  }, {
    fileline = 0x5558591ef7a5 "HttpSM.cc:1742",
    event = 200,
    reentrancy = 2
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 3
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 3
  }, {
    fileline = 0x5558591ef61d "HttpSM.cc:1355",
    event = 60000,
    reentrancy = 4
  }, {
    fileline = 0x5558591ef648 "HttpSM.cc:1395",
    event = 60000,
    reentrancy = 4
  }

What is event 2301? :-)

zwoop commented 6 years ago

Here is the t_state:

(gdb) p t_state
$3 = {
  m_magic = HttpTransact::HTTP_TRANSACT_MAGIC_ALIVE,
  state_machine = 0x2ad950121240,
  arena = {
    m_blocks = 0x2ad94c1f9000
  },
  http_config_param = 0x55585a99ff40,
  cache_info = {
    action = HttpTransact::CACHE_DO_NO_ACTION,
    transform_action = HttpTransact::CACHE_DO_NO_ACTION,
    write_status = HttpTransact::CACHE_WRITE_LOCK_MISS,
    transform_write_status = HttpTransact::NO_CACHE_WRITE,
    lookup_url = 0x2ad9501212e8,
    lookup_url_storage = {
      <HdrHeapSDKHandle> = {
        m_heap = 0x2ad9400e1800
      },
      members of URL:
      m_url_impl = 0x2ad9400e1888
    },
    original_url = {
      <HdrHeapSDKHandle> = {
        m_heap = 0x0
      },
      members of URL:
      m_url_impl = 0x0
    },
    object_read = 0x0,
    second_object_read = 0x0,
    object_store = {
      m_alt = 0x0
    },
    transform_store = {
      m_alt = 0x0
    },
    config = {
      cache_global_user_agent_header = false,
      cache_enable_default_vary_headers = false,
      ignore_accept_mismatch = 2,
      ignore_accept_language_mismatch = 2,
      ignore_accept_encoding_mismatch = 2,
      ignore_accept_charset_mismatch = 2,
      cache_vary_default_text = 0x0,
      cache_vary_default_images = 0x0,
      cache_vary_default_other = 0x0
    },
    directives = {
      does_client_permit_lookup = true,
      does_client_permit_storing = true,
      does_client_permit_dns_storing = true,
      does_config_permit_lookup = true,
      does_config_permit_storing = true,
      does_server_permit_lookup = true,
      does_server_permit_storing = true
    },
    open_read_retries = 0,
    open_write_retries = 0,
    write_lock_state = HttpTransact::CACHE_WL_FAIL,
    lookup_count = 2,
    hit_miss_code = SQUID_MISS_NONE,
    parent_selection_url = 0x0,
    parent_selection_url_storage = {
      <HdrHeapSDKHandle> = {
        m_heap = 0x0
      },
      members of URL:
      m_url_impl = 0x0
    }
  },
  dns_info = {
    attempts = 0,
    os_addr_style = HttpTransact::_DNSLookupInfo::OS_ADDR_TRY_DEFAULT,
    lookup_success = true,
    lookup_name = 0x2ad94c1f903d "origin",
    srv_hostname = '\000' <repeats 1024 times>,
    looking_up = HttpTransact::ORIGIN_SERVER,
    srv_lookup_success = false,
    srv_port = 0,
    srv_app = {
      allotment = {
        application1 = 0,
        application2 = 0
      },
      http_data = {
        http_version = 0,
        pipeline_max = 0,
        keepalive_timeout = 0,
        fail_count = 0,
        unused1 = 0,
        last_failure = 0
      },
      rr = {
        offset = 0
      }
    },
    lookup_validated = true
  },
  redirect_info = {
    redirect_in_process = true,
    original_url = {
      <HdrHeapSDKHandle> = {
        m_heap = 0x2ad950270800
      },
      members of URL:
      m_url_impl = 0x2ad950270888
    },
    redirect_url = {
      <HdrHeapSDKHandle> = {
        m_heap = 0x2ad95e54d000
      },
      members of URL:
      m_url_impl = 0x2ad95e54d088
    }
  },
  updated_server_version = 0,
  force_dns = false,
  cache_open_write_fail_action = 0 '\000',
  is_revalidation_necessary = false,
  request_will_not_selfloop = true,
  client_info = {
    http_version = {
      m_version = 65537
    },
    keep_alive = HTTP_KEEPALIVE,
    receive_chunked_response = true,
    pipeline_possible = true,
    proxy_connect_hdr = false,
    connect_result = 0,
    name = 0x0,
    transfer_encoding = HttpTransact::NO_TRANSFER_ENCODING,
    src_addr = {
      sa = {
        sa_family = 2,
        sa_data = "\306\034\n\375\005\260\000\000\000\000\000\000\000"
      },
      sin = {
        sin_family = 2,
        sin_port = 7366,
        sin_addr = {
          s_addr = 2953182474
        },
        sin_zero = "\000\000\000\000\000\000\000"
      },
      sin6 = {
        sin6_family = 2,
        sin6_port = 7366,
        sin6_flowinfo = 2953182474,
        sin6_addr = {
          __in6_u = {
            __u6_addr8 = '\000' <repeats 15 times>,
            __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
            __u6_addr32 = {0, 0, 0, 0}
          }
        },
        sin6_scope_id = 0
      }
    },
    dst_addr = {
      sa = {
        sa_family = 2,
        sa_data = "P\000\n\375\005\325\000\000\000\000\000\000\000"
      },
      sin = {
        sin_family = 2,
        sin_port = 80,
        sin_addr = {
          s_addr = 3573939466
        },
        sin_zero = "\000\000\000\000\000\000\000"
      },
      sin6 = {
        sin6_family = 2,
        sin6_port = 80,
        sin6_flowinfo = 3573939466,
        sin6_addr = {
          __in6_u = {
            __u6_addr8 = '\000' <repeats 15 times>,
            __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
            __u6_addr32 = {0, 0, 0, 0}
          }
        },
        sin6_scope_id = 0
      }
    },
    state = HttpTransact::STATE_UNDEFINED,
    abort = HttpTransact::ABORT_UNDEFINED,
    port_attribute = HttpProxyPort::TRANSPORT_DEFAULT,
    is_transparent = false
  },
  icp_info = {
    http_version = {
      m_version = 65536
    },
    keep_alive = HTTP_KEEPALIVE_UNDEFINED,
    receive_chunked_response = false,
    pipeline_possible = false,
    proxy_connect_hdr = false,
    connect_result = 0,
    name = 0x0,
    transfer_encoding = HttpTransact::NO_TRANSFER_ENCODING,
    src_addr = {
      sa = {
        sa_family = 0,
        sa_data = '\000' <repeats 13 times>
      },
      sin = {
        sin_family = 0,
        sin_port = 0,
        sin_addr = {
          s_addr = 0
        },
        sin_zero = "\000\000\000\000\000\000\000"
      },
      sin6 = {
        sin6_family = 0,
        sin6_port = 0,
        sin6_flowinfo = 0,
        sin6_addr = {
          __in6_u = {
            __u6_addr8 = '\000' <repeats 15 times>,
            __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
            __u6_addr32 = {0, 0, 0, 0}
          }
        },
        sin6_scope_id = 0
      }
    },
    dst_addr = {
      sa = {
        sa_family = 0,
        sa_data = '\000' <repeats 13 times>
      },
      sin = {
        sin_family = 0,
        sin_port = 0,
        sin_addr = {
          s_addr = 0
        },
        sin_zero = "\000\000\000\000\000\000\000"
      },
      sin6 = {
        sin6_family = 0,
        sin6_port = 0,
        sin6_flowinfo = 0,
        sin6_addr = {
          __in6_u = {
            __u6_addr8 = '\000' <repeats 15 times>,
            __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
            __u6_addr32 = {0, 0, 0, 0}
          }
        },
        sin6_scope_id = 0
      }
    },
    state = HttpTransact::STATE_UNDEFINED,
    abort = HttpTransact::ABORT_UNDEFINED,
    port_attribute = HttpProxyPort::TRANSPORT_DEFAULT,
    is_transparent = false
  },
  parent_info = {
    http_version = {
      m_version = 65536
    },
    keep_alive = HTTP_KEEPALIVE_UNDEFINED,
    receive_chunked_response = false,
    pipeline_possible = false,
    proxy_connect_hdr = false,
    connect_result = 0,
    name = 0x0,
    transfer_encoding = HttpTransact::NO_TRANSFER_ENCODING,
    src_addr = {
      sa = {
        sa_family = 0,
        sa_data = '\000' <repeats 13 times>
      },
      sin = {
        sin_family = 0,
        sin_port = 0,
        sin_addr = {
          s_addr = 0
        },
        sin_zero = "\000\000\000\000\000\000\000"
      },
      sin6 = {
        sin6_family = 0,
        sin6_port = 0,
        sin6_flowinfo = 0,
        sin6_addr = {
          __in6_u = {
            __u6_addr8 = '\000' <repeats 15 times>,
            __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
            __u6_addr32 = {0, 0, 0, 0}
          }
        },
        sin6_scope_id = 0
      }
    },
    dst_addr = {
      sa = {
        sa_family = 0,
        sa_data = '\000' <repeats 13 times>
      },
      sin = {
        sin_family = 0,
        sin_port = 0,
        sin_addr = {
          s_addr = 0
        },
        sin_zero = "\000\000\000\000\000\000\000"
      },
      sin6 = {
        sin6_family = 0,
        sin6_port = 0,
        sin6_flowinfo = 0,
        sin6_addr = {
          __in6_u = {
            __u6_addr8 = '\000' <repeats 15 times>,
            __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
            __u6_addr32 = {0, 0, 0, 0}
          }
        },
        sin6_scope_id = 0
      }
    },
    state = HttpTransact::STATE_UNDEFINED,
    abort = HttpTransact::ABORT_UNDEFINED,
    port_attribute = HttpProxyPort::TRANSPORT_DEFAULT,
    is_transparent = false
  },
  server_info = {
    http_version = {
      m_version = 65537
    },
    keep_alive = HTTP_KEEPALIVE,
    receive_chunked_response = false,
    pipeline_possible = false,
    proxy_connect_hdr = false,
    connect_result = 0,
    name = 0x2ad94c1f903d "origin",
    transfer_encoding = HttpTransact::CHUNKED_ENCODING,
    src_addr = {
      sa = {
        sa_family = 0,
        sa_data = '\000' <repeats 13 times>
      },
      sin = {
        sin_family = 0,
        sin_port = 0,
        sin_addr = {
          s_addr = 0
        },
        sin_zero = "\000\000\000\000\000\000\000"
      },
      sin6 = {
        sin6_family = 0,
        sin6_port = 0,
        sin6_flowinfo = 0,
        sin6_addr = {
          __in6_u = {
            __u6_addr8 = '\000' <repeats 15 times>,
            __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
            __u6_addr32 = {0, 0, 0, 0}
          }
        },
        sin6_scope_id = 0
      }
    },
    dst_addr = {
      sa = {
        sa_family = 2,
        sa_data = "\001\273\021\232A\223\000\000\000\000\000\000\000"
      },
      sin = {
        sin_family = 2,
        sin_port = 47873,
        sin_addr = {
          s_addr = 2470550033
        },
        sin_zero = "\000\000\000\000\000\000\000"
      },
      sin6 = {
        sin6_family = 2,
        sin6_port = 47873,
        sin6_flowinfo = 2470550033,
        sin6_addr = {
          __in6_u = {
            __u6_addr8 = '\000' <repeats 15 times>,
            __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
            __u6_addr32 = {0, 0, 0, 0}
          }
        },
        sin6_scope_id = 0
      }
    },
    state = HttpTransact::STATE_UNDEFINED,
    abort = HttpTransact::DIDNOT_ABORT,
    port_attribute = HttpProxyPort::TRANSPORT_DEFAULT,
    is_transparent = false
  },
  source = HttpTransact::SOURCE_TRANSFORM,
  pre_transform_source = HttpTransact::SOURCE_HTTP_ORIGIN_SERVER,
  req_flavor = HttpTransact::REQ_FLAVOR_REVPROXY,
  current = {
    mode = HttpTransact::GENERIC_PROXY,
    request_to = HttpTransact::ORIGIN_SERVER,
    server = 0x2ad950121928,
    now = 1513004074,
    state = HttpTransact::STATE_UNDEFINED,
    attempts = 0,
    simple_retry_attempts = 0,
    unavailable_server_retry_attempts = 0,
    retry_type = PARENT_RETRY_NONE
  },
  hdr_info = {
    client_request = {
      <MIMEHdr> = {
        <HdrHeapSDKHandle> = {
          m_heap = 0x2b052f3e2800
        },
        members of MIMEHdr:
        m_mime = 0x2b052f3e28b8
      },
      members of HTTPHdr:
      m_http = 0x2b052f3e2888,
      m_url_cached = {
        <HdrHeapSDKHandle> = {
          m_heap = 0x2b052f3e2800
        },
        members of URL:
        m_url_impl = 0x2b052f3e2b08
      },
      m_host_mime = 0x0,
      m_host_length = 30,
      m_port = 443,
      m_target_cached = true,
      m_target_in_url = true,
      m_100_continue_required = false,
      m_port_in_header = false
    },
    client_response = {
      <MIMEHdr> = {
        <HdrHeapSDKHandle> = {
          m_heap = 0x0
        },
        members of MIMEHdr:
        m_mime = 0x2ad92c01f8b8
      },
      members of HTTPHdr:
      m_http = 0x2ad92c01f888,
      m_url_cached = {
        <HdrHeapSDKHandle> = {
          m_heap = 0x0
        },
        members of URL:
        m_url_impl = 0x0
      },
      m_host_mime = 0x0,
      m_host_length = 0,
      m_port = 0,
      m_target_cached = false,
      m_target_in_url = false,
      m_100_continue_required = false,
      m_port_in_header = false
    },
    server_request = {
      <MIMEHdr> = {
        <HdrHeapSDKHandle> = {
          m_heap = 0x2b00d1d30000
        },
        members of MIMEHdr:
        m_mime = 0x2b00d1d300b8
      },
      members of HTTPHdr:
      m_http = 0x2b00d1d30088,
      m_url_cached = {
        <HdrHeapSDKHandle> = {
          m_heap = 0x2b00d1d30000
        },
        members of URL:
        m_url_impl = 0x2b00d1d30308
      },
      m_host_mime = 0x2b00d1d30108,
      m_host_length = 30,
      m_port = 443,
      m_target_cached = true,
      m_target_in_url = false,
      m_100_continue_required = false,
      m_port_in_header = false
    },
    server_response = {
      <MIMEHdr> = {
        <HdrHeapSDKHandle> = {
          m_heap = 0x2ad958216000
        },
        members of MIMEHdr:
        m_mime = 0x2ad9582160b8
      },
      members of HTTPHdr:
      m_http = 0x2ad958216088,
      m_url_cached = {
        <HdrHeapSDKHandle> = {
          m_heap = 0x0
        },
        members of URL:
        m_url_impl = 0x0
      },
      m_host_mime = 0x0,
      m_host_length = 0,
      m_port = 0,
      m_target_cached = false,
      m_target_in_url = false,
      m_100_continue_required = false,
      m_port_in_header = false
    },
    transform_response = {
      <MIMEHdr> = {
        <HdrHeapSDKHandle> = {
          m_heap = 0x2b1708c27000
        },
        members of MIMEHdr:
        m_mime = 0x2b1708c270b8
      },
      members of HTTPHdr:
      m_http = 0x2b1708c27088,
      m_url_cached = {
        <HdrHeapSDKHandle> = {
          m_heap = 0x0
        },
        members of URL:
        m_url_impl = 0x0
      },
      m_host_mime = 0x0,
      m_host_length = 0,
      m_port = 0,
      m_target_cached = false,
      m_target_in_url = false,
      m_100_continue_required = false,
      m_port_in_header = false
    },
    cache_response = {
      <MIMEHdr> = {
        <HdrHeapSDKHandle> = {
          m_heap = 0x0
        },
        members of MIMEHdr:
        m_mime = 0x0
      },
      members of HTTPHdr:
      m_http = 0x0,
      m_url_cached = {
        <HdrHeapSDKHandle> = {
          m_heap = 0x0
        },
        members of URL:
        m_url_impl = 0x0
      },
      m_host_mime = 0x0,
      m_host_length = 0,
      m_port = 0,
      m_target_cached = false,
      m_target_in_url = false,
      m_100_continue_required = false,
      m_port_in_header = false
    },
    request_content_length = 0,
    response_content_length = -1,
    transform_request_cl = -1,
    transform_response_cl = -1,
    client_req_is_server_style = false,
    trust_response_cl = false,
    response_error = HttpTransact::STATUS_CODE_SERVER_ERROR,
    extension_method = false
  },
  squid_codes = {
    log_code = SQUID_LOG_TCP_MISS_X_REDIRECT,
    hier_code = SQUID_HIER_DIRECT,
    hit_miss_code = SQUID_MISS_NONE
  },
  api_info = {
    parent_proxy_name = 0x0,
    parent_proxy_port = -1,
    cache_untransformed = true,
    cache_transformed = false,
    logging_enabled = true,
    retry_intercept_failures = false
  },
  pending_work = 0x0,
  cdn_saved_next_action = HttpTransact::SM_ACTION_ORIGIN_SERVER_OPEN,
  cdn_saved_transact_return_point = 0x0,
  cdn_remap_complete = false,
  first_dns_lookup = true,
  backdoor_request = false,
  cop_test_page = false,
  request_data = {
    <RequestData> = {
      _vptr$RequestData = 0x55585948a7e0 <vtable for HttpRequestData+16>
    },
    members of HttpRequestData:
    hdr = 0x2ad9501219d0,
    hostname_str = 0x2ad94c1f905d "origin",
    api_info = 0x2ad950121b90,
    xact_start = 1513004069,
    src_ip = {
      sa = {
        sa_family = 2,
        sa_data = "\306\034\n\375\005\260\000\000\000\000\000\000\000"
      },
      sin = {
        sin_family = 2,
        sin_port = 7366,
        sin_addr = {
          s_addr = 2953182474
        },
        sin_zero = "\000\000\000\000\000\000\000"
      },
      sin6 = {
        sin6_family = 2,
        sin6_port = 7366,
        sin6_flowinfo = 2953182474,
        sin6_addr = {
          __in6_u = {
            __u6_addr8 = '\000' <repeats 15 times>,
            __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
            __u6_addr32 = {0, 0, 0, 0}
          }
        },
        sin6_scope_id = 0
      }
    },
    dest_ip = {
      sa = {
        sa_family = 2,
        sa_data = "\001\273\021\232A\223\000\000\000\000\000\000\000"
      },
      sin = {
        sin_family = 2,
        sin_port = 47873,
        sin_addr = {
          s_addr = 2470550033
        },
        sin_zero = "\000\000\000\000\000\000\000"
      },
      sin6 = {
        sin6_family = 2,
        sin6_port = 47873,
        sin6_flowinfo = 2470550033,
        sin6_addr = {
          __in6_u = {
            __u6_addr8 = '\000' <repeats 15 times>,
            __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
            __u6_addr32 = {0, 0, 0, 0}
          }
        },
        sin6_scope_id = 0
      }
    },
    incoming_port = 80,
    tag = 0x0,
    internal_txn = false,
    cache_info_lookup_url = 0x2ad9501212e0,
    cache_info_parent_selection_url = 0x2ad950121378
  },
  parent_params = 0x55585a9bba20,
  parent_result = {
    result = PARENT_DIRECT,
    hostname = 0x0,
    port = 0,
    retry = false,
    line_number = -1,
    rec = 0x0,
    last_parent = 0,
    start_parent = 0,
    wrap_around = false,
    last_lookup = 0,
    chashIter = {{
        __i_ = {
          __ptr_ = 0x0
        }
      }, {
        __i_ = {
          __ptr_ = 0x0
        }
      }}
  },
  cache_control = {
    revalidate_after = -1,
    pin_in_cache_for = -1,
    ttl_in_cache = -1,
    never_cache = false,
    cluster_cache_local = false,
    ignore_client_no_cache = true,
    ignore_server_no_cache = false,
    ignore_client_cc_max_age = true,
    cache_responses_to_cookies = -1,
    reval_line = -1,
    never_line = -1,
    pin_line = -1,
    ttl_line = -1,
    cluster_cache_local_line = -1,
    ignore_client_line = -1,
    ignore_server_line = -1
  },
  cache_lookup_result = HttpTransact::CACHE_LOOKUP_MISS,
  next_action = HttpTransact::SM_ACTION_ORIGIN_SERVER_OPEN,
  api_next_action = HttpTransact::SM_ACTION_API_SEND_REQUEST_HDR,
  transact_return_point = 0x0,
  post_remap_upgrade_return_point = 0x0,
  upgrade_token_wks = 0x0,
  is_upgrade_request = false,
  is_websocket = false,
  did_upgrade_succeed = false,
  origin_request_queued = false,
  internal_msg_buffer = 0x0,
  internal_msg_buffer_type = 0x0,
  internal_msg_buffer_size = 0,
  internal_msg_buffer_fast_allocator_size = -1,
  icp_ip_result = {
    sin_family = 0,
    sin_port = 0,
    sin_addr = {
      s_addr = 0
    },
    sin_zero = "\000\000\000\000\000\000\000"
  },
  icp_lookup_success = false,
  scheme = 98,
  next_hop_scheme = 98,
  orig_scheme = 99,
  method = 117,
  cause_of_death_errno = -19999,
  hostdb_entry = {
    m_ptr = 0x2ad93823f400
  },
  host_db_info = {
    <RefCountObj> = {
      <ForceVFPTToTop> = {
        _vptr$ForceVFPTToTop = 0x0
      },
      members of RefCountObj:
      m_refcount = 0
    },
    members of HostDBInfo:
    iobuffer_index = 0,
    key = 0,
    app = {
      allotment = {
        application1 = 0,
        application2 = 0
      },
      http_data = {
        http_version = 0,
        pipeline_max = 0,
        keepalive_timeout = 0,
        fail_count = 0,
        unused1 = 0,
        last_failure = 0
      },
      rr = {
        offset = 0
      }
    },
    data = {
      ip = {
        sa = {
          sa_family = 2,
          sa_data = "\000\000\021\232A\223\000\000\000\000\000\000\000"
        },
        sin = {
          sin_family = 2,
          sin_port = 0,
          sin_addr = {
            s_addr = 2470550033
          },
          sin_zero = "\000\000\000\000\000\000\000"
        },
        sin6 = {
          sin6_family = 2,
          sin6_port = 0,
          sin6_flowinfo = 2470550033,
          sin6_addr = {
            __in6_u = {
              __u6_addr8 = '\000' <repeats 15 times>,
              __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
              __u6_addr32 = {0, 0, 0, 0}
            }
          },
          sin6_scope_id = 0
        }
      },
      hostname_offset = 2,
      srv = {
        srv_offset = 2,
        srv_weight = 0,
        srv_priority = 39441,
        srv_port = 37697,
        key = 0
      }
    },
    hostname_offset = 0,
    ip_timestamp = 0,
    ip_timeout_interval = 0,
    is_srv = 0,
    reverse_dns = 0,
    round_robin = 0,
    round_robin_elt = 1
  },
  client_request_time = 1513004069,
  request_sent_time = 1513004074,
  response_received_time = 0,
  plugin_set_expire_time = 0,
  via_string = "uScMsSfWpSeN:t cCMi p sS",
  state_machine_id = 2841228,
  client_connection_enabled = true,
  acl_filtering_performed = true,
  negative_caching = false,
  www_auth_content = HttpTransact::CACHE_AUTH_NONE,
  remap_plugin_instance = 0x55585f62e970,
  user_args = {0x10, 0x0 <repeats 15 times>},
  fp_tsremap_os_response = 0x0,
  http_return_code = HTTP_STATUS_NONE,
  api_txn_active_timeout_value = -1,
  api_txn_connect_timeout_value = -1,
  api_txn_dns_timeout_value = -1,
  api_txn_no_activity_timeout_value = -1,
  cache_req_hdr_heap_handle = 0x0,
  cache_resp_hdr_heap_handle = 0x0,
  api_cleanup_cache_read = false,
  api_server_response_no_store = false,
  api_server_response_ignore = false,
  api_http_sm_shutdown = false,
  api_modifiable_cached_resp = false,
  api_server_request_body_set = false,
  api_req_cacheable = false,
  api_resp_cacheable = false,
  api_server_addr_set = false,
  stale_icp_lookup = false,
  api_update_cached_object = HttpTransact::UPDATE_CACHED_OBJECT_NONE,
  api_lock_url = HttpTransact::LOCK_URL_FIRST,
  saved_update_next_action = HttpTransact::SM_ACTION_UNDEFINED,
  saved_update_cache_action = HttpTransact::CACHE_DO_UNDEFINED,
  url_map = {
    _mapping = 0x55585f62ce60,
    _toURLPtr = 0x55585f62ce78,
    _toURL = {
      <HdrHeapSDKHandle> = {
        m_heap = 0x0
      },
      members of URL:
      m_url_impl = 0x0
    },
    _heap = 0x2b052f3e2800
  },
  hh_info = {
    request_host = 0x0,
    host_len = 0,
    request_port = 0
  },
  pCongestionEntry = 0x0,
  congest_saved_next_action = HttpTransact::SM_ACTION_UNDEFINED,
  congestion_control_crat = 0,
  congestion_congested_or_failed = 0,
  congestion_connection_opened = 0,
  filter_mask = 0,
  remap_redirect = 0x0,
  reverse_proxy = true,
  url_remap_success = true,
  api_skip_all_remapping = false,
  already_downgraded = false,
  unmapped_url = {
    <HdrHeapSDKHandle> = {
      m_heap = 0x2b052f3e2800
    },
    members of URL:
    m_url_impl = 0x2b052f3e2b78
  },
  range_setup = HttpTransact::RANGE_NONE,
  num_range_fields = 0,
  range_output_cl = 0,
  ranges = 0x0,
  txn_conf = 0x2ad950121f60,
  my_txn_conf = {
    maintain_pristine_host_hdr = 0 '\000',
    chunking_enabled = 1 '\001',
    negative_caching_enabled = 1 '\001',
    negative_revalidating_enabled = 1 '\001',
    cache_when_to_revalidate = 0 '\000',
    keep_alive_enabled_in = 1 '\001',
    keep_alive_enabled_out = 1 '\001',
    keep_alive_post_out = 1 '\001',
    server_session_sharing_match = 3 '\003',
    auth_server_session_private = 1 '\001',
    fwd_proxy_auth_to_parent = 0 '\000',
    uncacheable_requests_bypass_parent = 1 '\001',
    attach_server_session_to_client = 0 '\000',
    safe_requests_retryable = 1 '\001',
    forward_connect_method = 0 '\000',
    insert_age_in_response = 1 '\001',
    anonymize_remove_from = 0 '\000',
    anonymize_remove_referer = 0 '\000',
    anonymize_remove_user_agent = 0 '\000',
    anonymize_remove_cookie = 0 '\000',
    anonymize_remove_client_ip = 1 '\001',
    anonymize_insert_client_ip = 1 '\001',
    proxy_response_server_enabled = 1 '\001',
    proxy_response_hsts_include_subdomains = 0 '\000',
    insert_squid_x_forwarded_for = 1 '\001',
    send_http11_requests = 1 '\001',
    cache_http = 1 '\001',
    cache_cluster_cache_local = 0 '\000',
    cache_ignore_client_no_cache = 1 '\001',
    cache_ignore_client_cc_max_age = 1 '\001',
    cache_ims_on_client_no_cache = 1 '\001',
    cache_ignore_server_no_cache = 0 '\000',
    cache_responses_to_cookies = 1 '\001',
    cache_ignore_auth = 0 '\000',
    cache_urls_that_look_dynamic = 1 '\001',
    cache_required_headers = 2 '\002',
    cache_range_lookup = 1 '\001',
    cache_range_write = 0 '\000',
    insert_request_via_string = 1 '\001',
    insert_response_via_string = 1 '\001',
    doc_in_cache_skip_dns = 1 '\001',
    flow_control_enabled = 1 '\001',
    normalize_ae_gzip = 1 '\001',
    srv_enabled = 0 '\000',
    parent_failures_update_hostdb = 0 '\000',
    cache_open_write_fail_action = 2 '\002',
    post_check_content_length_enabled = 1 '\001',
    ssl_client_verify_server = 1 '\001',
    redirection_enabled = 0 '\000',
    redirect_use_orig_cache_key = 0 '\000',
    number_of_redirections = 1,
    proxy_response_hsts_max_age = -1,
    negative_caching_lifetime = 10,
    negative_revalidating_lifetime = 10,
    sock_recv_buffer_size_out = 0,
    sock_send_buffer_size_out = 0,
    sock_option_flag_out = 1,
    sock_packet_mark_out = 0,
    sock_packet_tos_out = 0,
    server_tcp_init_cwnd = 0,
    request_hdr_max_size = 131072,
    response_hdr_max_size = 131072,
    cache_heuristic_min_lifetime = 3600,
    cache_heuristic_max_lifetime = 86400,
    cache_guaranteed_min_lifetime = 0,
    cache_guaranteed_max_lifetime = 315360000,
    cache_max_stale_age = 604800,
    keep_alive_no_activity_timeout_in = 115,
    keep_alive_no_activity_timeout_out = 180,
    transaction_no_activity_timeout_in = 60,
    transaction_no_activity_timeout_out = 60,
    transaction_active_timeout_out = 0,
    transaction_active_timeout_in = 0,
    websocket_active_timeout = 3600,
    websocket_inactive_timeout = 600,
    origin_max_connections = 0,
    origin_max_connections_queue = -1,
    connect_attempts_max_retries = 9,
    connect_attempts_max_retries_dead_server = 1,
    connect_attempts_rr_retries = 3,
    connect_attempts_timeout = 60,
    post_connect_attempts_timeout = 1800,
    parent_connect_attempts = 6,
    parent_retry_time = 300,
    parent_fail_threshold = 10,
    per_parent_connect_attempts = 2,
    parent_connect_timeout = 60,
    down_server_timeout = 60,
    client_abort_threshold = 10,
    freshness_fuzz_time = 0,
    freshness_fuzz_min_time = 0,
    max_cache_open_read_retries = -1,
    cache_open_read_retry_time = 10,
    cache_generation_number = -1,
    max_cache_open_write_retries = 1,
    background_fill_active_timeout = 0,
    http_chunking_size = 4096,
    flow_high_water_mark = 4194304,
    flow_low_water_mark = 2097152,
    default_buffer_size_index = 8,
    default_buffer_water_mark = 32768,
    slow_log_threshold = 0,
    body_factory_template_base = 0x55585a9a0390 "NONE",
    body_factory_template_base_len = 4,
    proxy_response_server_string = 0x55585a9a0330 "ATS/7.1.2",
    proxy_response_server_string_len = 9,
    global_user_agent_header = 0x0,
    global_user_agent_header_size = 0,
    cache_heuristic_lm_factor = 0.100000001,
    freshness_fuzz_prob = 0,
    background_fill_threshold = 0,
    client_cert_filename = 0x0,
    client_cert_filepath = 0x55585a9a03b0 "etc/trafficserver/certs"
  },
  transparent_passthrough = false,
  range_in_cache = false
zwoop commented 6 years ago

Some more details:

1) Apparently, on master, escalation does not work at all :-/. I will file an Issue on this, and try to track that down.

2) I setup a test case, and with an empty cache and an escalation event (404 from the first origin) (and the configuration below), I get a loop in the gzip plugin:

[Dec 12 13:40:40.777] Server {0x7fa1aa9f4700} DIAG: (gzip) WARNING: deflate() call failed: -2
[Dec 12 13:40:40.777] Server {0x7fa1aa9f4700} DIAG: (gzip) [../../../trafficserver.git/plugins/gzip/gzip.cc:332] [gzip_transform_one] ERROR: gzip-transform: ERROR: avail_in is (12): should be 0
[Dec 12 13:40:40.777] Server {0x7fa1aa9f4700} DIAG: (gzip) WARNING: deflate() call failed: -2
[Dec 12 13:40:40.777] Server {0x7fa1aa9f4700} DIAG: (gzip) [../../../trafficserver.git/plugins/gzip/gzip.cc:332] [gzip_transform_one] ERROR: gzip-transform: ERROR: avail_in is (12): should be 0
[Dec 12 13:40:40.777] Server {0x7fa1aa9f4700} DIAG: (gzip) WARNING: deflate() call failed: -2
[Dec 12 13:40:40.777] Server {0x7fa1aa9f4700} DIAG: (gzip) [../../../trafficserver.git/plugins/gzip/gzip.cc:332] [gzip_transform_one] ERROR: gzip-transform: ERROR: avail_in is (12): should be 0

My remap.config is:

map http://fedora.ogre.com/httpbin http://httpbin.org @plugin=gzip.so @pparam=/tmp/gzip.config \
    @plugin=escalate.so @pparam=401,403,404,407,410,500,501,502,503,504,505:cosmo.ogre.com

The request is:

curl -D - -o /dev/null -s  --compress http://fedora.ogre.com/httpbin/tests/foo.txt

The gzip.config is:

enabled true
cache false
flush true
remove-accept-encoding true

compressible-content-type text/*
compressible-content-type *xml
compressible-content-type *font*
compressible-content-type *ml;*
compressible-content-type *javascript
compressible-content-type *json
compressible-content-type *mpegURL
compressible-content-type *mpegurl
compressible-content-type application/pkix-crl
compressible-content-type *type
compressible-content-type *otf
compressible-content-type *ttf
compressible-content-type application/eot
compressible-content-type application/x-httpd-cgi
compressible-content-type application/x-perl
compressible-content-type image/vnd.microsoft.icon
compressible-content-type image/x-icon

Fwiw, the gzip.so plugin alone, without escalation works fine, this loop is only triggered when escalation happens.

oknet commented 6 years ago

reformat the history with line number (assert on line 66)

  1 $2 = {
  2 ...
  3 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 4},
  4 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 5},
  5 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 5},
  6 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 6},
  7 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 6},
  8 {fileline = 0x5558591f1cee "HttpSM.cc:7421", event = 65535, reentrancy = 6},
  9 {fileline = 0x5558591ea841 "HttpCacheSM.cc:118", event = 1103, reentrancy = -1},
 10 {fileline = 0x5558591efd86 "HttpSM.cc:2607", event = 1103, reentrancy = 7},
 11 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 8},
 12 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 8},
 13 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 9},
 14 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 9},
 15 {fileline = 0x5558591f1cd0 "HttpSM.cc:7381", event = 65535, reentrancy = 9},
 16 {fileline = 0x5558591f1d1b "HttpSM.cc:7536", event = 65535, reentrancy = 9},
 17 {fileline = 0x5558591ea8f7 "HttpCacheSM.cc:177", event = 1108, reentrancy = -1},
 18 {fileline = 0x5558591efcd9 "HttpSM.cc:2488", event = 1108, reentrancy = 10},
 19 {fileline = 0x5558591f1d0c "HttpSM.cc:7434", event = 65535, reentrancy = 10},
 20 {fileline = 0x5558591ef7a5 "HttpSM.cc:1742", event = 200, reentrancy = 11},     // ----> NET_EVENT_OPEN
 21 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 12},
 22 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 12},
 23 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 13},
 24 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 13},
 25 {fileline = 0x5558591f0a95 "HttpSM.cc:4587", event = 0, reentrancy = 6},
 26 {fileline = 0x5558591ef905 "HttpSM.cc:2008", event = 102, reentrancy = 1},
 27 {fileline = 0x5558591ef905 "HttpSM.cc:2008", event = 103, reentrancy = 1},
 28 {fileline = 0x5558591ef882 "HttpSM.cc:1836", event = 100, reentrancy = 1},
 29 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 2},
 30 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 2},
 31 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 3},
 32 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 3},
 33 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 4},
 34 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 4},
 35 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 5},
 36 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 5},
 37 {fileline = 0x5558591f13df "HttpSM.cc:6481", event = 65535, reentrancy = 5},
 38 {fileline = 0x5558591f0049 "HttpSM.cc:3000", event = 102, reentrancy = 0},
 39 {fileline = 0x5558591f0260 "HttpSM.cc:3462", event = 103, reentrancy = 0},
 40 {fileline = 0x5558591ef584 "HttpSM.cc:1243", event = 2000, reentrancy = 1},     // ----> TRANSFORM_READ_READY
 41 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 2},
 42 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 2},
 43 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 3},
 44 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 3},
 45 {fileline = 0x5558591f1cee "HttpSM.cc:7421", event = 65535, reentrancy = 3},
 46 {fileline = 0x5558591ea841 "HttpCacheSM.cc:118", event = 1103, reentrancy = -1},
 47 {fileline = 0x5558591efd86 "HttpSM.cc:2607", event = 1103, reentrancy = 4},
 48 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 5},
 49 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 5},
 50 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 6},
 51 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 6},
 52 {fileline = 0x5558591f1cd0 "HttpSM.cc:7381", event = 65535, reentrancy = 6},
 53 {fileline = 0x5558591f1d1b "HttpSM.cc:7536", event = 65535, reentrancy = 6},
 54 {fileline = 0x5558591efcd9 "HttpSM.cc:2488", event = 1109, reentrancy = 7},
 55 {fileline = 0x5558591f0a95 "HttpSM.cc:4587", event = 40768, reentrancy = 3},
 56 {fileline = 0x5558591efcd9 "HttpSM.cc:2488", event = 1109, reentrancy = 1},
 57 {fileline = 0x5558591f1d0c "HttpSM.cc:7434", event = 65535, reentrancy = 1},
 58 {fileline = 0x5558591ef7a5 "HttpSM.cc:1742", event = 200, reentrancy = 2},     // ----> NET_EVENT_OPEN
 59 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 3},
 60 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 3},
 61 {fileline = 0x5558591ef61d "HttpSM.cc:1355", event = 60000, reentrancy = 4},
 62 {fileline = 0x5558591ef648 "HttpSM.cc:1395", event = 60000, reentrancy = 4}}
 63 {fileline = 0x5558591ef905 "HttpSM.cc:2008", event = 102, reentrancy = 1},
 64 {fileline = 0x5558591ef905 "HttpSM.cc:2008", event = 103, reentrancy = 1},
 65 {fileline = 0x5558591f0470 "HttpSM.cc:3838", event = 103, reentrancy = 0},
 66 {fileline = 0x5558591ef7a5 "HttpSM.cc:1742", event = 2301, reentrancy = 1},
oknet commented 6 years ago

The 2nd NET_EVENT_OPEN is a retry request but I can not find the EOS/ERROR event for 1st NET_EVENT_OPEN.

oknet commented 6 years ago

If the Escalate Plugin and Transform Plugin are both enabled:

  1. It seems got a HTTP 4xx or 5xx response from origin server.
  2. The Content-Length of the response is great than 0
  3. The payload of the response is processed by Transform Plugin. (line 40)
  4. The Escalate Plugin make a new retry request to alternative origin server. The default handler of HttpSM is set to HttpSM::state_http_server_open().
  5. TransformVC does not closed and call back to HttpSM. (line 66)
  6. Asserted

The Escalate Plugin can not working with the Transform Plugin.

oknet commented 6 years ago

@zwoop please post your escalate plugin's config.

source: gzip.cc
 628 static int
 629 transformable(TSHttpTxn txnp, bool server, HostConfiguration *host_configuration, int *compress_type, int *algorithms)
 630 {
...
 665   // conservatively pick some statusses to compress
 666   if (!(resp_status == 200 || resp_status == 404 || resp_status == 500)) {
 667     info("http response status [%d] is not compressible", resp_status);
 668     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
 669     return 0;
 670   }

@zwoop please modify the line 666 and try to compress the HTTP 200 response only.

zwoop commented 6 years ago

Yeh, interesting, why would it need to compress a 404 or a 500?? The config is

@plugin=escalate.so @pparam=401,403,404,407,410,500,501,502,503,504,505:new-origin.a.com

Let me try to see if changing gzip plugin helps. If not, maybe we just have to document the escalate (and follow redirect API) that it might not work together with a transform.