-----------------------------------------
# qemu-aarch64 --version
qemu-aarch64 version 5.2.0
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
-----------------------------------------
Symptoms when running inside the aarch64 chroot, with both aarch64 and x86_64 binaries:
-----------------------------------------
# which unshare bash
/usr/bin/unshare
/bin/bash
# file $(!!)
file $(which unshare bash)
/usr/bin/unshare: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, stripped
/bin/bash: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, stripped
# unshare --pid -- bash -c 'echo hello world'
qemu: qemu_thread_create: Invalid argument
Aborted (core dumped)
# # --- switch to an x86_64 shell _inside_ the chroot
# LD_LIBRARY_PATH=/x86_64/lib64 PATH=/x86_64/bin:$PATH bash
# which unshare bash
/x86_64/bin/unshare
/x86_64/bin/bash
# file $(!!)
file $(which unshare bash)
/x86_64/bin/unshare: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, stripped
/x86_64/bin/bash: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, stripped
# unshare --pid -- bash -c 'echo hello world'
hello world
#
-----------------------------------------
I can share the core dump, in case that's useful.
On this system, the qemu-aarch64 binary on the host is statically built
and binfmt_misc is configured as follows:
-----------------------------------------
:aarch64:M::\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7:\xff\xff\xff\xff\xff\xff\xff\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-aarch64:CF
-----------------------------------------
The same issue persists in qemu-5.2.0.
------- ------- ------- ------- ------- ------ ------- ------- ------- ------- ------
# qemu-aarch64 --version
qemu-aarch64 version 5.2.0
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
-------
Symptoms when running inside the aarch64 chroot, with both aarch64 and x86_64 binaries: ------- ------- ------- ------- ------ linux-aarch64. so.1, for GNU/Linux 3.7.0, stripped linux-aarch64. so.1, for GNU/Linux 3.7.0, stripped PATH=/x86_ 64/lib64 PATH=/x86_ 64/bin: $PATH bash bin/unshare: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ ld-linux- x86-64. so.2, for GNU/Linux 3.2.0, stripped ld-linux- x86-64. so.2, for GNU/Linux 3.2.0, stripped ------- ------- ------- ------- ------
-------
# which unshare bash
/usr/bin/unshare
/bin/bash
# file $(!!)
file $(which unshare bash)
/usr/bin/unshare: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-
/bin/bash: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-
# unshare --pid -- bash -c 'echo hello world'
qemu: qemu_thread_create: Invalid argument
Aborted (core dumped)
# # --- switch to an x86_64 shell _inside_ the chroot
# LD_LIBRARY_
# which unshare bash
/x86_64/bin/unshare
/x86_64/bin/bash
# file $(!!)
file $(which unshare bash)
/x86_64/
/x86_64/bin/bash: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/
# unshare --pid -- bash -c 'echo hello world'
hello world
#
-------
I can share the core dump, in case that's useful.
On this system, the qemu-aarch64 binary on the host is statically built ------- ------- ------- ------- ------ M::\x7f\ x45\x4c\ x46\x02\ x01\x01\ x00\x00\ x00\x00\ x00\x00\ x00\x00\ x00\x02\ x00\xb7: \xff\xff\ xff\xff\ xff\xff\ xff\xfc\ xff\xff\ xff\xff\ xff\xff\ xff\xff\ xfe\xff\ xff:/usr/ bin/qemu- aarch64: CF ------- ------- ------- ------- ------
and binfmt_misc is configured as follows:
-------
:aarch64:
-------