From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751326AbbJDIHZ (ORCPT ); Sun, 4 Oct 2015 04:07:25 -0400 Received: from forum.1g6.biz ([81.56.37.174]:44945 "EHLO zm3.1g6.biz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750930AbbJDIHP (ORCPT ); Sun, 4 Oct 2015 04:07:15 -0400 X-Greylist: delayed 560 seconds by postgrey-1.27 at vger.kernel.org; Sun, 04 Oct 2015 04:07:15 EDT DKIM-Filter: OpenDKIM Filter v2.9.2 zm3.1g6.biz A22A224A2D1C Date: Sun, 4 Oct 2015 09:57:26 +0200 (CEST) From: Nicolas Parpandet To: linux-kernel@vger.kernel.org Cc: pcoustillas Message-ID: <1194508496.104744.1443945446284.JavaMail.zimbra@1g6.biz> In-Reply-To: <703659807.104689.1443944693452.JavaMail.zimbra@1g6.biz> References: <703659807.104689.1443944693452.JavaMail.zimbra@1g6.biz> Subject: nfs race condition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.1.0.100] X-Mailer: Zimbra 8.6.0_GA_1178 (ZimbraWebClient - FF40 (Linux)/8.6.0_GA_1178) Thread-Topic: aide google groupelemonde... ! Thread-Index: neddYyt9SsiGaYOnweZ3SQaxHc5dzb4JYwd0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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