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

MuPDF unbounded memory growth #55

Closed
bricewge opened this issue May 20, 2019 · 4 comments
Closed

MuPDF unbounded memory growth #55

bricewge opened this issue May 20, 2019 · 4 comments

Comments

@bricewge
Copy link

When reading a PDF, scanned pages of a book, I got a crash saying: thread 'main' panicked at 'no entry found for key'. If I remember correctly I was browsing it, which is slow, it went unresponsive and I tried to get back to the shelf by touching the center of the screen. After a few second it rebooted.
I wasn't able to reproduce it.

@baskerville
Copy link
Owner

Please use the attached release binary (with debug symbols). And in plato.sh, replace:

./plato >> info.log 2>&1 || mv info.log crash.log

with:

RUST_BACKTRACE=1 ./plato >> info.log 2>&1 || mv info.log crash.log

If you manage to reproduce or encounter another crash, crash.log will provide a useful backtrace.

plato-0.7.1-release_debug_binary.zip

@baskerville
Copy link
Owner

I was able to reproduce this somehow. I've got additional messages:

error: malloc of 2482272 bytes failed
error: malloc of 5911576 bytes failed

I will try to investigate.

@baskerville baskerville changed the title thread 'main' panicked at 'no entry found for key' MuPDF unbounded memory growth Aug 31, 2019
@baskerville
Copy link
Owner

This is quite easy to reproduce:

  1. Open a large PDF.
  2. Jump to a random page.
  3. Go to step 2.

Running free -m on each page jump shows the associated drop in the amount of free memory.

The problem is specific to MuPDF. I'm assuming that it has to do with MuPDF's cache. But the cache shouldn't grow beyond 32 MiB

@baskerville
Copy link
Owner

This is a bug in MuPDF.

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