From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 3AD141FF138 for ; Mon, 29 Jun 2026 15:55:24 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 005C72147A; Mon, 29 Jun 2026 15:55:17 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Subject: [PATCH-SERIES qemu/qemu-server v2 0/5] fix #6424: avoid timeout issue for QMP 'quit' for bulk suspend Date: Mon, 29 Jun 2026 15:54:16 +0200 Message-ID: <20260629135438.172004-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1782741270137 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.009 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: QOOPZUIWABNF4WPHSSTRCBFEZDS66RVB X-Message-ID-Hash: QOOPZUIWABNF4WPHSSTRCBFEZDS66RVB X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Changes in v2: * rebase on current master * use qemu-stable v11.0.2 I was able to reproduce the issue for a VM without IO thread busy with IO on a heavily rate-limited storage. The fix has two independent parts: 1) increase the QMP timeout: The 'quit' QMP command itself is fast, since it only records the shutdown request and notifies the main loop, but getting the response can take a while. The reason is that qmp_dispatch() yields and must be woken after executing the command and at that stage, QEMU is already busy with teardown too. 2) skip VM start after successfully saving state: When creating a snapshot of the VM state for hibernation, the VM must not be started again if the snapshot operation was completed successfully. The VM should remain stopped, so that the QMP 'quit' is issued without further activity from the VM. The latter addresses a more fundamental issue, but it still makes sense to bump the timeout for 'quit' regardless, because the explanation in 1) still applies. I also added the rebase to QEMU 11.0.1 as part of this series, since using the new parameter for 2) needs to be somehow version-guarded. There would be other ways like extending QMP 'query-proxmox-support', but since the opportunity with 11.0.1 is there, I felt like it is easier in this case. qemu: Fiona Ebner (2): async snapshot: allow skipping VM start after successful completion update submodule and patches to QEMU 11.0.2 ...d-support-for-sync-bitmap-mode-never.patch | 6 +- ...-support-for-conditional-and-always-.patch | 2 +- ...-to-bdrv_dirty_bitmap_merge_internal.patch | 2 +- .../0006-mirror-move-some-checks-to-qmp.patch | 2 +- ...oid-idle-event-loop-being-accounted.patch} | 0 ...ial-deadlock-when-draining-during-tr.patch | 100 -------------- ...-fix-regression-with-block-device-e.patch} | 15 +-- ...k-to-bounce-buffer-if-BLKZEROOUT-is-.patch | 36 ----- ...fix-decoding-of-MOVBE-and-CRC32-in-1.patch | 84 ------------ ...-accidentally-autofree-existing-virg.patch | 59 -------- ...store-IRQ-polling-for-non-kernel-irq.patch | 47 ------- ...strList-leak-in-x86_cpu_get_unavaila.patch | 36 ----- ...-missing-PF_INSTR-in-SIGSEGV-context.patch | 43 ------ ...e_save_state_v-fix-double-error_setg.patch | 46 ------- ...e-fix-regression-when-mmap-ing-expor.patch | 94 ------------- ...issing-VIRTIO_BLK_T_SCSI_CMD-size-ch.patch | 48 ------- ...-use-after-free-of-cancelled-request.patch | 82 ----------- ...ar-tag-byte-when-processing-messages.patch | 40 ------ ...very-bitmask-with-modified-xAPIC-ids.patch | 63 --------- ...aio-bound-ioq_submit-recursion-depth.patch | 127 ------------------ ...reject-zero-DMA-page-size-capability.patch | 46 ------- ...-zero-migration-page-size-capability.patch | 44 ------ ...estrict-dma_map_file-to-shared-RAM-o.patch | 88 ------------ ...async-for-background-state-snapshots.patch | 49 ++++--- ...add-optional-buffer-size-to-QEMUFile.patch | 6 +- ...add-the-zeroinit-block-driver-filter.patch | 4 +- ...le-posix-make-locking-optiono-on-cre.patch | 6 +- ...VE-Backup-add-vma-backup-format-code.patch | 6 +- ...ckup-Proxmox-backup-patches-for-QEMU.patch | 8 +- ...estore-new-command-to-restore-from-p.patch | 4 +- ...k-driver-to-map-backup-archives-into.patch | 8 +- ...ct-stderr-to-journal-when-daemonized.patch | 6 +- ...igrate-dirty-bitmap-state-via-savevm.patch | 4 +- .../0037-block-add-alloc-track-driver.patch | 4 +- .../0038-PVE-backup-add-fleecing-option.patch | 2 +- ...ment-backup-access-setup-and-teardow.patch | 2 +- ...se-migration-blocker-check-for-snaps.patch | 6 +- debian/patches/series | 21 +-- qemu | 2 +- 39 files changed, 83 insertions(+), 1165 deletions(-) rename debian/patches/extra/{0004-fdmon-io_uring-avoid-idle-event-loop-being-accounted.patch => 0002-fdmon-io_uring-avoid-idle-event-loop-being-accounted.patch} (100%) delete mode 100644 debian/patches/extra/0002-ide-avoid-potential-deadlock-when-draining-during-tr.patch rename debian/patches/extra/{0012-block-export-fuse-fix-regression-with-block-device-e.patch => 0003-block-export-fuse-fix-regression-with-block-device-e.patch} (71%) delete mode 100644 debian/patches/extra/0003-block-io-fallback-to-bounce-buffer-if-BLKZEROOUT-is-.patch delete mode 100644 debian/patches/extra/0005-target-i386-tcg-fix-decoding-of-MOVBE-and-CRC32-in-1.patch delete mode 100644 debian/patches/extra/0006-hw-display-don-t-accidentally-autofree-existing-virg.patch delete mode 100644 debian/patches/extra/0007-hw-i386-vapic-restore-IRQ-polling-for-non-kernel-irq.patch delete mode 100644 debian/patches/extra/0008-target-i386-fix-strList-leak-in-x86_cpu_get_unavaila.patch delete mode 100644 debian/patches/extra/0009-target-i386-fix-missing-PF_INSTR-in-SIGSEGV-context.patch delete mode 100644 debian/patches/extra/0010-migration-vmstate_save_state_v-fix-double-error_setg.patch delete mode 100644 debian/patches/extra/0011-block-export-fuse-fix-regression-when-mmap-ing-expor.patch delete mode 100644 debian/patches/extra/0013-virtio-blk-add-missing-VIRTIO_BLK_T_SCSI_CMD-size-ch.patch delete mode 100644 debian/patches/extra/0014-lsi53c895a-fix-use-after-free-of-cancelled-request.patch delete mode 100644 debian/patches/extra/0015-lsi53c895a-clear-tag-byte-when-processing-messages.patch delete mode 100644 debian/patches/extra/0016-apic-fix-delivery-bitmask-with-modified-xAPIC-ids.patch delete mode 100644 debian/patches/extra/0017-block-linux-aio-bound-ioq_submit-recursion-depth.patch delete mode 100644 debian/patches/extra/0018-vfio-user-reject-zero-DMA-page-size-capability.patch delete mode 100644 debian/patches/extra/0019-vfio-user-reject-zero-migration-page-size-capability.patch delete mode 100644 debian/patches/extra/0020-vfio-container-Restrict-dma_map_file-to-shared-RAM-o.patch qemu-server: Fiona Ebner (3): fix #6424: increase timeout for QMP 'quit' to 60s to avoid issue with bulk suspend run state: use v5.36 and signatures in module suspend: skip VM start after successfully saving state src/PVE/QMPClient.pm | 6 ++++++ src/PVE/QemuServer/RunState.pm | 32 ++++++++++++++++---------------- 2 files changed, 22 insertions(+), 16 deletions(-) Summary over all repositories: 41 files changed, 105 insertions(+), 1181 deletions(-) -- Generated by git-murpp 0.5.0