Skip to content

Conversation

@ekexium
Copy link

@ekexium ekexium commented Jan 15, 2026

I ran into a memory leak problem when using the SkipMap. Please take a look if this is the root cause.
This probably relates to #1178

The comment of RefEntry says:

/// You *must* call `release` to free this type, otherwise the node will be
/// leaked. This is because releasing the entry requires a `Guard`.

But when RefEntry is overwritten by clone_from, there is no decrement or release.

I can reproduce a memory leak in the test stress_skipmap_range_iter in tikv/tikv#19284

@ekexium ekexium changed the title fix: release RefRange in SkipList when dropping it fix: release RefEntry in SkipList when dropping it Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant