Skip to content

HGETALL Hash not found without error on high memory pressure and multiple threads #2920

Closed

Description

@jcaspes

Hello,

While testing the StackExchange.Redis library (specifically the HGETALL api) under high memory pressure to induce frequent OutOfMemory exceptions, I encountered cases where received hashentry[] array is null or empty. No error is returned, so the calling program assumes the key does not exist, when in fact it should throw an exception.

Tested with this program: https://github.com/jcaspes/StackExchange.Redis/tree/MemoryTester/toys/MemoryTester

In this program, each thread only performs infinite HGETALL operations on a key with its thread ID, so it should only retrieve data that it has written itself.

here is a sample output; we can see that thread 27 (Th27hT) have retrieved nothing, and no exception was thrown:

27 : Key 'MemoryTester:Th27hT' not found

Activity

  1. mgravell commented on Jul 22, 2026

    @mgravell
    Member

    Thanks for the report. StackExchange.Redis 3.0 ships a substantial rewrite of the low-level IO core — a new RESPite-based stack that replaces Pipelines.Sockets.Unofficial and the old backlog/write loop — and we're confident this issue is addressed by that work.

    Closing as resolved in 3.0. If you can still reproduce on 3.0.x, please comment and we'll reopen and investigate with fresh diagnostics.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions