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
|
qemu segfaults when writing to very large qcow2 disk
Create a ridiculously large qcow2 disk:
qemu-img create -f qcow2 test1.img $((2**63-513))
Attach it to a guest and try to use parted to partition it. This is easy with virt-rescue: you just do:
virt-rescue test1.img
><rescue> parted /dev/vda mklabel gpt
<-- bang! qemu segfaults here
The stack trace is:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000434cac in get_cluster_table (bs=0x3193030, offset=
9223372036854764544, new_l2_table=0x591e3c8, new_l2_offset=0x591e3c0,
new_l2_index=0x591e408) at block/qcow2-cluster.c:506
506 l2_offset = s->l1_table[l1_index];
(gdb) bt
#0 0x0000000000434cac in get_cluster_table (bs=0x3193030, offset=
9223372036854764544, new_l2_table=0x591e3c8, new_l2_offset=0x591e3c0,
new_l2_index=0x591e408) at block/qcow2-cluster.c:506
#1 0x000000000043535b in qcow2_alloc_cluster_offset (bs=0x3193030, offset=
9223372036854764544, n_start=106, n_end=126, num=0x591e4e8, m=0x591e470)
at block/qcow2-cluster.c:719
#2 0x000000000043b8d4 in qcow2_co_writev (bs=0x3193030, sector_num=
18014398509481962, remaining_sectors=20, qiov=0x4a81ee0)
at block/qcow2.c:554
#3 0x0000000000428691 in bdrv_co_rw (opaque=0x38bad10) at block.c:2781
#4 0x000000000046e03a in coroutine_trampoline (i0=59487248, i1=0)
at coroutine-ucontext.c:125
#5 0x00000034dc6471b0 in ?? () from /lib64/libc.so.6
#6 0x00007fff76cbb430 in ?? ()
#7 0x0000000000000000 in ?? ()
This is qemu from git (8f440cda08c6df574 from 2011-09-29)
|