From: Ian Jackson Subject: [libvirt] [PATCH 0/2] Re: libvirtd live-locking on CTX_LOCK when doing 'virsh save /tmp/blah' with guest corrupting memory (on purpose). Date: Tue, 14 Apr 2015 18:31:27 +0100 Message-ID: <21805.20207.220139.608551@mariner.uk.xensource.com> References: <20150408144730.GA16160@l.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150408144730.GA16160@l.oracle.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com To: Konrad Rzeszutek Wilk Cc: libvir-list@redhat.com, andrew.cooper3@citrix.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Konrad Rzeszutek Wilk writes ("libvirtd live-locking on CTX_LOCK when doing 'virsh save /tmp/blah' with guest corrupting memory (on purpose)."): > It looks like thread #10 is blocking in libxl_read_exactly waiting > for 'libxl-save-helper'. Said application (see below) has dispatched > an message through helper_getreply and is blocking on __read_nocancel. This is not supposed to block. helper_stdout_readable assumes that the fd is actually readable. However, for complicated reasons it can happen in a multithreaded program that the fd was _reviously_ readable and is now no longer. This was not clearly documented in the internal API documentation. I have produced what I think are two patches that will fix this. I have compiled them but I haven't tested them. Konrad, are you able to check whether they fix your bug ? If they do they are candidates for backporting. Thanks, Ian.