[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] help with xenstored 'hang'



Patrick Colp wrote:
> On 1 July 2010 14:30, Jim Fehlig <jfehlig@xxxxxxxxxx> wrote:
>   
>> Patrick Colp wrote:
>>     
>>> I was recently struggling with what sounds like a not-too-dissimilar
>>> problem while working with a disaggregated version of xenstore. The
>>> ultimate solution for me was to disable pthreads in xenstore/libxs. I
>>> just commented out the following line in tools/xenstore/Makefile:
>>>
>>> xs.opic: CFLAGS += -DUSE_PTHREAD
>>>
>>> After I removed that line and rebuilt and installed xenstore, it
>>> worked just fine. I would be curious to know if this also solves your
>>> problem.
>>>
>>>       
>> After more thought, this seems like it could cause problems in xend,
>> which is multi-threaded.  This change essentially make the xenstore
>> client library thread-unsafe correct?
>>     
>
> I don't think so. I think it just makes the xenstore library single
> threaded.

Right.  But AFAICT, multiple threads in xend could use the single
xs_handle, allowing these threads to write to the handle's fd
simultaneously.  With the pthreads impl, these threads must acquire the
handle's req_mutex before writing.

>  In my case, I was using a single threaded application and
> still ran into this problem, as the xenstore library seems to have
> multiple threads.

It spawns one reader thread only.  Requests and responses are handled on
the caller's thread of control.

Regards,
Jim



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.