apache / apache/arrow-java

IllegalStateException: Memory leaked when closing RootAllocator

Open
#776 3 comments 0 reactions 0 assignees View on GitHub
Type: bug
Dominant language
Java
Stars
94
Forks
152
Avg merge
3d 16h
Merged PRs (30d)
11

Description

### Describe the bug, including details regarding any error messages, version, and platform.

I am encountering an IllegalStateException with the message "Memory was leaked by query" when closing a RootAllocator. This indicates that some memory allocated from the allocator was not released before the allocator was closed.

[error.log](https://github.com/user-attachments/files/20497923/error.log)

A minimal project that reproduces this issue can be found here:
[github](https://github.com/liweiyuan/arrow-interop)

Contributor guide

Open the contributing guide

Research direction

Start by running the minimal reproducer in the linked liweiyuan/arrow-interop project and compare its behavior with error.log. Trace which allocation remains when RootAllocator is closed; done means the reproducer no longer reports "Memory was leaked by query" or throws IllegalStateException during allocator shutdown.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.