From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Wolf Subject: Re: Endless loop in qcow2_alloc_cluster_offset Date: Mon, 07 Dec 2009 16:03:34 +0100 Message-ID: <4B1D1946.7080908@redhat.com> References: <4B0537EB.4000909@siemens.com> <4B055AEF.4030406@redhat.com> <4B055D32.3040601@siemens.com> <4B1D0E34.6070907@siemens.com> <4B1D1618.2080900@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: qemu-devel , kvm To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:28658 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935189AbZLGPEh (ORCPT ); Mon, 7 Dec 2009 10:04:37 -0500 In-Reply-To: <4B1D1618.2080900@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: Am 07.12.2009 15:50, schrieb Jan Kiszka: > Jan Kiszka wrote: >> And now it happened again (qemu-kvm head, during kernel installation >> from network onto local qcow2-disk). Any clever idea how to proceed with >> this? >> >> I could try to run the step in a loop, hopefully retriggering it once in >> a (likely longer) while. But then we need some good instrumentation first. >> > > Maybe I'm seeing ghosts, and I don't even have a minimal clue about what > goes on in the code, but this looks fishy: > > preallocate() invokes qcow2_alloc_cluster_offset() passing &meta, a > stack variable. It seems that qcow2_alloc_cluster_offset() may insert > this structure into cluster_allocs and leave it there. So we corrupt the > queue as soon as preallocate() returns, no? preallocate() is about metadata preallocation during image creation. It is only ever run by qemu-img. Apart from that it calls run_dependent_requests() which removes the request from the list again. Kevin