View previous topic :: View next topic |
Author |
Message |
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8718 Location: ~Brussels - Belgique
|
Posted: Sat Sep 23, 2017 7:01 pm Post subject: user mode qemu-arm : unsupported syscalls |
|
|
Hi!
I'm using qemu-arm in user mode to chroot an armv6j image (Raspberry Pi).
When emerging (instal phase), I got the following messages :
Code: | qemu: Unsupported syscall: 383
scanelf: seccomp_load failed: Bad address |
or
Code: | qemu: Unsupported syscall: 391 |
Running locale-gen, I got:
Code: | # locale-gen
* Generating 8 locales (this might take a while) with 4 jobs
* (1/8) Generating en_US.ISO-8859-1 ...
localedef: ../sysdeps/unix/sysv/linux/spawni.c:366: __spawnix: Assertion `ec >= 0' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped [ !! ]
|
I have to run it on the Raspberry Pi to get is successful.
Is there a configuration problem on the host?
Can I fix something to not have those errors? _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
n05ph3r42 Tux's lil' helper
Joined: 11 Jul 2016 Posts: 134
|
Posted: Mon Oct 02, 2017 5:30 pm Post subject: |
|
|
HIYA.
Same situation, but actually it affects not only locale-gen. It affects bunch of other packages, producing same error while emerging (iproute for example):
Code: |
armv7a-hardfloat-linux-gnueabi-gcc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -pipe -fomit-frame-pointer -ftree-vectorize -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -pipe -fomit-frame-pointer -ftree-vectorize -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard -DHAVE_SETNS -DHAVE_LIBMNL -DCONFIG_GACT -DCONFIG_GACT_PROB -DIPT_LIB_DIR=\"/usr/lib/xtables\" -DYY_NO_INPUT -c -o m_ematch.o m_ematch.c
bison -d -t -v -o emp_ematch.yacc.c emp_ematch.y
bison: ../sysdeps/unix/sysv/linux/spawni.c:366: __spawnix: Assertion `ec >= 0' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
make[1]: *** [Makefile:178: emp_ematch.yacc.c] Aborted
make[1]: *** Waiting for unfinished jobs....
/usr/share/bison/c-skel.m4:20: error: invalid glr value: b4_glr_flag
/usr/share/bison/c-skel.m4:20: the top level
make[1]: Leaving directory '/tmp/portage/sys-apps/iproute2-4.13.0/work/iproute2-4.13.0/tc'
make: *** [Makefile:57: all] Error 2
* ERROR: sys-apps/iproute2-4.13.0::gentoo failed (compile phase):
* emake failed
|
I think problem is not in qemu (or it present in earlier versions of qemu too, but arises with newer system libs), because error appeared after upgrading glibc version fom sys-libs/glibc-2.23-r4 to 2.25-r5, and binutils sys-devel/binutils-2.28.1 to 2.29.1, when qemu was still 2.9.x (i forgot to update qemu binpkg at chroot first). |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31269 Location: here
|
Posted: Mon Oct 02, 2017 6:30 pm Post subject: |
|
|
Here a open bug in qemu bug tracker _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8718 Location: ~Brussels - Belgique
|
Posted: Mon Oct 02, 2017 6:33 pm Post subject: |
|
|
Hi,
I run full ~arch systems, and qemu-user-arm is always synced before I chroot.
So, I have Code: | Portage 2.3.10 (python 2.7.14-final-0, default/linux/amd64/17.0/no-multilib, gcc-7.2.0, glibc-2.25-r5, 4.13.4-gentoo x86_64)
Portage 2.3.10 (python 3.4.6-final-0, default/linux/arm/13.0/armv6j, gcc-7.2.0, glibc-2.25-r5, 4.13.3+ armv6l)
|
_________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8718 Location: ~Brussels - Belgique
|
Posted: Mon Oct 02, 2017 6:38 pm Post subject: |
|
|
fedeliallalinea wrote: | Here a open bug in qemu bug tracker |
Done, thanks! _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8718 Location: ~Brussels - Belgique
|
Posted: Mon Oct 02, 2017 6:46 pm Post subject: |
|
|
Following this; syscall 383 is seccomp, and 391 is copy_file_range which are, I think, active on the host system. _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
n05ph3r42 Tux's lil' helper
Joined: 11 Jul 2016 Posts: 134
|
Posted: Mon Oct 02, 2017 8:18 pm Post subject: |
|
|
xaviermiller wrote: | Following this; syscall 383 is seccomp, and 391 is copy_file_range which are, I think, active on the host system. |
Yup. Those are constantly present when cross-compiling whith qemu, - listed syscalls just cannot be emulated, i think. |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8718 Location: ~Brussels - Belgique
|
Posted: Thu Oct 05, 2017 8:25 pm Post subject: |
|
|
And one other unsupported syscall: 1000
Code: | >>> Running pre-merge checks for sys-libs/glibc-2.25-r6
make -j5 -l3 -s glibc-test
make -j5 -l3 -s glibc-test
qemu: Unsupported syscall: 1000 |
But I cannot find it in the table I've found _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8718 Location: ~Brussels - Belgique
|
Posted: Fri Oct 06, 2017 6:01 am Post subject: |
|
|
and today, I cannot emerge glibc using qemu: Code: | qemu: Unsupported syscall: 26
* /var/tmp/portage/sys-apps/sandbox-2.12/work/sandbox-2.12/libsandbox/trace.c:_do_ptrace():75: failure (Function not implemented):
* ISE:_do_ptrace: ptrace(PTRACE_TRACEME, ..., 0x00000000, 0x00000000): Function not implemented
/proc/5968/cmdline: /usr/bin/make -r PARALLELMFLAGS= -C /var/tmp/portage/sys-libs/glibc-2.25-r6/work/glibc-2.25 objdir=/var/tmp/portage/sys-libs/glibc-2.25-r6/work/build-arm-armv6j-hardfloat-linux-gnueabi-nptl install
qemu: uncaught target signal 6 (Aborted) - core dumped
make[1]: *** [Makefile:106: install-symbolic-link] Error 134
make[1]: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.25-r6/work/glibc-2.25'
make: *** [Makefile:12: install] Error 2
* ERROR: sys-libs/glibc-2.25-r6::gentoo failed (install phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-libs/glibc-2.25-r6::gentoo'`,
* the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.25-r6::gentoo'`.
* The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.25-r6/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.25-r6/temp/environment'.
* Working directory: '/var/tmp/portage/sys-libs/glibc-2.25-r6/work/build-arm-armv6j-hardfloat-linux-gnueabi-nptl'
* S: '/var/tmp/portage/sys-libs/glibc-2.25-r6/work/glibc-2.25'
>>> Failed to emerge sys-libs/glibc-2.25-r6, Log file: |
Is it due to the new sandbox? _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
n05ph3r42 Tux's lil' helper
Joined: 11 Jul 2016 Posts: 134
|
Posted: Sun Oct 08, 2017 6:50 pm Post subject: |
|
|
I suggest to emerge glibc 2.26 version via true cross-compiling (w/o chrooting + qemu). It seems that version 2.25 is too buggy. It works for me, at least many packages emerged fine with version 2.26, which failed with 2.25.
Sandbox 2.12 is emerged, btw. |
|
Back to top |
|
|
n05ph3r42 Tux's lil' helper
Joined: 11 Jul 2016 Posts: 134
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Fri Nov 10, 2017 9:40 am Post subject: |
|
|
Moved from Portage & Programming to Gentoo on ARM. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
n05ph3r42 Tux's lil' helper
Joined: 11 Jul 2016 Posts: 134
|
Posted: Sat Nov 11, 2017 7:58 am Post subject: Assertion `ec >= 0' failed |
|
|
SUMMARY:
Linux-user clone() can't handle glibc posix_spawn() causing Code: | ../sysdeps/unix/sysv/linux/spawni.c:366: __spawnix: Assertion `ec >= 0' failed |
due to QEMU strict flag check. |
|
Back to top |
|
|
n05ph3r42 Tux's lil' helper
Joined: 11 Jul 2016 Posts: 134
|
|
Back to top |
|
|
n05ph3r42 Tux's lil' helper
Joined: 11 Jul 2016 Posts: 134
|
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8718 Location: ~Brussels - Belgique
|
Posted: Tue Jun 12, 2018 12:19 pm Post subject: |
|
|
xaviermiller wrote: | and today, I cannot emerge glibc using qemu: Code: | qemu: Unsupported syscall: 26
* /var/tmp/portage/sys-apps/sandbox-2.12/work/sandbox-2.12/libsandbox/trace.c:_do_ptrace():75: failure (Function not implemented):
* ISE:_do_ptrace: ptrace(PTRACE_TRACEME, ..., 0x00000000, 0x00000000): Function not implemented
/proc/5968/cmdline: /usr/bin/make -r PARALLELMFLAGS= -C /var/tmp/portage/sys-libs/glibc-2.25-r6/work/glibc-2.25 objdir=/var/tmp/portage/sys-libs/glibc-2.25-r6/work/build-arm-armv6j-hardfloat-linux-gnueabi-nptl install
qemu: uncaught target signal 6 (Aborted) - core dumped
make[1]: *** [Makefile:106: install-symbolic-link] Error 134
make[1]: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.25-r6/work/glibc-2.25'
make: *** [Makefile:12: install] Error 2
* ERROR: sys-libs/glibc-2.25-r6::gentoo failed (install phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-libs/glibc-2.25-r6::gentoo'`,
* the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.25-r6::gentoo'`.
* The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.25-r6/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.25-r6/temp/environment'.
* Working directory: '/var/tmp/portage/sys-libs/glibc-2.25-r6/work/build-arm-armv6j-hardfloat-linux-gnueabi-nptl'
* S: '/var/tmp/portage/sys-libs/glibc-2.25-r6/work/glibc-2.25'
>>> Failed to emerge sys-libs/glibc-2.25-r6, Log file: |
Is it due to the new sandbox? |
Hi,
Same problem again... tested with glibc 2.26, 2.27 and qemu 2.11, 2.12 _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
n05ph3r42 Tux's lil' helper
Joined: 11 Jul 2016 Posts: 134
|
Posted: Tue Jun 12, 2018 11:08 pm Post subject: |
|
|
IDK, but last glibc update caused issue with sandbox in tor in ~amd64. Only disabling sandbox in torrc allowed daemon to work.
Did you tried w/o sandbox? |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8718 Location: ~Brussels - Belgique
|
Posted: Fri Jun 15, 2018 9:08 pm Post subject: |
|
|
No, disabling sandbox doesn't help _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
steils n00b
Joined: 20 Sep 2018 Posts: 4
|
Posted: Sat Mar 23, 2019 10:46 am Post subject: |
|
|
xaviermiller wrote: | No, disabling sandbox doesn't help |
I had the same issue with compiling gobject-introspection ("ISE:_do_ptrace: ptrace(PTRACE_TRACEME, ..., 0x00000000, 0x00000000): Function not implemented") with qemu-arm (this manual: https://wiki.gentoo.org/wiki/Cross_build_environment).
Disabling sandbox did not help. However temporarily removing sandbox with `emerge -C sandbox` did help. |
|
Back to top |
|
|
nkichukov n00b
Joined: 16 Oct 2012 Posts: 15 Location: Amstelveen, Netherlands
|
Posted: Mon Apr 06, 2020 10:02 am Post subject: |
|
|
steils wrote: | xaviermiller wrote: | No, disabling sandbox doesn't help |
I had the same issue with compiling gobject-introspection ("ISE:_do_ptrace: ptrace(PTRACE_TRACEME, ..., 0x00000000, 0x00000000): Function not implemented") with qemu-arm (this manual: https://wiki.gentoo.org/wiki/Cross_build_environment).
Disabling sandbox did not help. However temporarily removing sandbox with `emerge -C sandbox` did help. |
Thanks, this helped me with various packages that were failing! |
|
Back to top |
|
|
|