From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Rafal Wojtczuk <rafal@invisiblethingslab.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: A small issue with multiple xs_daemon_open
Date: Tue, 8 Jun 2010 12:01:31 +0100 [thread overview]
Message-ID: <C833E19B.17036%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <19470.7774.878906.579546@mariner.uk.xensource.com>
On 08/06/2010 11:41, "Ian Jackson" <Ian.Jackson@eu.citrix.com> wrote:
> 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 ?
Yes, I backported these to 4.0.x but not to 3.4.x since noone had reported
problems. I've now backported the fixes as xen-3.4-testing:19982. They'll go
into Xen 3.4.4.
-- Keir
> Ian.
>
> changeset: 21374:9d53864d7be6
> user: Keir Fraser <keir.fraser@citrix.com>
> 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@citrix.com>
>
>
> changeset: 21354:9de69d816b11
> user: Keir Fraser <keir.fraser@citrix.com>
> 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@citrix.com>
>
>
> changeset: 21353:2dd3141b3e3e
> user: Keir Fraser <keir.fraser@citrix.com>
> 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@citrix.com>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
prev parent reply other threads:[~2010-06-08 11:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-08 10:15 A small issue with multiple xs_daemon_open Rafal Wojtczuk
2010-06-08 10:41 ` Ian Jackson
2010-06-08 11:01 ` Keir Fraser [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C833E19B.17036%keir.fraser@eu.citrix.com \
--to=keir.fraser@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=rafal@invisiblethingslab.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.