From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQbLR-0006Rc-UN for qemu-devel@nongnu.org; Tue, 02 Feb 2016 08:50:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQbLM-0008JZ-UL for qemu-devel@nongnu.org; Tue, 02 Feb 2016 08:50:13 -0500 Received: from mx2.parallels.com ([199.115.105.18]:41406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQbLM-0008JA-Os for qemu-devel@nongnu.org; Tue, 02 Feb 2016 08:50:08 -0500 References: <1453273940-15382-1-git-send-email-den@openvz.org> <1453273940-15382-2-git-send-email-den@openvz.org> <56B0AD04.1020303@redhat.com> From: "Denis V. Lunev" Message-ID: <56B0B402.90807@openvz.org> Date: Tue, 2 Feb 2016 16:49:54 +0300 MIME-Version: 1.0 In-Reply-To: <56B0AD04.1020303@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] block: fix assert in qcow2_get_specific_info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , qemu-devel@nongnu.org On 02/02/2016 04:20 PM, Paolo Bonzini wrote: > > On 20/01/2016 08:12, Denis V. Lunev wrote: >> There is a possibility to hit assert qcow2_get_specific_info that >> s->qcow_version is undefined. This happens when VM in starting from >> suspended state, i.e. it processes incoming migration, and in the same >> time 'info block' is called. >> >> The problem is that in the qcow2_invalidate_cache closes and the image >> and memsets BDRVQcowState in the middle. >> >> The patch moves processing of qcow2_get_specific_info into coroutine >> context and ensures that qcow2_invalidate_cache and qcow2_get_specific_info >> can not run simultaneosly. > I'm sitting next to Kevin :) and this is not a qcow2 bug. > > The problem is that qcow2_invalidate_cache is being called in coroutine > context. The process_incoming_migration_co code starting with > bdrv_invalidate_cache_all should be moved out of the coroutine and into > the main loop. You can use a bottom half to get out of coroutine context. > > The result should be a much simpler patch, too. > > Thanks, and sorry for the delay. I saw qcow2 in the title and assumed > it was something I knew nothing about. :) > > Paolo no prob. I'll check this and come with a patch if this approach will work. By the way, are you sitting next to Stefan too? :) There is our set [PATCH v4 00/11] simplify usage of tracepoints, and connect them to logging which was accepted by Stefan and still not merged. We can have troubles as in 2.5 previously near the end of the merge window. Den