Skip to content

Receiving other thread HGETALL request result on high memory pressure and multiple threads #2919

@jcaspes

Description

@jcaspes

Hello,

While testing the StackExchange.Redis library (on HGETALL api) under high memory pressure to induce frequent OutOfMemory exceptions, I encountered cases where received data is valid but not expected and appears to be the query result from an other thread.

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 a sample output; we can see that thread 218 (Th218hT) retrieved valid data that was queried by thread 58 (Th58hT)

218 : Error in key, expected:Th218hT, actual:Th58hT, value is a valid but from an other query: True

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