envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.79k stars 4.76k forks source link

High CPU resource usage makes the management port inaccessible (not return) #13896

Closed chwetion closed 3 years ago

chwetion commented 3 years ago

Description: Envoy should not hang with high cpu(1c), curl envoy management port should return correct data

Repro steps:

  1. I compiled envoy on arm with my filter, steps as follow:
    # uname -a: Linux ecs-526c-0002 4.18.0-80.7.2.el7.aarch64 #1 SMP Thu Sep 12 16:13:20 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux
    # run command:
    docker pull envoyproxy/envoy-build-ubuntu:b480535e8423b5fd7c102fd30c92f4785519e33a-arm64
    mkdir -p /root/source && cd /root/source
    git clone https://github.com/envoyproxy/envoy-filter-example.git
    cd envoy-filter-example
    git submodule update --init
    cd envoy
    git checkout v1.16.0
    docker run --rm -it -v "/root/source":/source --name=envoy-build-env envoyproxy/envoy-build-ubuntu:b480535e8423b5fd7c102fd30c92f4785519e33a-arm64 /bin/bash
    cd /source/envoy-filter-example/http-filter-example
    bazel build //:envoy
  2. run envoy bin in this pc, steps as follow:
    ./envoy -c {configuartionfile} -l debug
  3. I have three configuration files, one of which may cause the cpu to be too high NORMAL CONFIGURATION as follow:
    admin:
    access_log_path: /root/envoy_test/admin_access.log
    address:
    socket_address:
      protocol: TCP
      address: 0.0.0.0
      port_value: 9901
    static_resources:
    listeners:
    - name: front_listener
    address:
      socket_address:
        protocol: TCP
        address: 0.0.0.0
        port_value: 15001
    filter_chains:
    - filters:
      - name: envoy.http_connection_manager
        typed_config:
          "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
          stat_prefix: ingress_http
          common_http_protocol_options:
            idle_timeout: 120s
          route_config:
            name: local_route
            virtual_hosts:
            - name: local_service
              domains: ["*"]
              routes:
              - match:
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: "/service-c1/.*"
                route:
                  cluster: service-c1
                  timeout: 0s
                  #idle_timeout: 90s
          http_filters:
          - name: http_filter_accesscontrol
            config:
              zone_name: oa-docker
              gateway_type: back
              cross_zone_service_set:
                - service_name: service-b1
              ip_white_control:
                ip_white_switch: false
                ip_set:
                  - ip_address: 172.31.198.222
                  - ip_address: 172.25.208.18
              url_white_control:
                url_white_switch: true
                static_url_set:
                  - url: "*/service/probeService/doProbe"
                    from_zone: biz
                    to_zone: oa-docker
                  - url: "*/service/probeService/doProbe"
                    from_zone: biz
                    to_zone: oa-docker
                  - url: /service-c1/*
                    from_zone: hl
                    to_zone: oa-docker
                  - url: /uumcm_proc/service/key/groupInfoService/*
                    from_zone: hl
                    to_zone: oa-docker
                  - url: "*/uumcm_proc/service/*/key/groupInfoService/*"
                    from_zone: biz
                    to_zone: oa-docker
                  - url: /service-c1/*
                    from_zone: abc
                    to_zone: oa-docker
                  - url: /service-b4/*
                    from_zone: biz
                    to_zone: oa-docker
                  - url: /service-c1/*
                    from_zone: biz
                    to_zone: oa-docker
              url_black_control:
                url_black_switch: true
                static_url_set:
                  - url: /service-c1/*
                    from_zone: hl
                    to_zone: oa-docker
                  - url: /service-c1/*
                    from_zone: abc
                    to_zone: oa-docker
          - name: envoy.router
    # CDS
    clusters:
    - name: service-c1
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    #max_requests_per_connection: 1
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: service-c1
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: 172.31.198.118
                port_value: 9001

    High CPU USAGE CONFIGURATION as follow:

    admin:
    access_log_path: /tmp/admin_access.log
    address:
    socket_address:
      protocol: TCP
      address: 0.0.0.0
      port_value: 9901
    static_resources:
    secrets: # 预先定义secret以供后面使用
    - name: server_cert
    tls_certificate: # 作为服务端时用的证书
      certificate_chain:
        filename: "/root/envoy_test/bin/certs/server.crt"
      private_key:
        filename: "/root/envoy_test/bin/certs/server.key"
    - name: client_cert
    tls_certificate: # 服务端要验证客户端身份时的证书
      certificate_chain:
        filename: "/root/envoy_test/bin/certs/client.crt"
      private_key:
        filename: "/root/envoy_test/bin/certs/client.key"
    - name: validation_context
    validation_context: # 用来认证被请求的服务端,upstream
      trusted_ca:
        filename: "/root/envoy_test/bin/certs/ca.crt"
    # 配置envoy LDS
    listeners:
    - name: front_http_listener
    address:
      socket_address:
        protocol: TCP
        address: 0.0.0.0
        # 配置这条LDS的监听端口监听端口,其实就是服务A访问envoy的端口,容器启动记得要暴露出去
        port_value: 8081
    filter_chains:
    - filters:
      # 配置fillter
      - name: envoy.http_connection_manager
        typed_config:
          "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
          stat_prefix: ingress_http
          common_http_protocol_options:
            idle_timeout: 120s
          route_config:
            name: local_route
            # 修改路由,拦截请求为 '*'
            virtual_hosts:
            - name: local_service
              domains: ["*"]
              # 编写路由规则
              routes:
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service-b2/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  front_http_service-b2
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service_b4/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  front_http_service_b4
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service-b6/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  front_http_service-b6
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service-c1/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  front_http_service-c1
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service-c4/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  front_http_service-c4
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service-c6/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  front_http_service-c6
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /report/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  front_http_report_report-0
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /report/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  front_http_report_report-1
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /report/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  front_http_report
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service-a1/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  front_http_service-a1
                  timeout:  0s
          http_filters:
          - name: envoy.router
    # CDS
    clusters:
    - name: front_http_service-b2
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service-b2
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32100
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32100
    - name: front_http_service_b4
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service_b4
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32100
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32100
    - name: front_http_service-b6
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service-b6
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32100
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32100
    - name: front_http_service-c1
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service-c1
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10200
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10400
    - name: front_http_service-c4
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service-c4
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10200
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10400
    - name: front_http_service-c6
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service-c6
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32100
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32100
    - name: front_http_report_report-0
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_report_report-0
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  report-0.report.cffexapp1
                port_value:  8080
    - name: front_http_report_report-1
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_report_report-1
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  report-1.report.cffexapp1
                port_value:  8080
    - name: front_http_report
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_report
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  report.cffexapp1
                port_value:  8080
    - name: front_http_service-a1
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service-a1
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  service-a1.cffexapp1
                port_value:  8080
    - name: back_http_service-b2
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service-b2
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32300
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32300
    - name: back_http_service_b4
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service_b4
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32300
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32300
    - name: back_http_service-b6
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service-b6
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32300
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32300
    - name: back_http_service-c1
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service-c1
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10600
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10800
    - name: back_http_service-c4
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service-c4
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10600
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10800
    - name: back_http_service-c6
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service-c6
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32300
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32300
    - name: back_http_report_report-0
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_report_report-0
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  report-0.report.cffexapp1
                port_value:  8080
    - name: back_http_report_report-1
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_report_report-1
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  report-1.report.cffexapp1
                port_value:  8080
    - name: back_http_report
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_report
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  report.cffexapp1
                port_value:  8080
    - name: back_http_service-a1
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service-a1
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  service-a1.cffexapp1
                port_value:  8080
    - name: back_http_listener
    address:
      socket_address:
        protocol: TCP
        address: 0.0.0.0
        # 配置这条LDS的监听端口监听端口,其实就是服务A访问envoy的端口,容器启动记得要暴露出去
        port_value: 8080
    filter_chains:
    - filters:
      # 配置fillter
      - name: envoy.http_connection_manager
        typed_config:
          "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
          stat_prefix: ingress_http
          common_http_protocol_options:
            idle_timeout: 120s
          route_config:
            name: local_route
            # 修改路由,拦截请求为 '*'
            virtual_hosts:
            - name: local_service
              domains: ["*"]
              # 编写路由规则
              routes:
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service-b2/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  back_http_service-b2
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service_b4/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  back_http_service_b4
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service-b6/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  back_http_service-b6
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service-c1/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  back_http_service-c1
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service-c4/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  back_http_service-c4
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service-c6/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  back_http_service-c6
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /report/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  back_http_report_report-0
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /report/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  back_http_report_report-1
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /report/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  back_http_report
                  timeout:  0s
              - match:
                  # 匹配拦截的uri
                  #prefix: "/service-b2"
                  safe_regex:
                    google_re2:
                      max_program_size: 100
                    regex: /service-a1/.*
                  # 路由 这如果是服务A的envoy就填服务B的envoy的LDS监听端口
                  # 如果是服务B的envoy就填服务B
                  # 其实作为nginx用服务B那边可以不要envoy吧
                route:
                  # 这里填选择的CDS(CDS就是下面的clusters)
                  cluster:  back_http_service-a1
                  timeout:  0s
          http_filters:
          - name: http_filter_accesscontrol
            config:
              zone_name:  oa
              gateway_type: back
              cross_zone_service_set:
                - service_name: service-b2
                  service_name: service-b3
              ip_white_control:
                ip_white_switch: false
                ip_set:
                  - ip_address: 172.31.198.222
                    ip_address: 172.31.198.102
                    ip_address: 172.31.198.115
                    ip_address: 172.31.198.118
                    ip_address: 172.25.208.18
              url_white_control:
                url_white_switch: true
                static_url_set:
                  - url: /service-a5/*
                    from_zone: biz
                    to_zone: oa
                  - url: /service_a7/*
                    from_zone: biz
                    to_zone: oa
                  - url: /service-a11/*
                    from_zone: internet
                    to_zone: oa
                  - url: /service-a13/*
                    from_zone: internet
                    to_zone: oa
                  - url: /oa/*
                    from_zone: biz
                    to_zone: oa
              url_black_control:
                url_black_switch: true
                static_url_set:
                  - url: /service-a16/*
                    from_zone: biz
                    to_zone: oa
                  - url: /service-a16/*
                    from_zone: internet
                    to_zone: oa
                  - url: /service-a17/*
                    from_zone: biz
                    to_zone: oa
                  - url: /service-a17/*
                    from_zone: internet
                    to_zone: oa
          - name: envoy.router
    # CDS
    clusters:
    - name: front_http_service-b2
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service-b2
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32100
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32100
    - name: front_http_service_b4
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service_b4
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32100
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32100
    - name: front_http_service-b6
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service-b6
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32100
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32100
    - name: front_http_service-c1
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service-c1
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10200
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10400
    - name: front_http_service-c4
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service-c4
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10200
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10400
    - name: front_http_service-c6
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service-c6
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32100
        - endpoint:
            health_check_config:
              port_value:  32100
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32100
    - name: front_http_report_report-0
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_report_report-0
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  report-0.report.cffexapp1
                port_value:  8080
    - name: front_http_report_report-1
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_report_report-1
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  report-1.report.cffexapp1
                port_value:  8080
    - name: front_http_report
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_report
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  report.cffexapp1
                port_value:  8080
    - name: front_http_service-a1
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: front_http_service-a1
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  service-a1.cffexapp1
                port_value:  8080
    - name: back_http_service-b2
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service-b2
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32300
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32300
    - name: back_http_service_b4
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service_b4
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32300
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32300
    - name: back_http_service-b6
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service-b6
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32300
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32300
    - name: back_http_service-c1
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service-c1
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10600
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10800
    - name: back_http_service-c4
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service-c4
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10600
        - endpoint:
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  10800
    - name: back_http_service-c6
    connect_timeout: 10s
    type: STRICT_DNS
    health_checks:
      timeout: 10s
      interval: 10s
      healthy_threshold: 1
      unhealthy_threshold: 1
      http_health_check:
        path: /ready
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service-c6
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.222
                port_value:  32300
        - endpoint:
            health_check_config:
              port_value:  32300
            address:
              socket_address:
                address:  172.31.198.102
                port_value:  32300
    - name: back_http_report_report-0
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_report_report-0
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  report-0.report.cffexapp1
                port_value:  8080
    - name: back_http_report_report-1
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_report_report-1
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  report-1.report.cffexapp1
                port_value:  8080
    - name: back_http_report
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_report
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  report.cffexapp1
                port_value:  8080
    - name: back_http_service-a1
    connect_timeout: 10s
    type: STRICT_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    # 这里填LB的策略
    lb_policy: ROUND_ROBIN
    common_http_protocol_options:
      idle_timeout: 30s
    load_assignment:
      cluster_name: back_http_service-a1
      endpoints:
      - lb_endpoints:
        # 这里填CDS下的endpoints
        - endpoint:
            address:
              socket_address:
                address:  service-a1.cffexapp1
                port_value:  8080

Logs: none

Call Stack:

GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-119.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "aarch64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/envoy_test/envoy...(no debugging symbols found)...done.
Attaching to program: /proc/23771/exe, process 23771
Reading symbols from /lib64/libm.so.6...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/librt.so.1...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libpthread.so.0...done.
[New LWP 23797]
[New LWP 23796]
[New LWP 23795]
[New LWP 23794]
[New LWP 23793]
[New LWP 23792]
[New LWP 23791]
[New LWP 23790]
[New LWP 23778]
[New LWP 23777]
[New LWP 23776]
[New LWP 23775]
[New LWP 23774]
[New LWP 23773]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib/ld-linux-aarch64.so.1...done.
Loaded symbols for /lib/ld-linux-aarch64.so.1
syscall () at ../ports/sysdeps/unix/sysv/linux/aarch64/syscall.S:38
38      svc 0x0
(gdb) backtrace
#0  syscall () at ../ports/sysdeps/unix/sysv/linux/aarch64/syscall.S:38
#1  0x0000aaaaed1359a8 in base::internal::SpinLockDelay(int volatile*, int, int) ()
#2  0x0000aaaaed13578c in SpinLock::SlowLock() ()
#3  0x0000aaaaed104f20 in SpinLock::Lock() ()
#4  0x0000aaaaed104f90 in SpinLockHolder::SpinLockHolder(SpinLock*) ()
#5  0x0000aaaaed118d14 in tcmalloc::CentralFreeList::Populate() ()
#6  0x0000aaaaed118b5c in tcmalloc::CentralFreeList::FetchFromOneSpansSafe(int, void**, void**) ()
#7  0x0000aaaaed118a74 in tcmalloc::CentralFreeList::RemoveRange(void**, void**, int) ()
#8  0x0000aaaaed133f48 in tcmalloc::ThreadCache::FetchFromCentralCache(unsigned int, int, void* (*)(unsigned long)) ()
#9  0x0000aaaaed1e40fc in tc_newarray ()
#10 0x0000aaaaeb9d658c in std::_Function_base::_Base_manager<Envoy::ThreadLocal::InstanceImpl::SlotImpl::set(std::function<std::shared_ptr<Envoy::ThreadLocal::ThreadLocalObject> (Envoy::Event::Dispatcher&)>)::{lambda()#1}>::_M_clone(std::_Any_data&, std::_Function_base::_Base_manager<Envoy::ThreadLocal::InstanceImpl::SlotImpl::set(std::function<std::shared_ptr<Envoy::ThreadLocal::ThreadLocalObject> (Envoy::Event::Dispatcher&)>)::{lambda()#1}> const&, std::integral_constant<bool, false>) ()
#11 0x0000aaaaeb9d59ec in std::_Function_base::_Base_manager<Envoy::ThreadLocal::InstanceImpl::SlotImpl::set(std::function<std::shared_ptr<Envoy::ThreadLocal::ThreadLocalObject> (Envoy::Event::Dispatcher&)>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<Envoy::ThreadLocal::InstanceImpl::SlotImpl::set(std::function<std::shared_ptr<Envoy::ThreadLocal::ThreadLocalObject> (Envoy::Event::Dispatcher&)>)::{lambda()#1}> const&, std::_Manager_operation) ()
#12 0x0000aaaaea302d58 in std::function<void ()>::function(std::function<void ()> const&) ()
#13 0x0000aaaaeb9d5f74 in Envoy::ThreadLocal::InstanceImpl::SlotImpl::wrapCallback(std::function<void ()>&&)::{lambda()#1}::function({lambda()#1} const&) ()
#14 0x0000aaaaeb9d5fd4 in std::_Function_base::_Base_manager<Envoy::ThreadLocal::InstanceImpl::SlotImpl::wrapCallback(std::function<void ()>&&)::{lambda()#1}>::_M_clone(std::_Any_data&, std::_Function_base::_Base_manager<Envoy::ThreadLocal::InstanceImpl::SlotImpl::wrapCallback(std::function<void ()>&&)::{lambda()#1}> const&, std::integral_constant<bool, false>) ()
#15 0x0000aaaaeb9d5668 in std::_Function_base::_Base_manager<Envoy::ThreadLocal::InstanceImpl::SlotImpl::wrapCallback(std::function<void ()>&&)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<Envoy::ThreadLocal::InstanceImpl::SlotImpl::wrapCallback(std::function<void ()>&&)::{lambda()#1}> const&, std::_Manager_operation) ()
#16 0x0000aaaaea302d58 in std::function<void ()>::function(std::function<void ()> const&) ()
#17 0x0000aaaaeba50258 in void __gnu_cxx::new_allocator<std::_List_node<std::function<void ()> > >::construct<std::function<void ()>, std::function<void ()> const&>(std::function<void ()>*, std::function<void ()> const&) ()
#18 0x0000aaaaeba4f910 in void std::allocator_traits<std::allocator<std::_List_node<std::function<void ()> > > >::construct<std::function<void ()>, std::function<void ()> const&>(std::allocator<std::_List_node<std::function<void ()> > >&, std::function<void ()>*, std::function<void ()> const&)
    ()
---Type <return> to continue, or q <return> to quit---
#19 0x0000aaaaeba4ee80 in std::_List_node<std::function<void ()> >* std::__cxx11::list<std::function<void ()>, std::allocator<std::function<void ()> > >::_M_create_node<std::function<void ()> const&>(std::function<void ()> const&) ()
#20 0x0000aaaaeba4e004 in void std::__cxx11::list<std::function<void ()>, std::allocator<std::function<void ()> > >::_M_insert<std::function<void ()> const&>(std::_List_iterator<std::function<void ()> >, std::function<void ()> const&) ()
#21 0x0000aaaaeba4ccac in std::__cxx11::list<std::function<void ()>, std::allocator<std::function<void ()> > >::push_back(std::function<void ()> const&) ()
#22 0x0000aaaaeba4abf0 in Envoy::Event::DispatcherImpl::post(std::function<void ()>) ()
#23 0x0000aaaaeb9d2178 in Envoy::ThreadLocal::InstanceImpl::SlotImpl::set(std::function<std::shared_ptr<Envoy::ThreadLocal::ThreadLocalObject> (Envoy::Event::Dispatcher&)>) ()
#24 0x0000aaaaec05ef60 in Envoy::Http::TlsCachingDateProviderImpl::onRefreshDate() ()
#25 0x0000aaaaec05ece0 in _ZZN5Envoy4Http26TlsCachingDateProviderImplC4ERNS_5Event10DispatcherERNS_11ThreadLocal13SlotAllocatorEENKUlvE_clEv ()
#26 0x0000aaaaec05f2e8 in _ZNSt17_Function_handlerIFvvEZN5Envoy4Http26TlsCachingDateProviderImplC4ERNS1_5Event10DispatcherERNS1_11ThreadLocal13SlotAllocatorEEUlvE_E9_M_invokeERKSt9_Any_data ()
#27 0x0000aaaaea1d89e0 in std::function<void ()>::operator()() const ()
#28 0x0000aaaaec3cff78 in _ZZN5Envoy5Event9TimerImplC4ERNS_9CSmartPtrI10event_baseXadL_Z15event_base_freeEEEESt8functionIFvvEERNS0_10DispatcherEENKUlisPvE_clEisSB_ ()
#29 0x0000aaaaec3d0014 in _ZZN5Envoy5Event9TimerImplC4ERNS_9CSmartPtrI10event_baseXadL_Z15event_base_freeEEEESt8functionIFvvEERNS0_10DispatcherEENUlisPvE_4_FUNEisSB_ ()
#30 0x0000aaaaec3e3dac in event_process_active_single_queue ()
#31 0x0000aaaaec3e4304 in event_process_active ()
#32 0x0000aaaaec3e4c38 in event_base_loop ()
#33 0x0000aaaaec3cd914 in Envoy::Event::LibeventScheduler::run(Envoy::Event::Dispatcher::RunType) ()
#34 0x0000aaaaeba4acc0 in Envoy::Event::DispatcherImpl::run(Envoy::Event::Dispatcher::RunType) ()
#35 0x0000aaaaeb9e4df0 in Envoy::Server::InstanceImpl::run() ()
#36 0x0000aaaaea02414c in Envoy::MainCommonBase::run() ()
#37 0x0000aaaaea029714 in Envoy::MainCommon::run() ()
#38 0x0000aaaaea024abc in Envoy::MainCommon::main(int, char**, std::function<void (Envoy::Server::Instance&)>) ()
#39 0x0000aaaaea022448 in main ()
(gdb)

strace can found as follow:

strace: Process 23771 attached
restart_syscall(<... resuming interrupted futex ...>) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 10715392}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 260996000}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 93632928}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 62976544}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 125873744}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 173996448}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 186385760}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 239255056}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 212127328}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 168438736}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 63051120}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 68325376}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 51281120}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 209161664}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 235232000}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 26886896}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 59823200}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 183985040}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 20941344}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 193067600}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 4220960}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 58235328}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 88122896}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 183684736}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 87716864}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 210091792}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 152364064}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 83500768}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 28397840}) = -1 ETIMEDOUT (Connection timed out)
futex(0xaaaaf00a2718, FUTEX_WAIT_PRIVATE, 2, {0, 131681136}) = -1 ETIMEDOUT (Connection timed out)
lambdai commented 3 years ago

Is it a regression? 1.16 switch to google tcmalloc by default. It doesn't support ARM Try using gperftcmalloc and get a cpu profile

chwetion commented 3 years ago

Try using gperftcmalloc and get a cpu profile

how can i use gperftcmalloc replace tcmalloc?

chwetion commented 3 years ago

solve this problem by upgrading glibc from 2.17 to 2.23