[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

qemu user mode fails to run programs with large VM / built with address

From: Stefan Weil
Subject: qemu user mode fails to run programs with large VM / built with address sanitizer (was: Re: [PATCH v4 4/4] meson: Warn when TCI is selected but TCG backend is available)
Date: Thu, 28 Jan 2021 07:51:59 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

Am 27.01.21 um 22:47 schrieb Alex Bennée:

Stefan Weil<sw@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.

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
Do you have a command line? That sounds like something that should be

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]