All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: James Harper <james.harper@bendigoit.com.au>
Cc: xen-devel@lists.xensource.com, Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: xenbus stress testing
Date: Fri, 18 Feb 2011 12:05:24 +0100	[thread overview]
Message-ID: <20110218110524.GA10012@aepfle.de> (raw)
In-Reply-To: <AEC6C66638C05B468B556EA548C1A77D01C556C5@trantor>

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

  reply	other threads:[~2011-02-18 11:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17  9:01 xenbus stress testing James Harper
2011-02-17 19:06 ` Ian Jackson
2011-02-17 22:17   ` James Harper
2011-02-18 11:05     ` Olaf Hering [this message]
2011-02-18 11:43       ` Paul Durrant
2011-02-18 12:01         ` Olaf Hering
2011-02-18 12:43           ` James Harper
2011-02-18 12:25     ` Ian Jackson
2011-02-18 12:42       ` James Harper
2011-02-18 13:08         ` Keir Fraser
2011-02-18 15:30         ` Ian Jackson
2011-02-18 22:36           ` James Harper

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=20110218110524.GA10012@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=james.harper@bendigoit.com.au \
    --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.