Bug #3339
closedmkdir, touch, rm occasionally do not work as expected
0%
Description
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@qcomp:~ % ls -ld somedir
drwxr-xr-x 1 user user 0 Feb 4 09:43 somedir
user@qcomp:~ % rm -rf somedir
recursively remove somedir? y
user@qcomp:~ % ls -ld somedir
ls: somedir: No such file or directory
user@qcomp:~ % mkdir somedir
mkdir: somedir: File exists
user@qcomp:~ % ls -ld somedir
drwxr-xr-x 1 user user 0 Feb 4 09:44 somedir
user@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 1 user user 0 Feb 4 09:53 twofile
ls: twofile: No such file or directory
$ touch twofile
$ ls -l twofile
-rw-r--r-
$ rm twofile
$
$ touch sixfile
$ rm sixfile
rm: sixfile: No such file or directory
$ ls l sixfile 1 user user 0 Feb 4 09:57 twofile
ls: sixfile: No such file or directory
$ ls -l six*
ls: six*: No such file or directory
$ ls -l
total 316
-rw-r--r-
$ rm twofile
rm: twofile: No such file or directory
$ ls -l twofile
ls: twofile: No such file or directory
$ ls -l
. . . NO twofile here. . .
Updated by peeter almost 2 years ago
There is strike through in formatting --- please ignore this. Should be without strike through.
Updated by peeter almost 2 years ago
Let me post the two sequences formatted correctly:
mkdir, rm with /bin/tcsh:
--- /bin/tcsh --- user@qcomp:~ % ls -ld somedir drwxr-xr-x 1 user user 0 Feb 4 09:43 somedir user@qcomp:~ % rm -rf somedir recursively remove somedir? y user@qcomp:~ % ls -ld somedir ls: somedir: No such file or directory user@qcomp:~ % mkdir somedir mkdir: somedir: File exists user@qcomp:~ % ls -ld somedir drwxr-xr-x 1 user user 0 Feb 4 09:44 somedir user@qcomp:~ % --- ---
and touch, rm with /bin/sh:
--- /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. . . --- ---
Updated by peeter almost 2 years ago
Concerns:
- the first issue (mkdir, rm) has been tested and occurs both on UFS and HAMMER2 filesystems.
- the second (touch, rm) has been tested only on HAMMER2. Not tested on UFS.
Updated by peeter almost 2 years ago
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.
user@mars:~ % mkdir somedir user@mars:~ % rm -rf somedir recursively remove somedir? y user@mars:~ % ls -ld somedir ls: somedir: No such file or directory user@mars:~ % mkdir somedir mkdir: somedir: File exists user@mars:~ % ls -l somedir total 0 user@mars:~ % ls -ld somedir drwxr-xr-x 1 user user 0 Feb 5 09:58 somedir user@mars:~ % rm -rf somedir user@mars:~ % ls -ld somedir ls: somedir: No such file or directory user@mars:~ % mkdir somedir mkdir: somedir: File exists user@mars:~ % rm -rf somedir recursively remove somedir? y user@mars:~ % mkdir somedir mkdir: somedir: File exists user@mars:~ % rm -rf somedir recursively remove somedir? y user@mars:~ % ls -ld somedir ls: somedir: No such file or directory user@mars:~ % mkdir somedir mkdir: somedir: File exists user@mars:~ % ls -l somedir total 0 user@mars:~ % rm -rf somedir recursively remove somedir? y user@mars:~ % ls -l somedir ls: somedir: No such file or directory user@mars:~ % mkdir somedir user@mars:~ % rm -rf somedir recursively remove somedir? y user@mars:~ % mkdir somedir mkdir: somedir: File exists user@mars:~ % ls -ld somedir drwxr-xr-x 1 user user 0 Feb 5 10:02 somedir user@mars:~ % rm -rf somedir recursively remove somedir? y user@mars:~ % mkdir somedir mkdir: somedir: File exists user@mars:~ % rm -rf somedir recursively remove somedir? y user@mars:~ % ls -l somedir ls: somedir: No such file or directory user@mars:~ % mkdir somedir mkdir: somedir: File exists user@mars:~ %
With a different filename:
user@mars:~ % mkdir onedir mkdir: onedir: File exists user@mars:~ % ls -l onedir total 0 user@mars:~ % rm -rf onedir recursively remove onedir? y user@mars:~ % ls -l onedir ls: onedir: No such file or directory user@mars:~ % mkdir onedir mkdir: onedir: File exists
Updated by peeter almost 2 years ago
- Status changed from New to Closed
I believe all this weird behavior has nothing to do with 'mkdir' or 'rm'. It seems it originates in how 'startx' behaves differently in DragonFly 6.5.
Will close the issue for now.