WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] A small issue with multiple xs_daemon_open

To: Rafal Wojtczuk <rafal@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] A small issue with multiple xs_daemon_open
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 8 Jun 2010 11:41:34 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 08 Jun 2010 03:42:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100608101537.GA19667@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: chiark.mail.xen.devel
References: <20100608101537.GA19667@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Rafal Wojtczuk writes ("[Xen-devel] A small issue with multiple 
xs_daemon_open"):
> I am experiencing a problem when opening two simultaneous connections (in a
> single process) to xenstored via xs_daemon_open(). I would think such
> an operation is supported and should work (no static variables in
> libxenstore are involved); is it a correct assumption ? If so, the issue 
> should be fixed.

This is definitely supposed to work.  But as you say there are no
static variables in libxenstore (even in 3.4.3).  However, some
threading bugs were fixed recently in xen-unstable changesets 21353,
21354 and 21374.  Do these look like they might be the cause ?

Ian.

changeset:   21374:9d53864d7be6
user:        Keir Fraser <keir.fraser@xxxxxxxxxx>
date:        Thu May 13 12:21:16 2010 +0100
files:       tools/xenstore/xs.c
description:
xenstore: Fix cleanup_pop() definition for some (buggy) pthread.h headers.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>


changeset:   21354:9de69d816b11
user:        Keir Fraser <keir.fraser@xxxxxxxxxx>
date:        Wed May 12 08:49:13 2010 +0100
files:       tools/xenstore/xs.c
description:
xs: avoid pthread_join deadlock in xs_daemon_close

Doing a pthread_cancel and join on the reader thread while holding all
the request/reply/watch mutexes can deadlock if the thread needs to
take any of those mutexes to exit.  Kill off the reader thread before
taking any mutexes (which should be redundant if we're
single-threaded at that point).

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>


changeset:   21353:2dd3141b3e3e
user:        Keir Fraser <keir.fraser@xxxxxxxxxx>
date:        Wed May 12 08:48:14 2010 +0100
files:       tools/xenstore/xs.c
description:
xs: make sure mutexes are cleaned up and memory freed if the read thread is 
cancelled

If the read thread is terminated with pthread cancel, it must make
sure all memory is freed and mutexes are unlocked.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>