From: Ian Campbell Subject: Re: [PATCH] libxc: free thread specific hypercall buffer on xc_interface_close Date: Thu, 19 Aug 2010 13:48:00 +0100 Message-ID: <1282222080.3170.2729.camel@zakaz.uk.xensource.com> References: <201008181804.56934.Christoph.Egger@amd.com> <1282148788.3170.1221.camel@zakaz.uk.xensource.com> <201008191439.56338.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <201008191439.56338.Christoph.Egger@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Christoph Egger Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Thu, 2010-08-19 at 13:39 +0100, Christoph Egger wrote: > On Wednesday 18 August 2010 18:26:28 Ian Campbell wrote: > > On Wed, 2010-08-18 at 17:04 +0100, Christoph Egger wrote: > > > This patch prevents me from starting a guest until > > > the outstanding issue - namely why is hcall_buf_prep() never called - > > > is solved. > > > > You wouldn't expect hcall_buf_prep to be called if you opened the xc > > interface and then closed it without doing a hypercall which required > > any locked down memory. > > > > This updated version of the patch was intended to handle exactly this > > case > > Yes, it works. The issue was in the debug code itself. After > removing the trace code I am able to start guests again. > > Thanks for your help. Thanks for confirming. > > since it appears that under NetBSD it can cause issues. > > I am wondering why this issue didn't appear on Linux. > Does Linux have some kind of auto-initialization? I think it's just good/bad luck one way or the other if an uninitialised pthread_key_t looks valid to pthread_getspecific or not. Ultimately pthread_key_t is likely just an integer so there is always a chance that an uninitialised pthread_key_t looks like an existing valid key. Ian.