[Qemu-devel] [Bug 1245703] Re: LD_PREFIX option reads directories recursively in an endless loop
** Changed in: qemu (Debian) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1245703 Title: LD_PREFIX option reads directories recursively in an endless loop Status in QEMU: Confirmed Status in qemu package in Debian: Fix Released Bug description: If I run qemu user emulation with -L /path/to/my/sysroot/ in which also 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. 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 2 entries which QEMU is loading every time. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1245703/+subscriptions
[Qemu-devel] [Bug 1245703] Re: LD_PREFIX option reads directories recursively in an endless loop
I posted a patch a while back that would fix this: https://patchwork.kernel.org/patch/9512083/ -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1245703 Title: LD_PREFIX option reads directories recursively in an endless loop Status in QEMU: Confirmed Status in qemu package in Debian: Confirmed Bug description: If I run qemu user emulation with -L /path/to/my/sysroot/ in which also 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. 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 2 entries which QEMU is loading every time. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1245703/+subscriptions
[Qemu-devel] [Bug 1245703] Re: LD_PREFIX option reads directories recursively in an endless loop
** Changed in: qemu Status: New => Confirmed ** Tags added: linux-user -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1245703 Title: LD_PREFIX option reads directories recursively in an endless loop Status in QEMU: Confirmed Status in qemu package in Debian: Confirmed Bug description: If I run qemu user emulation with -L /path/to/my/sysroot/ in which also 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. 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 2 entries which QEMU is loading every time. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1245703/+subscriptions
[Qemu-devel] [Bug 1245703] Re: LD_PREFIX option reads directories recursively in an endless loop
We need to be able to run qemu as not root. Has anyone tried using qemu with fakechroot? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1245703 Title: LD_PREFIX option reads directories recursively in an endless loop Status in QEMU: New Status in qemu package in Debian: Confirmed Bug description: If I run qemu user emulation with -L /path/to/my/sysroot/ in which also 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. 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 2 entries which QEMU is loading every time. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1245703/+subscriptions
[Qemu-devel] [Bug 1245703] Re: LD_PREFIX option reads directories recursively in an endless loop
We're (Yocto Project) hit this often. We're building a root file system and then using userspace qemu to run binaries inside it (such as fc- cache). If a cyclic symlink appears in the rootfs, it blows up. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1245703 Title: LD_PREFIX option reads directories recursively in an endless loop Status in QEMU: New Status in qemu package in Debian: Confirmed Bug description: If I run qemu user emulation with -L /path/to/my/sysroot/ in which also 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. 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 2 entries which QEMU is loading every time. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1245703/+subscriptions
Re: [Qemu-devel] [Bug 1245703] Re: LD_PREFIX option reads directories recursively in an endless loop
On 26 March 2015 at 21:37, Ross Burton r...@burtonini.com wrote: We're (Yocto Project) hit this often. We're building a root file system and then using userspace qemu to run binaries inside it (such as fc- cache). If a cyclic symlink appears in the rootfs, it blows up. If you're actually building a rootfs then you're probably better off using binfmt-misc and chrooting into it rather than using -L. -L really isn't intended to point at a full rootfs. -- PMM
[Qemu-devel] [Bug 1245703] Re: LD_PREFIX option reads directories recursively in an endless loop
One ugly workaround is, in case anyone needs it: cp -a /usr/bin/qemu-arm-static /mnt/mychroot/ chroot /mnt/mychroot /qemu-arm-static /bin/sh -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1245703 Title: LD_PREFIX option reads directories recursively in an endless loop Status in QEMU: New Status in “qemu” package in Debian: Unknown Bug description: If I run qemu user emulation with -L /path/to/my/sysroot/ in which also 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. 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 2 entries which QEMU is loading every time. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1245703/+subscriptions
[Qemu-devel] [Bug 1245703] Re: LD_PREFIX option reads directories recursively in an endless loop
** Changed in: qemu (Debian) Status: Unknown = Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1245703 Title: LD_PREFIX option reads directories recursively in an endless loop Status in QEMU: New Status in “qemu” package in Debian: Confirmed Bug description: If I run qemu user emulation with -L /path/to/my/sysroot/ in which also 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. 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 2 entries which QEMU is loading every time. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1245703/+subscriptions
[Qemu-devel] [Bug 1245703] Re: LD_PREFIX option reads directories recursively in an endless loop
qemu-arm *and* qemu-arm-static 1.5.0+dfsg-3ubuntu5.1 (AMD64 13.10 host) are affected by this. Steps to reproduce: 0. mkdir /mnt/mychroot 1. qemu-debootstrap --arch=armhf wheezy /mnt/mychroot http://ftp.debian.org/debian 2. qemu-arm-static -L /mnt/mychroot /mnt/mychroot/usr/sbin/chroot /mnt/mychroot /bin/sh In this case, the loop starts when it meets /mnt/mychroot/dev/fd (which links to /proc/self/fd). ** Bug watch added: Debian Bug tracker #636035 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636035 ** Also affects: qemu (Debian) via http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636035 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1245703 Title: LD_PREFIX option reads directories recursively in an endless loop Status in QEMU: New Status in “qemu” package in Debian: Unknown Bug description: If I run qemu user emulation with -L /path/to/my/sysroot/ in which also 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. 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 2 entries which QEMU is loading every time. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1245703/+subscriptions
[Qemu-devel] [Bug 1245703] Re: LD_PREFIX option reads directories recursively in an endless loop
Ok, thanks for the info. For me it looks like removing the whole path code and putting a one-liner combining two string is the best solution. But maybe I am missing something. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1245703 Title: LD_PREFIX option reads directories recursively in an endless loop Status in QEMU: New Bug description: If I run qemu user emulation with -L /path/to/my/sysroot/ in which also 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. 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 2 entries which QEMU is loading every time. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1245703/+subscriptions