mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Parpandet <npa@1g6.biz>
To: linux-kernel@vger.kernel.org
Cc: pcoustillas <pcoustillas@1g6.biz>
Subject: nfs race condition
Date: Sun, 4 Oct 2015 09:57:26 +0200 (CEST)	[thread overview]
Message-ID: <1194508496.104744.1443945446284.JavaMail.zimbra@1g6.biz> (raw)
In-Reply-To: <703659807.104689.1443944693452.JavaMail.zimbra@1g6.biz>


Hello, 

I'm doing some " crontab -e, exit with :x" on NFS mount point, 
and there is a race condition whent removing temporary files : 


7701 write(2, "No modification made\n", 21) = 21 
7701 open("/tmp/crontab.vYPoHR", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4 
7701 getdents(4, {{d_ino=73336409, d_off=1, d_reclen=24, d_name="."} {d_ino=73335455, d_off=2, d_reclen=24, d_name=".."} {d_ino=73340547, d_off=3, d_reclen=32, d_name="crontab"}}, 32768) = 80 
7701 unlink("/tmp/crontab.vYPoHR/crontab") = 0 
7701 getdents(4, {}, 32768) = 0 
7701 close(4) = 0 
7701 rmdir("/tmp/crontab.vYPoHR") = -1 ENOTEMPTY (Directory not empty) 
7701 write(2, "/tmp/crontab.vYPoHR: Directory n"..., 41) = 41 
7701 socket(PF_FILE, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 4

The unlink is really done after the rmdir,
nfsv4 & nfsv3 over ipv6, so the rmdir fails and the directory isn't removed.
I have same problem with mysql temporary files.

If I mount with "nocto,noac,lookupcache=none" : same problem
kernel version on server : 3.16.0-4-amd64 (debian8)
kernel version on client : 2.6.32-39-pve (proxmox), same thing with 3.13.0-63-generic (ubuntu)

Please answer me in CC, I'm not subscribed to the list.

Regards

Nicolas 


       reply	other threads:[~2015-10-04  8:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <703659807.104689.1443944693452.JavaMail.zimbra@1g6.biz>
2015-10-04  7:57 ` Nicolas Parpandet [this message]
2015-10-22 19:29   ` Nicolas Parpandet
2015-10-23  2:42     ` Neil Brown
2015-10-23  8:06       ` Nicolas Parpandet

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=1194508496.104744.1443945446284.JavaMail.zimbra@1g6.biz \
    --to=npa@1g6.biz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pcoustillas@1g6.biz \
    /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

all inboxes | Powered by JetHome®