Am 27.01.21 um 22:47 schrieb Alex Bennée:
Stefan Weil<s...@weilnetz.de> writes:
I recently tried running tesseract with qemu-x86_64 because I had
expected that it might trigger some unimplemented TCG opcodes.
qemu-x86-64 is a poor choice as a relatively under maintained front-end
doesn't emulate a particularly new CPU or take advantage of the new TCG
features. ARM64 is pretty good because the default cpu for linux-user is
CPU max which a) enables all ISA features we have and b) exposes them
fairly easily to guest detection routines which probe feature registers.
Instead
it showed a general problem for native TCG: qemu-x86_64 allocates too
much memory for tesseract and gets killed by the Linux kernel OOM
handler.
Do you have a command line? That sounds like something that should be
fixed.
The problem occurred with a locally built tesseract, but I now found
that it is more general.
Any program which was compiled with address sanitizer uses huge virtual
memory (TB) right at the start. QEMU user mode tries to allocate that
memory until it is killed by the Linux kernel OOM handler.
A simple hello program compiled with "gcc -fsanitize=address hello.c" is
sufficient to show the problem. Just run it with "qemu-x86_64 a.out".
I did not test but expect the same problem for other architectures, too,
unless their VM is more limited.
Regards,
Stefan