From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 3369E1FF13A for ; Wed, 27 May 2026 13:01:29 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1BDF018514; Wed, 27 May 2026 13:01:16 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Subject: [PATCH-SERIES qemu/qemu-server 0/6] fix #6424: avoid timeout issue for QMP 'quit' for bulk suspend Date: Wed, 27 May 2026 13:00:44 +0200 Message-ID: <20260527110106.287916-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: 1779879643853 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [runstate.pm,qmpclient.pm] Message-ID-Hash: OJJIAQZEYH7OUVIVYY7F3ADXBZUSVTUQ X-Message-ID-Hash: OJJIAQZEYH7OUVIVYY7F3ADXBZUSVTUQ 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: 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 (3): regenerate patches to restore incremental numbering async snapshot: allow skipping VM start after successful completion update submodule and patches to QEMU 11.0.1 ...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 +- ...-to-bounce-buffer-if-BLKZEROOUT-is-.patch} | 0 ...ial-deadlock-when-draining-during-tr.patch | 100 ------------------ ...oid-idle-event-loop-being-accounted.patch} | 0 ...-fix-regression-when-mmap-ing-expor.patch} | 0 ...-fix-regression-with-block-device-e.patch} | 0 ...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 -------- ...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 | 15 +-- qemu | 2 +- 31 files changed, 78 insertions(+), 481 deletions(-) rename debian/patches/extra/{0003-block-io-fallback-to-bounce-buffer-if-BLKZEROOUT-is-.patch => 0002-block-io-fallback-to-bounce-buffer-if-BLKZEROOUT-is-.patch} (100%) delete mode 100644 debian/patches/extra/0002-ide-avoid-potential-deadlock-when-draining-during-tr.patch rename debian/patches/extra/{0004-fdmon-io_uring-avoid-idle-event-loop-being-accounted.patch => 0003-fdmon-io_uring-avoid-idle-event-loop-being-accounted.patch} (100%) rename debian/patches/extra/{0012-block-export-fuse-fix-regression-when-mmap-ing-expor.patch => 0004-block-export-fuse-fix-regression-when-mmap-ing-expor.patch} (100%) rename debian/patches/extra/{0013-block-export-fuse-fix-regression-with-block-device-e.patch => 0005-block-export-fuse-fix-regression-with-block-device-e.patch} (100%) 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/0009-target-i386-fix-strList-leak-in-x86_cpu_get_unavaila.patch delete mode 100644 debian/patches/extra/0010-target-i386-fix-missing-PF_INSTR-in-SIGSEGV-context.patch delete mode 100644 debian/patches/extra/0011-migration-vmstate_save_state_v-fix-double-error_setg.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: 33 files changed, 100 insertions(+), 497 deletions(-) -- Generated by git-murpp 0.5.0