blob: b778b133fa08a4a00d2e7d5e81504cf7e9d1ff27 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
graphic: 0.992
performance: 0.887
files: 0.853
device: 0.828
PID: 0.721
semantic: 0.700
socket: 0.689
vnc: 0.676
debug: 0.645
other: 0.616
network: 0.578
permissions: 0.525
KVM: 0.521
boot: 0.407
qemu crash for suspend and resume vm while backup disk of vm
Description of problem:

Steps to reproduce:
1. virsh create vm2.xml
2. virsh backup-begin domid
3. virsh suspend domid
4. sleep 1 && virsh resume domid
qemu crash
Additional information:
static int blk_do_set_aio_context(BlockBackend *blk, AioContext *new_context,
bool update_root_node, Error **errp)
{
BlockDriverState *bs = blk_bs(blk);
ThrottleGroupMember *tgm = &blk->public.throttle_group_member;
int ret;
if (bs) {
bdrv_ref(bs);
if (update_root_node) {
ret = bdrv_child_try_set_aio_context(bs, new_context, blk->root,
errp);
if (ret < 0) {
bdrv_unref(bs);
return ret;
}
}
if (tgm->throttle_state) {
_ ****bdrv_drained_begin(bs);----- bs->aio_context->lock lock count is 0,so unlock failed**_
throttle_group_detach_aio_context(tgm);
throttle_group_attach_aio_context(tgm, new_context);
bdrv_drained_end(bs);
}
bdrv_unref(bs);
}
blk->ctx = new_context;
return 0;
}
|