Skip to content

Memory leak when providing a block cache #13645

Open
@krishan1390

Description

@krishan1390

Hi,

We have noticed a memory leak when we supply a block cache when opening rocks db.

Attached the code. Using 10.2.1 rocks db version.

Observations on running this program -

  1. The process RSS memory increases and doesn't come back down after all resources are closed. The memory isn't reclaimed if we force a GC too. The process's RSS memory ~= block + row cache size after all resources are closed and GC is forcefully run .
  2. Tested by running with jemalloc too and the leak remains so it shouldn't be a fragmentation problem.
  3. The memory isn't reclaimed if other processes require it. Running the same java program repeatedly results in an OOM.
  4. Strangely, there is no memory leak in macOS. The RSS memory increases during the execution but comes back down to baseline (~50 MB) after the resources are closed. So the memory leak exists on linux.

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