Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Large PEXPIRE closes the connection without a reply

Open
#2,245 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp, redis
Domain
database

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/garnet

All issues in microsoft/garnet

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.