pandoc OOM with ghc 10.4
Summary
Pandoc printed an out-of-memory error and said to report it as a GHC bug, so I'm doing that. Write a brief description of the issue.
Steps to reproduce
Please provide a set of concrete steps to reproduce the issue.
I ran "pandoc filename.epub -t plain -o filename.txt" and it produced the following output:
pandoc: internal error: Unable to commit 1048576 bytes of memory (GHC version 8.10.4 for x86_64_alpine_linux) Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug Command terminated by signal 6
I can supply the epub file if anyone wants it but I think this is likely to happen generically if the epub is too big for pandoc to handle in the available memory.
Expected behavior
What do you expect the reproducer described above to do?
Ideally if pandoc can trap OOM errors then it should print a message and exit gracefully. It really was running out of memory in this example, a 2MB input file and a 2GB virtual machine (pandoc uses a lot of memory for large epub inputs). I would have thought this was a pandoc issue but it said to report it as a GHC bug so here we are. Maybe the GHC memory allocator is doing something pandoc didn't expect.
Environment
- GHC version used: 10.4
Optional:
- Operating System: Debian 10
- System Architecture: x64