[DragonFlyBSD - Bug #3339] mkdir, touch, rm occasionally do not work as expected

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Sun Feb 5 00:16:12 PST 2023


Issue #3339 has been updated by peeter.


I can consistently reproduce this sequence in my home dir. At the same time, I cannot reproduce this in an another, random directory. The HAMMER2 fs is at least two years old.

Maybe something wrong with home directory? There are no errors in the nightly HAMMER2 cleanup logs.

<pre>
user at mars:~ % mkdir somedir
user at mars:~ % rm -rf somedir
recursively remove somedir? y
user at mars:~ % ls -ld somedir
ls: somedir: No such file or directory
user at mars:~ % mkdir somedir
mkdir: somedir: File exists
user at mars:~ % ls -l somedir
total 0
user at mars:~ % ls -ld somedir
drwxr-xr-x  1 user  user  0 Feb  5 09:58 somedir
user at mars:~ % rm -rf somedir
user at mars:~ % ls -ld somedir
ls: somedir: No such file or directory
user at mars:~ % mkdir somedir
mkdir: somedir: File exists
user at mars:~ % rm -rf somedir
recursively remove somedir? y
user at mars:~ % mkdir somedir
mkdir: somedir: File exists
user at mars:~ % rm -rf somedir
recursively remove somedir? y
user at mars:~ % ls -ld somedir
ls: somedir: No such file or directory
user at mars:~ % mkdir somedir
mkdir: somedir: File exists
user at mars:~ % ls -l somedir
total 0
user at mars:~ % rm -rf somedir
recursively remove somedir? y
user at mars:~ % ls -l somedir
ls: somedir: No such file or directory
user at mars:~ % mkdir somedir
user at mars:~ % rm -rf somedir
recursively remove somedir? y
user at mars:~ % mkdir somedir
mkdir: somedir: File exists
user at mars:~ % ls -ld somedir
drwxr-xr-x  1 user  user  0 Feb  5 10:02 somedir
user at mars:~ % rm -rf somedir
recursively remove somedir? y
user at mars:~ % mkdir somedir
mkdir: somedir: File exists
user at mars:~ % rm -rf somedir
recursively remove somedir? y
user at mars:~ % ls -l somedir
ls: somedir: No such file or directory
user at mars:~ % mkdir somedir
mkdir: somedir: File exists
user at mars:~ %
</pre>


With a different filename:

<pre>
user at mars:~ % mkdir onedir
mkdir: onedir: File exists
user at mars:~ % ls -l onedir
total 0
user at mars:~ % rm -rf onedir
recursively remove onedir? y
user at mars:~ % ls -l onedir
ls: onedir: No such file or directory
user at mars:~ % mkdir onedir
mkdir: onedir: File exists
</pre>


----------------------------------------
Bug #3339: mkdir, touch, rm occasionally do not work as expected
http://bugs.dragonflybsd.org/issues/3339#change-14499

* Author: peeter
* Status: New
* Priority: Normal
* Target version: 6.6
* Start date: 2023-02-04
----------------------------------------
Systems affected: 

- 6.3-DEVELOPMENT DragonFly v6.3.0.77.gfe8a9-DEVELOPMENT #4: Mon Mar 14 13:55:50 EET 2022

- 6.5-DEVELOPMENT DragonFly v6.5.0.25.ge49cd-DEVELOPMENT #63: Wed Feb  1 08:24:51 EET 2023


How to reproduce: 

- Difficult and indeterministic: sometimes occurs, sometimes not


Problem description: 

- mkdir reports the directory exists although it did not. The following command line sequences demonstrate the problem for mkdir. These sequences are un-edited, i.e. no other commands have been issued inbetween.

--- /bin/tcsh ---

user at qcomp:~ % ls -ld somedir
drwxr-xr-x  1 user  user  0 Feb  4 09:43 somedir
user at qcomp:~ % rm -rf somedir
recursively remove somedir? y
user at qcomp:~ % ls -ld somedir
ls: somedir: No such file or directory
user at qcomp:~ % mkdir somedir
mkdir: somedir: File exists
user at qcomp:~ % ls -ld somedir
drwxr-xr-x  1 user  user  0 Feb  4 09:44 somedir
user at qcomp:~ %

--- ---


- touch and rm: similarly, touch sometimes does not seem to work. 

It seems clear that 'sixfile' did not exist for rm or ls.

For 'twofile', at first it seems to work ok. But then note again later: after L7, 'twofile' should not exist any more, yet it shows up below in 'ls -l'. Note the 'twofile' time has changed (9:53 --> 9:57).


--- /bin/sh ---

$ rm twofile
$ ls -l twofile
ls: twofile: No such file or directory
$ touch twofile
$ ls -l twofile
-rw-r--r--  1 user  user  0 Feb  4 09:53 twofile
$ rm twofile
$ 
$ touch sixfile
$ rm sixfile
rm: sixfile: No such file or directory
$ ls -l sixfile
ls: sixfile: No such file or directory
$ ls -l six*
ls: six*: No such file or directory
$ ls -l
total 316
-rw-r--r--  1 user  user      0 Feb  4 09:57 twofile
$ rm twofile 
rm: twofile: No such file or directory
$ ls -l twofile
ls: twofile: No such file or directory
$ ls -l
. . . NO twofile here. . .

--- ---




-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Bugs mailing list