Jump to solution
Verify

The Fix

pip install redis==7.1.0

Based on closed redis/redis-py issue #3074 · PR/commit linked

Jump to Verify Open PR/Commit
@@ -58,11 +58,11 @@ # HIDE_END res7 = r.sinter("bikes:racing:france", "bikes:racing:usa") -print(res7) # >>> {'bike:1'} +print(res7) # >>> ['bike:1'] # STEP_END
repro.py
url = "rediss://hostname:6379/0?protocol=3" client = redis.cluster.RedisCluster.from_url(url) client.get("test") Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\npip install redis==7.1.0\nWhen NOT to use: This fix is not applicable if you rely on the previous behavior of returning sets instead of lists.\n\n

Why This Fix Works in Production

  • Trigger: url = "rediss://hostname:6379/0?protocol=3"
  • Mechanism: The segmentation fault occurs due to the interaction between RESP3 and the hiredis library when parsing certain responses
  • Why the fix works: Addresses a segmentation fault issue in `redis.cluster.RedisCluster` with RESP3 and hiredis by upgrading the required hiredis-py version to at least 3.0.0 and changing the embedded parser to always represent RESP3 sets… (first fixed release: 7.1.0).

Why This Breaks in Prod

  • Shows up under Python 3.11.7 in real deployments (not just unit tests).
  • The segmentation fault occurs due to the interaction between RESP3 and the hiredis library when parsing certain responses
  • Surfaces as: url = "rediss://hostname:6379/0?protocol=3"

Proof / Evidence

  • GitHub issue: #3074
  • Fix PR: https://github.com/redis/redis-py/pull/3324
  • First fixed release: 7.1.0
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-08
  • Confidence: 0.85
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.43

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“Hi @jakob-keller , This is indeed the same as #3145”
@gerzse · 2024-06-14 · source
“Thanks for following up! > I'm also curious, what is your main reason for using hiredis-py instead of the built-in RESP parser from redis-py? My…”
@jakob-keller · 2024-06-14 · source
“Thank you for addressing this. A quick test confirms that the issue is fixed by hiredis==3.0.0.”
@jakob-keller · 2024-07-22 · source

Failure Signature (Search String)

  • url = "rediss://hostname:6379/0?protocol=3"

Error Message

Stack trace
error.txt
Error Message ------------- url = "rediss://hostname:6379/0?protocol=3" client = redis.cluster.RedisCluster.from_url(url) client.get("test") Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)
Stack trace
error.txt
Error Message ------------- Program received signal SIGSEGV, Segmentation fault. 0x0000aaaaaab9780c in PyTuple_GetItem () (gdb) bt #0 0x0000aaaaaab9780c in PyTuple_GetItem () #1 0x0000fffff6b05920 in tryParentize (obj=0xfffff6735c40, task=0xaaaaab36b5d0) at src/reader.c:81 #2 createArrayObject (task=0xaaaaab36b5d0, elements=<optimized out>) at src/reader.c:171 #3 0x0000fffff6b0cb18 in processAggregateItem (r=0xaaaaab334e60) at vendor/hiredis/read.c:540 #4 processItem (r=0xaaaaab334e60) at vendor/hiredis/read.c:647 #5 redisReaderGetReply (r=0xaaaaab334e60, reply=reply@entry=0xffffffffd0a8) at vendor/hiredis/read.c:763 #6 0x0000fffff6b04acc in Reader_gets (self=0xfffff671b7d0, args=<optimized out>) at src/reader.c:377 #7 0x0000aaaaaab88d60 in ?? () #8 0x0000aaaaaab8d3f8 in _PyEval_EvalFrameDefault () #9 0x0000aaaaaabb4148 in ?? () #10 0x0000aaaaaab8e2ac in _PyEval_EvalFrameDefault () #11 0x0000aaaaaaba5348 in _PyFunction_Vectorcall () #12 0x0000aaaaaab8d3f8 in _PyEval_EvalFrameDefault () #13 0x0000aaaaaabb4288 in ?? () #14 0x0000aaaaaab8ed90 in _PyEval_EvalFrameDefault () #15 0x0000aaaaaabb4288 in ?? () #16 0x0000aaaaaab8ed90 in _PyEval_EvalFrameDefault () #17 0x0000aaaaaabb4288 in ?? () --Type <RET> for more, q to quit, c to continue without paging--c #18 0x0000aaaaaab8ed90 in _PyEval_EvalFrameDefault () #19 0x0000aaaaaaba5348 in _PyFunction_Vectorcall () #20 0x0000aaaaaab8d ... (truncated) ...

Minimal Reproduction

repro.py
url = "rediss://hostname:6379/0?protocol=3" client = redis.cluster.RedisCluster.from_url(url) client.get("test") Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)

Environment

  • Python: 3.11.7

What Broke

Instances of RedisCluster crash the Python interpreter when executing commands with RESP3 enabled.

Why It Broke

The segmentation fault occurs due to the interaction between RESP3 and the hiredis library when parsing certain responses

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install redis==7.1.0

When NOT to use: This fix is not applicable if you rely on the previous behavior of returning sets instead of lists.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Fix reference: https://github.com/redis/redis-py/pull/3324

First fixed release: 7.1.0

Last verified: 2026-02-08. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix is not applicable if you rely on the previous behavior of returning sets instead of lists.

Verify Fix

verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
  • Pin production dependencies and upgrade only with a reproducible test that hits the failing path.

Version Compatibility Table

VersionStatus
7.1.0 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.