[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/17] vl.c/exit: pause cpus before closing block dev
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 01/17] vl.c/exit: pause cpus before closing block devices |
Date: |
Tue, 1 Aug 2017 18:17:09 +0200 |
From: "Dr. David Alan Gilbert" <address@hidden>
There's a rare exit seg if the guest is accessing
IO during exit.
It's always hitting the atomic_inc(&bs->in_flight) with a NULL
bs. This was added recently in 99723548 but I don't see it
as the cause.
Flip vl.c around so we pause the cpus before closing the block devices,
that way we shouldn't have anything trying to access them when
they're gone.
This was originally Red Hat bz
https://bugzilla.redhat.com/show_bug.cgi?id=1451015
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reported-by: Cong Li <address@hidden>
--
This is a very rare race, I'll leave it running in a loop to see if
we hit anything else and to check this really fixes it.
I do worry if there are other cases that can trigger this - e.g.
hot-unplug or ejecting a CD.
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
vl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vl.c b/vl.c
index fb6b2ef..dd803fc 100644
--- a/vl.c
+++ b/vl.c
@@ -4787,8 +4787,8 @@ int main(int argc, char **argv, char **envp)
replay_disable_events();
iothread_stop_all();
- bdrv_close_all();
pause_all_vcpus();
+ bdrv_close_all();
res_free();
/* vhost-user must be cleaned up before chardevs. */
--
1.8.3.1
- [Qemu-devel] [PULL 00/17] Misc changes for QEMU 2.10-rc1 (?), Paolo Bonzini, 2017/08/01
- [Qemu-devel] [PULL 01/17] vl.c/exit: pause cpus before closing block devices,
Paolo Bonzini <=
- [Qemu-devel] [PULL 05/17] char: don't exit on hmp 'chardev-add help', Paolo Bonzini, 2017/08/01
- [Qemu-devel] [PULL 04/17] char-fd: remove useless chr pointer, Paolo Bonzini, 2017/08/01
- [Qemu-devel] [PULL 03/17] accel: cleanup error output, Paolo Bonzini, 2017/08/01
- [Qemu-devel] [PULL 06/17] docs: document deprecation policy & deprecated features in appendix, Paolo Bonzini, 2017/08/01
- [Qemu-devel] [PULL 08/17] exec: Add lock parameter to qemu_ram_ptr_length, Paolo Bonzini, 2017/08/01
- [Qemu-devel] [PULL 09/17] bt: stop the sdp memory allocation craziness, Paolo Bonzini, 2017/08/01
- [Qemu-devel] [PULL 10/17] qemu-options: document existance of versioned machine types, Paolo Bonzini, 2017/08/01
- [Qemu-devel] [PULL 11/17] migration: optimize the downtime, Paolo Bonzini, 2017/08/01
- [Qemu-devel] [PULL 12/17] hw/scsi/vmw_pvscsi: Remove the dead error handling, Paolo Bonzini, 2017/08/01
- [Qemu-devel] [PULL 13/17] hw/scsi/vmw_pvscsi: Convert to realize, Paolo Bonzini, 2017/08/01