qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dominique Martinet <dominique.martinet@cea.fr>
To: Greg Kurz <groug@kaod.org>
Cc: Eric Van Hensbergen <ericvh@gmail.com>,
	Latchesar Ionkov <lucho@ionkov.net>,
	linux-kernel@vger.kernel.org, qemu-devel@nongnu.org,
	v9fs-developer@lists.sourceforge.net,
	Ron Minnich <rminnich@sandia.gov>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [Qemu-devel] [PATCH 0/3] fs/9p: fix setattr/getattr issues with open files
Date: Thu, 7 Jul 2016 14:35:40 +0200	[thread overview]
Message-ID: <20160707123540.GA15192@u-isr-cdi-08> (raw)
In-Reply-To: <20160704170849.1654d6a0@bahia.lan>

Hi Greg,

Greg Kurz wrote on Mon, Jul 04, 2016 at 05:08:49PM +0200:
> On Mon, 4 Jul 2016 16:16:55 +0200
> Dominique Martinet <dominique.martinet@cea.fr> wrote:
> 
> > I *think* this introduces a race somewhere, I'm getting errors like:
> > cat: f.05: No such file or directory
> > cat: f.14: No such file or directory
> > cat: f.13: No such file or directory
> > cat: f.39: No such file or directory
> > cat: f.05: No such file or directory
> > 
> > 
> > when doing:
> >    for file in {01..50}; do touch f.${file}; done
> >    seq 1 1000 | xargs -n 1 -P 25 -I{} cat f.* > /dev/null

Ok so, tested with the first two patches and I can't seem to hit any
problem with the qemu server at least (I'd need more time to fix
ganesha's 9p tcp/rdma server before I could blame the client in any way)


The last patch looks good to me, I think it only makes an existing race
more visible... What I think could happen is:
 process 1 has file open
 process 2 tries to open file, sees fid open
 process 1 closes file/clunk fids
 process 2 tries to clone now-clunked fid and gets ENOENT


I'm afraid I just found out my hypervisor is no longer recent enough for
gdb kernel scripts (gdb 7.6 and python 2.7.5 in el7 compared to the
apparently required 7.7 and 2.7.6 respectively...), and I don't see
anything obvious with just debug messages/adding a few printks (wasn't
able to confirm where exactly that ENOENT comes from or if my theory is
even close to the truth)

I'd like to spend more time on it but don't think I'll be able to for a
couple of weeks ; sorry about that.


Were you able to reproduce the problem?

Thanks,
-- 
Dominique

  reply	other threads:[~2016-07-07 12:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 12:25 [Qemu-devel] [PATCH 0/3] fs/9p: fix setattr/getattr issues with open files Greg Kurz
2016-06-22 12:25 ` [Qemu-devel] [PATCH 1/3] fs/9p: fix create-unlink-getattr idiom Greg Kurz
2016-06-22 12:25 ` [Qemu-devel] [PATCH 2/3] fs/9p: track open fids Greg Kurz
2016-06-22 12:25 ` [Qemu-devel] [PATCH 3/3] fs/9p: search open fids first Greg Kurz
2016-07-04 14:16 ` [Qemu-devel] [PATCH 0/3] fs/9p: fix setattr/getattr issues with open files Dominique Martinet
2016-07-04 15:08   ` Greg Kurz
2016-07-07 12:35     ` Dominique Martinet [this message]
2016-07-07 13:34       ` Greg Kurz
2016-07-08 17:04         ` Greg Kurz

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=20160707123540.GA15192@u-isr-cdi-08 \
    --to=dominique.martinet@cea.fr \
    --cc=davem@davemloft.net \
    --cc=ericvh@gmail.com \
    --cc=groug@kaod.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucho@ionkov.net \
    --cc=qemu-devel@nongnu.org \
    --cc=rminnich@sandia.gov \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).