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

Re: [Xen-devel] xenbus stress testing



On Fri, Feb 18, James Harper wrote:

> I think I have found the error and it was probably a 1 in a million race
> so stress testing might not have helped anyway. My code went:
> 
> len = min(ring->rsp_prod - ring->rsp_cons, msg_size)
> 
> and the ASSERT was hit because len was > msg_size, and the only possible
> way I can ever see that happening is if ring->rsp_prod changed between
> the if in the min() and the assignment. I'm now snapshotting rsp_prod to
> a local variable at the start. Kind of embarrassing really as plenty of
> example code exists.

Why is there no lock to protect the ring accesses?

Olaf

_______________________________________________
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®.