NetBSD Problem Report #53071

From www@NetBSD.org  Sun Mar  4 11:09:29 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id AD8BA7A0F8
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  4 Mar 2018 11:09:29 +0000 (UTC)
Message-Id: <20180304110928.611717A266@mollari.NetBSD.org>
Date: Sun,  4 Mar 2018 11:09:28 +0000 (UTC)
From: uwe@NetBSD.org
Reply-To: uwe@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: some atf tests fail on NFS in cleanup
X-Send-Pr-Version: www-1.0

>Number:         53071
>Category:       bin
>Synopsis:       some atf tests fail on NFS in cleanup
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 04 11:10:00 +0000 2018
>Last-Modified:  Sun Mar 04 11:15:01 +0000 2018
>Originator:     Valery Ushakov
>Release:        current 2018-03-04
>Organization:
>Environment:
>Description:
On a diskless system run e.g.

$ cd /usr/tests/dev/raidframe && atf-run
[...]
tps-count: 1
tp-start: 1520160924.105161, t_raid, 7
tc-start: 1520160924.106797, old_numrows_config
tc-so:Executing command [ rump_server -lrumpvfs -lrumpdev -lrumpdev_disk -lrumpdev_raidframe -d key=/disk0,hostpath=disk0.img,size=1m -d key=/disk1,hostpath=disk1.img,size=1m unix://sock ]
tc-so:Executing command [ rump.raidctl -C raid.conf raid0 ]
tc-end: 1520160927.931706, old_numrows_config, passed
atf-run: ERROR: tools::fs::rmdir: Cannot remove directory: Directory not
atf-run: empty

What happens is that something is still holding files open when test
cleanup tries to remove the directory with them.  Since this is on an
NFS, the files are NOT removed silently, but instead become renamed to
.nfsXXXXXXXX and the directory cannot be removed.  Running ls -l in a
loop on the NFS server I can see:


atf-run.M0aymz:
total 4
-rw-r--r--  1 root  wheel  7 Mar  4 14:05 tcr
atf-run.BNvgJ0:
total 100
-rw-r--r--  1 root  wheel  1048576 Mar  4 14:05 disk0.img
-rw-r--r--  1 root  wheel  1048576 Mar  4 14:05 disk1.img
-rw-r--r--  1 root  wheel       87 Mar  4 14:05 raid.conf
srwxr-xr-x  1 root  wheel        0 Mar  4 14:05 sock

atf-run.M0aymz:
total 4
-rw-r--r--  1 root  wheel  7 Mar  4 14:05 tcr
atf-run.BNvgJ0:
total 100
srwxr-xr-x  1 root  wheel        0 Mar  4 14:05 .nfsA41134.4
-rw-r--r--  1 root  wheel  1048576 Mar  4 14:05 disk0.img
-rw-r--r--  1 root  wheel  1048576 Mar  4 14:05 disk1.img
-rw-r--r--  1 root  wheel       87 Mar  4 14:05 raid.conf

[...]

atf-run.M0aymz:
atf-run.BNvgJ0:
total 0
srwxr-xr-x  1 root  wheel  0 Mar  4 14:05 .nfsA41134.4

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/53071: some atf tests fail on NFS in cleanup
Date: Sun, 4 Mar 2018 14:14:07 +0300

 PS: Also, cleanup failure of a single test is probably not a good
 enough reason to abort complete ATF run.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.