LD_PREFIX option reads directories recursively in an endless loop
Bug #1245703 reported by
Sebastian Macke
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned | ||
qemu (Debian) |
Fix Released
|
Unknown
|
Bug Description
If I run qemu user emulation with -L /path/to/
According to the strace output it follows the symbolic links in the proc filesystem running forever in a recursive loop.
The easiest solution would be to add in the function "add_dir_maybe" in the file util/path.c an additional check for symbolic links that it don't follow them.
Also I don't really understand the need of doing this. A lot of ressources are wasted everytime QEMU-user is started just by having the directory structure in memory. In my case this are more than 20000 entries which QEMU is loading every time.
Changed in qemu (Debian): | |
status: | Unknown → Confirmed |
Changed in qemu: | |
status: | New → Confirmed |
tags: | added: linux-user |
Changed in qemu (Debian): | |
status: | Confirmed → Fix Released |
To post a comment you must log in.
On 28 October 2013 23:15, Sebastian Macke <email address hidden> wrote: my/sysroot/ in which also
> If I run qemu user emulation with -L /path/to/
> the proc and dev filesystem is mounted QEMU eats my memory until it gets
> killed by the kernel.
>
> According to the strace output it follows the symbolic links in the proc
> filesystem running forever in a recursive loop.
>
> The easiest solution would be to add in the function "add_dir_maybe" in
> the file util/path.c an additional check for symbolic links that it
> don't follow them.
Yeah, this -L code is just busted. It's really only intended to work
with extremely simple sysroot directories which don't have weird
stuff like proc mounts or symlinks and aren't very big.
If the thing you're looking at isn't like that then you might be better
off using the "static qemu and chroot into the directory" approach
instead.
-- PMM