Bug 759426

Summary: btrfs: Random `No such file or directory' on files not being changed at all
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: kernelAssignee: Zach Brown <zab>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 16CC: blair, gansalmon, itamar, jan.kratochvil, jonathan, kernel-maint, madhu.chinakonda, sweil
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-04 14:32:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Kratochvil 2011-12-02 11:20:12 UTC
Description of problem:
After switching ext3->btrfs my test server reported an error:
cp: cannot stat `/path/to/file': No such file or directory
But /path/to/file is there, it does not change in any way.

Version-Release number of selected component (if applicable):
kernel-3.1.4-1.fc16.x86_64

How reproducible:
Difficult to reproduce.
So far it happened twice for me out of 41 testsuite runs.

Steps to Reproduce:
Run my hammock scripts testsuite - sure you cannot do it yourself.

Actual results:
cp: cannot stat `/home/jkratoch/redhat/gdb-cvs-master/bfd/vms-lib.c': No such file or directory

Expected results:
Normally copied directory tree.  The error never happened with ext3.  I do not see how it can happen, /home/jkratoch/redhat/gdb-cvs-master was last modified many hours ago, there are no races there.

Additional info:
20111201cleane-f16/fedora-16-x86_64/log-+ cp -a /home/jkratoch/redhat/gdb-cvs-master /home/jkratoch/hammock/20111201cleane-f16/fedora-16-x86_64/build/src
20111201cleane-f16/fedora-16-x86_64/log:cp: cannot stat `/home/jkratoch/redhat/gdb-cvs-master/bfd/vms-lib.c': No such file or directory
$ stat /home/jkratoch/redhat/gdb-cvs-master/bfd/vms-lib.c
  File: `/home/jkratoch/redhat/gdb-cvs-master/bfd/vms-lib.c'
  Size: 65185     	Blocks: 128        IO Block: 4096   regular file
Device: 13h/19d	Inode: 10648225    Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1001/jkratoch)   Gid: ( 1001/jkratoch)
Access: 2011-12-02 06:19:27.307112831 +0100
Modify: 2011-11-23 12:22:22.000000000 +0100
Change: 2011-12-02 06:15:39.873872325 +0100
 Birth: -

20111202thread-gdbserver-f16/fedora-16-x86_64/log-+ cp -a /home/jkratoch/redhat/gdb-cvs-master /home/jkratoch/hammock/20111202thread-gdbserver-f16/fedora-16-x86_64/build/src
20111202thread-gdbserver-f16/fedora-16-x86_64/log:cp: cannot stat `/home/jkratoch/redhat/gdb-cvs-master/gdb/gdbserver/linux-mips-low.c': No such file or directory
$ stat /home/jkratoch/redhat/gdb-cvs-master/gdb/gdbserver/linux-mips-low.c
  File: `/home/jkratoch/redhat/gdb-cvs-master/gdb/gdbserver/linux-mips-low.c'
  Size: 10183     	Blocks: 24         IO Block: 4096   regular file
Device: 13h/19d	Inode: 10639523    Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1001/jkratoch)   Gid: ( 1001/jkratoch)
Access: 2011-12-02 06:19:20.683105828 +0100
Modify: 2011-01-01 16:33:24.000000000 +0100
Change: 2011-12-02 06:14:13.096780557 +0100
 Birth: -

There run two such `cp -a' in parallel from the same source dir into different destination dir.  I tried to reproduce it by:
$ (set -ex;while :;do n rm -rf /tmp/fu;mkdir /tmp/fu;n cp -a /home/jkratoch/redhat/gdb-cvs-master /tmp/fu/1&n cp -a /home/jkratoch/redhat/gdb-cvs-master /tmp/fu/2&wait;done)
but without a success.

I do not know if I may have corrupted disk.  There is no fsck.btrfs.
I had many reboots and recoveries from LiveCD etc. with this filesystem so I understand it may not be in a perfect state.  But if journalling works and btrfs has no bugs there is no reason why the filesystem would be corrupted.

Comment 1 Dave Jones 2012-03-22 17:09:07 UTC
[mass update]
kernel-3.3.0-4.fc16 has been pushed to the Fedora 16 stable repository.
Please retest with this update.

Comment 2 Dave Jones 2012-03-22 17:12:01 UTC
[mass update]
kernel-3.3.0-4.fc16 has been pushed to the Fedora 16 stable repository.
Please retest with this update.

Comment 3 Dave Jones 2012-03-22 17:21:45 UTC
[mass update]
kernel-3.3.0-4.fc16 has been pushed to the Fedora 16 stable repository.
Please retest with this update.

Comment 4 Jan Kratochvil 2012-09-04 14:37:52 UTC
I had to switch the test server back from btrfs to ext4 so I no longer have these issues reproducible.