From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id A44B61FF16E
	for <inbox@lore.proxmox.com>; Mon, 31 Mar 2025 17:07:11 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 173219AC8;
	Mon, 31 Mar 2025 17:07:02 +0200 (CEST)
Message-ID: <8b3982fe-9944-4cc2-8028-e449e1bc0895@proxmox.com>
Date: Mon, 31 Mar 2025 17:06:59 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
References: <20250331145507.196208-1-f.ebner@proxmox.com>
Content-Language: en-US
In-Reply-To: <20250331145507.196208-1-f.ebner@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.038 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
Subject: Re: [pve-devel] [PATCH-SERIES qemu 0/6] async snapshot improvements
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

Am 31.03.25 um 16:55 schrieb Fiona Ebner:
> Most importantly, start using a dedicated IO thread for the state
> file when doing a live snapshot.
> 
> Having the state file be in the iohandler context means that a
> blk_drain_all() call in the main thread or vCPU thread that happens
> while the snapshot is running will result in a deadlock.

Forgot to mention, this is easily reproducible by shutting down or
rebooting a Linux VM with SCSI disk (from within the guest) while a
snapshot is being taken. Patch 5/6 contains technical details.

Note that shutting down the VM will still result in failure after these
patches, but it's much better, because it's not a deadlock anymore and I
guess it's kinda philosophically okay, because there can be no VM state
of a shutdown VM. Can still be changed later if we want to do something
differently there.

Much more interesting is the reboot scenario of course (think in the
context of time-based automated snapshots where the guest might be doing
whatever at the time a snapshot is taken, in particular reboot), which
now should work seamlessly and not result in a deadlock either anymore.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel