Large PEXPIRE closes the connection without a reply
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 62/100
Research direction
The payload names no source file. Run the included Python script against a local Garnet instance to reproduce the dropped connection, then find the PEXPIRE handler and its millisecond-to-expiry conversion. Issue #2094 fixed the GETEX path and may show the overflow pattern to follow. Done when a missing key returns integer 0 (or a normal error for out-of-range values) and the connection stays open.
Written by the indexing model from the issue text.
Description
Describe the bug
A large PEXPIRE on a missing key closes the connection without a reply. The server stays up and a new connection can PING.
Steps to reproduce the bug
Run this Python 3 script against a local test instance at port 6379 (standard library only):
import socket, uuid
args = [b"PEXPIRE", uuid.uuid4().hex.encode(), b"300000000000000"]
request = b"*3\r\n" + b"".join(b"$%d\r\n%s\r\n" % (len(a), a) for a in args)
with socket.create_connection(("127.0.0.1", 6379), timeout=3) as client:
client.settimeout(3)
client.sendall(request)
print(repr(client.recv(64)))
Actual: an empty byte string (EOF).
Expected behavior
Redis returns an integer reply of 0. A normal error would also be fine if the expiry is outside Garnet's supported range.
Screenshots
No response
Release version
Garnet main at 44cf0bdb7d36 (reports 2.2.1)
IDE
No response
OS version
Linux arm64
Additional context
EXPIRE with 300000000000 has the same result. Related: #2094 fixed the GETEX path.
- Dominant language
- C#
- Stars
- 12k
- Forks
- 711
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 58
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/garnet
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Maintainers usually reply within 2 days
-
2.2.1: SAVE fails - main index checkpoint buffer only 512-byte aligned on 4096-sector device (NativeStorageDevice misaligned I/O)Possibly taken @TedHartMS claimed this 1 day ago. Open
microsoft/garnet#2239 · 2 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
SET key value KEEPTTL deletes the key when it has a TTL and the new value does not fit in placePossibly taken @TedHartMS claimed this 4 days ago. Open
microsoft/garnet#2232 · 1 assignee ·
Maintainers usually reply within 2 days
All issues in microsoft/garnet
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-cs#689 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 7 days
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
vchelaru/FlatRedBall2#1481 ·
Maintainers usually reply within 1 day
-
ai-chat bug trivial
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area-signalr
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dotnet/aspnetcore#69842 · 1 comment ·
Maintainers usually reply within 1 day