id = 2980 title = "QEMU Crashes During Snapshot: bdrv_co_write_req_prepare Assertion child->perm & BLK_PERM_WRITE Failed" state = "opened" created_at = "2025-05-23T10:39:40.348Z" closed_at = "n/a" labels = [] url = "https://gitlab.com/qemu-project/qemu/-/issues/2980" host-os = "Linux" host-arch = "x86" qemu-version = "QEMU emulator version 7.0.0" guest-os = "Windows 10" guest-arch = "x86" description = """After taking a external snapshot (w/ memory state) with libvirt, the QEMU process crashed with an assertion ``` qemu-system-x86_64: ../block/io.c:2052: bdrv_co_write_req_prepare: Assertion `child->perm & BLK_PERM_WRITE` failed. ```""" reproduce = """1. Start the qemu process 2. Take an external (w/ memory) snapshot by libvirt Python API ```python domain.snapshotCreateXML(, libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC | libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT | libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_LIVE) ``` 3. The qemu process crashed by hitting the assertion""" additional = """Libvirt domain XML ```xml 1a3dabc5-c33b-4308-acc5-2245f3b64163 1a3dabc5-c33b-4308-acc5-2245f3b64163 16777216 16777216 5 qemu qemu hvm destroy restart restart /QVS/usr/bin/qemu-system-x86_64 1a3dabc5c33b4308ac01