Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak on Linux #323

Open
se7enXF opened this issue Oct 24, 2024 · 1 comment
Open

Memory leak on Linux #323

se7enXF opened this issue Oct 24, 2024 · 1 comment

Comments

@se7enXF
Copy link

se7enXF commented Oct 24, 2024

  • version: 0.6.0
  • Windows: pycharm 2023.3.1 Community Edition, python 3.9
  • Linux: RHEl 7.5, python 3.9
  • problem: memory leak on Linux but not on Windows

Read frame codes:

from decord import VideoReader
reader = VideoReader(url)
frame_count = len(reader)
frame_ids = np.linespace(0, frame_count  - 1, 10, dtype=int).tolist()
frames = reader.get_batch(frame_ids).asnumpy()

I use decord to read video frames in a Fastapi view. There is no memory leak on Windows when debuging in pycharm, but leak on Linux when start python script directly. Memory only raise when requeset the api, without any signs of decreasing.

To debug memory leak, I call reader.del() after read frames. It works on Windows but meets Segmentation fault on Linux.

Finally, I use numpy.zeros() creating frames to replace decord reading frames, there is no memory leak.

Someone help me please.

@ITerydh
Copy link

ITerydh commented Nov 22, 2024

i also find memory leak on Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants