From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: BUG 4.2.2: xl cd-insert corrupts xenstore state Date: Fri, 26 Apr 2013 15:40:26 +0100 Message-ID: <517A91DA.6040007@eu.citrix.com> References: <1366987165.3142.126.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1366987165.3142.126.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Stefano Stabellini , Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 26/04/13 15:39, Ian Campbell wrote: > On Fri, 2013-04-26 at 15:34 +0100, George Dunlap wrote: >> $ git checkout RELEASE-4.2.2 >> $ git clean -ffdx >> >> [do a build, install, reboot] >> >> $ xl create a0 >> >> $ xl cd-eject a0 hdc >> >> [However, the guest OS still sees the CD inserted] >> >> $ xl block-list a0 >> Segmentation fault >> >> $ xl cd-insert a0 hdc file:/images/xs-tools-6.0.0.iso >> Segmentation fault > Can you get a backtrace out of gdb? Turns out I already fixed this once! commit c3556e2a1aee3c9b7dda5d57e85e8867fff1b9da Author: George Dunlap Commit: George Dunlap libxl: Fix bug in libxl_cdrom_insert, make more robust against bad xenstore data libxl_cdrom_insert was failing to initialize the backend type, resulting in the wrong default backend. The result was not only that the CD was not inserted properly, but also that some improper xenstore entries were created, causing further block commands to fail. This patch fixes the bug by setting the disk backend type based on the type of the existing device. It also makes the system more robust by checking to see that it has got a valid path before proceeding to write a partial xenstore entry. Signed-off-by: George Dunlap Acked-by: Ian Campbell Committed-by: Ian Campbell