qemu-user-static for sparc32plus : bash: fork: Invalid argument
Public bug reported:
On Debian x86-64 host system I setup a sparc chroot using:
host $ mkdir sparc
host $ sudo debootstrap --arch=sparc --foreign wheezy sparc http://ftp.au.debian.org/debian
host $ sudo cp ~/Git/qemu/sparc32plus-linux-user/qemu-sparc32plus sparc/usr/bin/qemu-sparc32plus-static host $ LANG=C sudo chroot sparc/ /usr/bin/qemu-sparc32plus-static /bin/bash
When I then run the second stage of debootstrap I get:
target $ /debootstrap/debootstrap --second-stage
bash: fork: Invalid argument
The above procedures works perfectly for armhf.
This is with current git HEAD (commit93b6599734f81328ee3d608f57667742cafeea72).
** Affects: qemu
Importance: Undecided
Status: New
Signature · 30 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1054831 Title: qemu-user-static for sparc32plus : bash: fork: Invalid argument Status in QEMU: New Bug description: On Debian x86-64 host system I setup a sparc chroot using: host $ mkdir sparc host $ sudo debootstrap --arch=sparc --foreign wheezy sparc http://ftp.au.debian.org/debian host $ sudo cp ~/Git/qemu/sparc32plus-linux-user/qemu-sparc32plus sparc/usr/bin/qemu-sparc32plus-static host $ LANG=C sudo chroot sparc/ /usr/bin/qemu-sparc32plus-static /bin/bash When I then run the second stage of debootstrap I get: target $ /debootstrap/debootstrap --second-stage bash: fork: Invalid argument The above procedures works perfectly for armhf. This is with current git HEAD (commit 93b6599734f81328ee3d608f57667742cafeea72). To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1054831/+subscriptions
This is due to QEMU sparc32plus-linux-user not being compiled with NPTL support.
Signature · 30 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1054831 Title: qemu-user-static for sparc32plus : bash: fork: Invalid argument Status in QEMU: New Bug description: On Debian x86-64 host system I setup a sparc chroot using: host $ mkdir sparc host $ sudo debootstrap --arch=sparc --foreign wheezy sparc http://ftp.au.debian.org/debian host $ sudo cp ~/Git/qemu/sparc32plus-linux-user/qemu-sparc32plus sparc/usr/bin/qemu-sparc32plus-static host $ LANG=C sudo chroot sparc/ /usr/bin/qemu-sparc32plus-static /bin/bash When I then run the second stage of debootstrap I get: target $ /debootstrap/debootstrap --second-stage bash: fork: Invalid argument The above procedures works perfectly for armhf. This is with current git HEAD (commit 93b6599734f81328ee3d608f57667742cafeea72). To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1054831/+subscriptions
Quoted 2 lines · Dillon Amburgey
This is due to QEMU sparc32plus-linux-user not being compiled with NPTL support.
I just check, and NPTL is enabled. I also did this on the binary I compiled:
$ strings /usr/bin/qemu-sparc32plus-static | grep nptl
../nptl/sysdeps/pthread/createthread.c
../nptl/pthread_mutex_lock.c
nptl-init.c
../nptl/sysdeps/unix/sysv/linux/x86_64/../fork.cwhich suggests that it has been compiled with NPTL.
Signature · 30 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1054831 Title: qemu-user-static for sparc32plus : bash: fork: Invalid argument Status in QEMU: New Bug description: On Debian x86-64 host system I setup a sparc chroot using: host $ mkdir sparc host $ sudo debootstrap --arch=sparc --foreign wheezy sparc http://ftp.au.debian.org/debian host $ sudo cp ~/Git/qemu/sparc32plus-linux-user/qemu-sparc32plus sparc/usr/bin/qemu-sparc32plus-static host $ LANG=C sudo chroot sparc/ /usr/bin/qemu-sparc32plus-static /bin/bash When I then run the second stage of debootstrap I get: target $ /debootstrap/debootstrap --second-stage bash: fork: Invalid argument The above procedures works perfectly for armhf. This is with current git HEAD (commit 93b6599734f81328ee3d608f57667742cafeea72). To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1054831/+subscriptions
What I mean is that QEMU isn't compiled with guest support for NPTL on every architecture.
If you look in the configure script around line 3900, you'll see some architectures have target_nptl="yes" while others (including sparc) do not.
Unfortunately it looks like the code isn't complete for sparc support, so it isn't a simple matter of enabling it in the configure script.
The reason you get "bash: fork: Invalid argument" is because glibc makes a call to clone() with NPTL arguments that aren't supported.
Signature · 30 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1054831 Title: qemu-user-static for sparc32plus : bash: fork: Invalid argument Status in QEMU: New Bug description: On Debian x86-64 host system I setup a sparc chroot using: host $ mkdir sparc host $ sudo debootstrap --arch=sparc --foreign wheezy sparc http://ftp.au.debian.org/debian host $ sudo cp ~/Git/qemu/sparc32plus-linux-user/qemu-sparc32plus sparc/usr/bin/qemu-sparc32plus-static host $ LANG=C sudo chroot sparc/ /usr/bin/qemu-sparc32plus-static /bin/bash When I then run the second stage of debootstrap I get: target $ /debootstrap/debootstrap --second-stage bash: fork: Invalid argument The above procedures works perfectly for armhf. This is with current git HEAD (commit 93b6599734f81328ee3d608f57667742cafeea72). To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1054831/+subscriptions
This bug should be fixed by a combination of:
* the enable-NPTL-everywhere patchset: http://lists.nongnu.org/archive/html/qemu-devel/2013-07/msg02614.html
* a fix for pipe() on sparc: http://lists.nongnu.org/archive/html/qemu-devel/2013-07/msg01072.html
which I hope will make it into QEMU 1.6.
Signature · 30 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1054831 Title: qemu-user-static for sparc32plus : bash: fork: Invalid argument Status in QEMU: New Bug description: On Debian x86-64 host system I setup a sparc chroot using: host $ mkdir sparc host $ sudo debootstrap --arch=sparc --foreign wheezy sparc http://ftp.au.debian.org/debian host $ sudo cp ~/Git/qemu/sparc32plus-linux-user/qemu-sparc32plus sparc/usr/bin/qemu-sparc32plus-static host $ LANG=C sudo chroot sparc/ /usr/bin/qemu-sparc32plus-static /bin/bash When I then run the second stage of debootstrap I get: target $ /debootstrap/debootstrap --second-stage bash: fork: Invalid argument The above procedures works perfectly for armhf. This is with current git HEAD (commit 93b6599734f81328ee3d608f57667742cafeea72). To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1054831/+subscriptions
This was fixed years ago...
** Changed in: qemu
Status: New => Fix Released
Signature · 30 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1054831 Title: qemu-user-static for sparc32plus : bash: fork: Invalid argument Status in QEMU: Fix Released Bug description: On Debian x86-64 host system I setup a sparc chroot using: host $ mkdir sparc host $ sudo debootstrap --arch=sparc --foreign wheezy sparc http://ftp.au.debian.org/debian host $ sudo cp ~/Git/qemu/sparc32plus-linux-user/qemu-sparc32plus sparc/usr/bin/qemu-sparc32plus-static host $ LANG=C sudo chroot sparc/ /usr/bin/qemu-sparc32plus-static /bin/bash When I then run the second stage of debootstrap I get: target $ /debootstrap/debootstrap --second-stage bash: fork: Invalid argument The above procedures works perfectly for armhf. This is with current git HEAD (commit 93b6599734f81328ee3d608f57667742cafeea72). To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1054831/+subscriptions