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 :|