Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis_proxy: KEYS command hangs #38508

Open
urusha opened this issue Feb 20, 2025 · 1 comment
Open

redis_proxy: KEYS command hangs #38508

urusha opened this issue Feb 20, 2025 · 1 comment

Comments

@urusha
Copy link

urusha commented Feb 20, 2025

Description:
KEYS command hangs with envoy redis_proxy, after such query envoy can't be killed normally by TERM,INT signals.

Repro steps:
debian 12 amd64, redis 7.4.1, envoy-contrib-1.33.0-linux-x86_64

echo 'SET test test123' | redis-cli -h 127.0.0.1 -p 6380 -a pass1
OK
echo 'GET test' | redis-cli -h 127.0.0.1 -p 6380 -a pass1
"test123"

while

echo 'KEYS *' | redis-cli -h 127.0.0.1 -p 6380 -a pass1

hangs forever, other queries continue to work, but after KEYS * query - envoy can't be killed by TERM,INT (KILL works).

Config:

static_resources:
  listeners:
  - name: redis_listener
    address:
      socket_address:
        address: 127.0.0.1
        port_value: 6380
    filter_chains:
    - filters:
      - name: envoy.redis_proxy
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.redis_proxy.v3.RedisProxy
          stat_prefix: egress_redis
          settings:
            op_timeout: 5s
          prefix_routes:
            catch_all_route:
              cluster: redis_cluster
          downstream_auth_passwords:
          - inline_string: "pass1"
  clusters:
  - name: redis_cluster
    connect_timeout: 3s
    type: STRICT_DNS
    dns_lookup_family: V4_ONLY
    load_assignment:
      cluster_name: redis
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: 127.0.0.1
                port_value: 6379
    typed_extension_protocol_options:
        envoy.filters.network.redis_proxy:
          "@type": type.googleapis.com/envoy.extensions.filters.network.redis_proxy.v3.RedisProtocolOptions
          auth_password:
            inline_string: "pass2"

Logs:
Just one line about the query, with debug enabled:

[2025-02-20 17:03:25.591][4005349][debug][redis] [source/extensions/filters/network/redis_proxy/command_splitter_impl.cc:875] splitting '["KEYS", "*"]'
@urusha urusha added bug triage Issue requires triage labels Feb 20, 2025
@adisuissa adisuissa added area/redis and removed triage Issue requires triage labels Feb 21, 2025
@adisuissa
Copy link
Contributor

cc @msukalski @HenryYYang @mattklein123 @weisisea
Seems like some resource is not being released by the redis filter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants