[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] char: do not use atexit cleanup handler
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH] char: do not use atexit cleanup handler |
Date: |
Mon, 4 Jul 2016 18:07:15 +0100 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Mon, Jul 04, 2016 at 06:46:47PM +0200, Paolo Bonzini wrote:
>
>
> On 04/07/2016 18:31, Daniel P. Berrange wrote:
> >> > Instead of using a atexit() handler, only run the chardev cleanup as
> >> > initially proposed at the end of main(), where there are less chances
> >> > (hic) of conflicts or other races.
> > This doesn't really seem all that much safer. There's still plenty of
> > chance that threads are running in the background at the end of the
> > main() method, so plenty of scope for the qemu_chr_cleanup() call to
> > cause threads to segv by destroying the chardevs they're using behind
> > their back.
>
> At this point you have stopped all CPUs and block devices. There is not
> much else that is going on in QEMU at all, at this point. The solution
> would be to stop those threads.
What about graphics threads ? In particular I'd be thinking of spice
which uses threads and chardevs.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|