linux-user: doesn't handle guest setting its memory ulimit very small
Bug #1426593 reported by
aaron
This bug report is a duplicate of:
Bug #1163034: linux-user mode can't handle guest setting a very small RLIMIT_AS (hangs running gnutls28, coreutils configure check code).
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
using the latest build from git (hash 041ccc922ee4746
i am using an amd64 host with an arm chroot using "qemu-user arm cortex-a8" cpu emulation to run it
building coreutils hangs on "checking whether printf survives out-of-memory conditions"
i have not had time to dig into the build system to isolate the test yet, there were old reports of this bug but i can no longer find them on google.
tags: | added: linux-user |
Changed in qemu: | |
status: | New → Confirmed |
summary: |
- qem-user arm cortex-a8 printf out-of-memory hang + linux-user: doesn't handle guest setting its memory ulimit very small |
To post a comment you must log in.
On 28 February 2015 at 09:01, aaron <email address hidden> wrote: 93a2869d4e3b59e 920c739bc0 ) and all older versions i have tested.
> Public bug reported:
>
> using the latest build from git (hash 041ccc922ee4746
> i am using an amd64 host with an arm chroot using "qemu-user arm cortex-a8" cpu emulation to run it
>
> building coreutils hangs on "checking whether printf survives out-of-
> memory conditions"
>
> i have not had time to dig into the build system to isolate the test
> yet, there were old reports of this bug but i can no longer find them on
> google.
Yes, I seem to recall looking at this one before. QEMU's linux-user
code doesn't try to isolate the guest's memory allocations from
its own allocations. So if the guest sets the memory limit to
something very small then the chances are good that this will
result in one of QEMU's internal allocations failing, and then
QEMU will probably exit with an error or possibly crash or hang
(some of our error handling on these allocations is not good).
For this kind of test to work correctly we would need to fake
the memory limit syscalls rather than just passing them through
to the host, and then also do all the accounting to track how
much memory the guest has allocated. That's a fair amount of
work so it's unlikely this bug will be fixed unless somebody
who cares about it submits patches, I'm afraid.
-- PMM