qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Signal handling and qcow2 image corruption
@ 2008-03-05 21:18 David Barrett
  2008-03-05 21:55 ` Anthony Liguori
  0 siblings, 1 reply; 26+ messages in thread
From: David Barrett @ 2008-03-05 21:18 UTC (permalink / raw)
  To: qemu-devel

I'm tracking down a image corruption issue and I'm curious if you can 
answer the following:

1) Is there any difference between sending a "TERM" signal to the QEMU 
process and typing "quit" at the monitor?

2) Will sending TERM corrupt the 'gcow2' image (in ways other than 
normal guest OS dirty shutdown)?

3) Assuming I always start QEMU using "-loadvm", is there any risk in 
using 'kill' to send SIGTERM to the QMEU process when done?


I notice the entire implementation of "do_quit()" is simply:

	static void do_quit(void)
	{
		exit(0);
	}

So I don't see any special shutdown sequence being invoked, and I can't 
find any atexit() handler that's used in the general case.  Thus it 
would seem to me that just killing the process should be the same as 
calling "quit" via the monitor.

(I also can't find a signal handler for SIGTERM, but I might have missed 
it.)

Furthermore, if I understand "-loadvm" correctly, then any change made 
by the guest OS (including any corruption of the image caused by a dirty 
shutdown) should be blown away on the next restart.

Thus it seems that I should be able to safely start QEMU with -loadvm, 
do my thing inside the guest OS, and then just "kill" the host process, 
again and again and again, without any risk of accumulated corruption.

Is this correct, or am I misunderstanding this?

I ask because I seem to be getting accumulated corruption in my guest 
OS, but it's not totally reproducible.  Just trying to make sure QEMU 
works as it does to narrow down the debugging options.

Thanks!

-david

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2008-07-22 21:25 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-05 21:18 [Qemu-devel] Signal handling and qcow2 image corruption David Barrett
2008-03-05 21:55 ` Anthony Liguori
2008-03-05 23:48   ` David Barrett
2008-03-06  6:57   ` Avi Kivity
2008-07-21 18:10   ` [Qemu-devel] qcow2 - safe on kill? safe on power fail? Jamie Lokier
2008-07-21 19:43     ` Anthony Liguori
2008-07-21 21:26       ` Jamie Lokier
2008-07-21 22:14         ` Anthony Liguori
2008-07-21 23:47           ` Jamie Lokier
2008-07-22  6:06           ` Avi Kivity
2008-07-22 14:08             ` Anthony Liguori
2008-07-22 14:46               ` Jamie Lokier
2008-07-22 19:11               ` Avi Kivity
2008-07-22 14:32             ` Jamie Lokier
2008-07-21 22:00       ` Andreas Schwab
2008-07-21 22:15         ` Anthony Liguori
2008-07-21 22:22           ` David Barrett
2008-07-21 22:50             ` Anthony Liguori
2008-07-22  6:07           ` Avi Kivity
2008-07-22 14:11             ` Anthony Liguori
2008-07-22 14:36               ` Avi Kivity
2008-07-22 16:16                 ` Jamie Lokier
2008-07-22 19:13                   ` Avi Kivity
2008-07-22 20:04                     ` Jamie Lokier
2008-07-22 21:25                       ` Avi Kivity
2008-07-22 14:22             ` Jamie Lokier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).