openzim / openzim/javascript-libzim

Memory leak: possibly caused by bindings

Open
#34 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
JavaScript
Stars
5
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Please see initial discussion at https://github.com/kiwix/kiwix-js/issues/872.

I corroborate a memory leak, which is particularly evident when loading and searching with large ZIM archives. After loading more than two ZIM archives (in succession), only using libzim for the Xapian full-text search, an app is prone to crashing with an Emscripten "cannot enlarge memory" error.

If anyone has any clues on how to debug this kind of thing, I'd be very grateful to hear them.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the initial discussion in kiwix-js issue 872 and reproduce the problem by loading and searching large ZIM archives repeatedly through the libzim bindings. Focus on the Xapian full-text search path and the Emscripten "cannot enlarge memory" failure; done means identifying the leak and preventing the crash during successive archive loads.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wasm
Domain
performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.