1
0
mirror of https://gitlab.com/qemu-project/qemu synced 2024-07-08 20:17:27 +00:00
qemu/hw
Denis V. Lunev 9588c5897b block: add missed aio_context_acquire into release_drive
Recently we expirience hang with iothreads enabled with the following
call trace:
Thread 1 (Thread 0x7fa95efebc80 (LWP 177117)):
0  ppoll () from /lib64/libc.so.6
2  qemu_poll_ns () at qemu-timer.c:313
3  aio_poll () at aio-posix.c:457
4  bdrv_flush () at block/io.c:2641
5  bdrv_close () at block.c:2143
6  bdrv_delete () at block.c:2352
7  bdrv_unref () at block.c:3429
8  blk_remove_bs () at block/block-backend.c:427
9  blk_delete () at block/block-backend.c:178
10 blk_unref () at block/block-backend.c:226
11 object_property_del_all () at qom/object.c:399
12 object_finalize () at qom/object.c:461
13 object_unref () at qom/object.c:898
14 object_property_del_child () at qom/object.c:422
15 qmp_marshal_device_del () at qmp-marshal.c:1145
16 handle_qmp_command () at /usr/src/debug/qemu-2.6.0/monitor.c:3929

Technically bdrv_flush() stucks in
    while (rwco.ret == NOT_DONE) {
        aio_poll(aio_context, true);
    }
but rwco.ret is equal to 0 thus we have missed wakeup. Code investigation
reveals that we do not have performed aio_context_acquire() on this call
stack.

This patch adds missed lock.

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
CC: Eric Blake <eblake@redhat.com>
CC: Markus Armbruster <armbru@redhat.com>
Message-id: 1490717566-25516-1-git-send-email-den@openvz.org
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
2017-04-03 17:11:39 +02:00
..
9pfs 9pfs: fix file descriptor leak 2017-03-27 21:13:19 +02:00
acpi hw/acpi/vmgenid: prevent more than one vmgenid device 2017-03-22 18:29:27 +02:00
adc STM32F2xx: Add the ADC device 2016-10-04 13:28:07 +01:00
alpha hw: Default -drive to if=ide explicitly where it works 2017-02-21 13:10:53 +01:00
arm bcm2835: add sdhost and gpio controllers 2017-02-28 17:10:00 +00:00
audio es1370: wire up reset via DeviceClass 2017-01-11 09:19:03 +01:00
block xen: do not build backends for targets that do not support xen 2017-03-19 11:12:12 +01:00
bt chardev: qom-ify 2017-01-27 18:08:00 +01:00
char xen: do not build backends for targets that do not support xen 2017-03-19 11:12:12 +01:00
core block: add missed aio_context_acquire into release_drive 2017-04-03 17:11:39 +02:00
cpu Introduce DEVICE_CATEGORY_CPU for CPU devices 2017-01-27 18:07:31 +01:00
cris cris: Fix broken header guard in hw/cris/boot.h 2016-07-12 16:20:46 +02:00
display cirrus: fix PUTPIXEL macro 2017-03-27 12:14:45 +02:00
dma dma/rc4030: fix a mixed declarations and code warning 2017-03-20 11:20:35 +00:00
gpio bcm2835_gpio: add bcm2835 gpio controller 2017-02-28 17:10:00 +00:00
i2c arm: Uniquely name imx25 I2C buses. 2017-01-20 11:15:06 +00:00
i386 trace: Avoid abuse of amdvi_mmio_read 2017-03-24 09:21:42 +00:00
ide ide: ahci: call cleanup function in ahci unit 2017-03-15 20:50:14 -04:00
input virtio-input: fix eventq batching 2017-03-27 12:14:45 +02:00
intc hw/intc/arm_gicv3_kvm: Check KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS in reset 2017-03-31 12:41:14 +01:00
ipack ipack: Update e-mail address 2016-05-18 15:04:27 +03:00
ipmi migration: consolidate VMStateField.start 2017-02-13 17:27:13 +00:00
isa Allow ISA bus to be configured out 2017-02-06 12:33:21 +11:00
lm32 char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
m68k hw/m68k: QOMify the ColdFire interrupt controller 2017-02-18 22:23:31 +01:00
mem pc: memhp: enable nvdimm device hotplug 2016-11-01 19:21:09 +02:00
microblaze clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
mips hw/mips: MIPS Boston board support 2017-02-24 10:37:21 +00:00
misc hw/misc/imx6_src: Don't crash trying to reset missing CPUs 2017-03-14 16:13:22 +00:00
moxie hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
net e1000: disable debug by default 2017-03-31 08:48:13 +08:00
nios2 nios2: iic: Convert CPU prop to qom link 2017-03-18 18:22:54 +00:00
nvram hw/block: Request permissions 2017-02-28 20:40:36 +01:00
openrisc target/openrisc: Rename the cpu from or32 to or1k 2017-02-14 08:14:58 +11:00
pci pci: Add missing drop of bus master AS reference 2017-03-29 02:35:23 +03:00
pci-bridge ppc patch queue 2017-02-02 2017-02-02 18:48:06 +00:00
pci-host ppc patch queue for 2017-02-22 2017-02-24 10:13:57 +00:00
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc pseries: Enforce homogeneous threads-per-core 2017-04-03 13:46:18 +10:00
s390x s390x/css: reassign subchannel if schid is changed after migration 2017-03-20 09:22:57 +01:00
scsi * MTTCG fix for win32 2017-03-27 17:34:50 +01:00
sd Block layer patches 2017-03-01 23:09:46 +00:00
sh4 hw: Default -drive to if=ide explicitly where it works 2017-02-21 13:10:53 +01:00
smbios stubs: move smbios stubs to hw/smbios 2017-01-16 17:52:35 +01:00
sparc sparc/sparc64: grab BQL before calling cpu_check_irqs 2017-03-09 10:41:38 +00:00
sparc64 sparc/sparc64: grab BQL before calling cpu_check_irqs 2017-03-09 10:41:38 +00:00
ssi aspeed/smc: use a modulo to check segment limits 2017-02-10 17:40:30 +00:00
timer armv7m: Split systick out from NVIC 2017-02-28 16:18:49 +00:00
tpm clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
tricore tricore: remove useless cast 2016-09-15 15:32:22 +03:00
unicore32 clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
usb usb-host: switch to LIBUSB_API_VERSION 2017-04-03 14:41:23 +01:00
vfio Revert "vfio/pci-quirks.c: Disable stolen memory for igd VFIO" 2017-03-31 10:04:41 -06:00
virtio vhost: generalize iommu memory region 2017-03-30 19:09:16 +03:00
watchdog wdt: Add Aspeed watchdog device model 2017-02-07 18:29:59 +00:00
xen xen: do not build backends for targets that do not support xen 2017-03-19 11:12:12 +01:00
xenpv xenpv: Fix qemu_uuid compiling error 2016-09-29 11:43:17 +08:00
xtensa target/xtensa: xtfpga: load DTB only when FDT support is enabled 2017-03-11 14:59:03 -08:00
Makefile.objs acpi: filter based on CONFIG_ACPI_X86 rather than TARGET 2017-01-16 17:52:35 +01:00