qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]