[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Bug 1319100] [NEW] qemu-arm-static bug in signal handl
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [Bug 1319100] [NEW] qemu-arm-static bug in signal handling avoids using mono |
Date: |
Tue, 13 May 2014 17:31:07 +0100 |
On 13 May 2014 16:56, manut <address@hidden> wrote:
> running mono in a chroot environment with qemu-user-static is not posible
> because at least one signal used during termination of mono is routed to the
> host.
>
> This can be reproduced by:
> debootstrap --include=mono-runtime --foreign --arch=armel "wheezy"
> "mono-test" "http://ftp.de.debian.org//debian"
> cp /usr/bin/qemu-arm-static mono-test/usr/bin
> mount -t proc none mono-test/proc
> mount -o bind /dev mono-test/dev
> mount -o bind /sys mono-test/sys
> chroot mono-test
> ../debootstrap/debootstrap --second-stage
> exit
> mount -t proc none mono-test/proc
> mount -o bind /sys mono-test/sys
> chroot mono-test
> QEMU_STRACE=1 /usr/bin/mono /usr/lib/mono/4.0/gacutil.exe
>
> This will block on a futex:
>
> --8<--
> 18663 sched_yield(0,0,2582980,0,0,2582928) = 0
> 18663 clock_gettime(1,-150996384,2,1,2585016,2585600) = 0
> 18663 tgkill(18663,18664,30,18664,30,-161951744) = 0
> 18663 futex(0x00293774,FUTEX_PRIVATE_FLAG|FUTEX_WAIT,0,NULL,NULL,0)
> --8<--
>
> If you use mono within strace on a native x86 box you can see, that signals
> between threads are used during termination:
Multithreaded guest process are unreliable under qemu
linux-user mode anyway, even ignoring the signal handling
related races here.
See also:
https://bugs.launchpad.net/qemu/+bug/955379
> There is an openSuSE patch against qemu:
> https://build.opensuse.org/package/view_file/Virtualization:Qemu/qemu/0002-XXX-work-around-SA_RESTART-race-wit.patch?expand=1
This patch is a very hacky bandaid papering over the
real problem. It is not suitable for upstream (and
personally I wouldn't ship it in a distro either :-)).
thanks
-- PMM
- [Qemu-devel] [PATCH v2 00/23] target-arm: add Security Extensions for CPUs, Fabian Aggeler, 2014/05/13
- [Qemu-devel] [PATCH v2 01/23] target-arm: add new CPU feature for Security Extensions, Fabian Aggeler, 2014/05/13
- [Qemu-devel] [PATCH v2 02/23] target-arm: move SCR into Security Extensions register list, Fabian Aggeler, 2014/05/13
- [Qemu-devel] [PATCH v2 09/23] target-arm: add non-secure Translation Block flag, Fabian Aggeler, 2014/05/13
- [Qemu-devel] [PATCH v2 10/23] target-arm: implement CPACR register logic, Fabian Aggeler, 2014/05/13
- [Qemu-devel] [PATCH v2 03/23] target-arm: adjust TTBCR for Security Extension feature, Fabian Aggeler, 2014/05/13
- [Qemu-devel] [PATCH v2 12/23] target-arm: add SDER definition, Fabian Aggeler, 2014/05/13
- [Qemu-devel] [PATCH v2 07/23] target-arm: reject switching to monitor mode from non-secure state, Fabian Aggeler, 2014/05/13
- [Qemu-devel] [PATCH v2 08/23] target-arm: adjust arm_current_pl() for Security Extensions, Fabian Aggeler, 2014/05/13
- [Qemu-devel] [PATCH v2 05/23] target-arm: add CPU Monitor mode, Fabian Aggeler, 2014/05/13
- [Qemu-devel] [PATCH v2 04/23] target-arm: preserve RAO/WI bits of ARMv7 SCTLR, Fabian Aggeler, 2014/05/13