chigga102 / s3fuse

Automatically exported from code.google.com/p/s3fuse
Other
0 stars 0 forks source link

After removing a directory with files and creating it again, files sometimes are stuck in half-dead state #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.create a directory repodata/ on local drive with some small files in it
2.for i in {1..40}; do echo $i; rm -rf /mnt/s3.cuetools.net/RPMS/repodata ; cp 
-r repodata/ /mnt/s3.cuetools.net/RPMS/ ; done

What is the expected output? What do you see instead?
Expecting only numbers from 1 to 40, but what i get is:

1
2
3
4
5
6
7
8
9
10
11
12
13
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
14
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
15
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
16
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
17
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
18
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
19
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
20
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
21
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
22
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
23
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
24
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
25
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
26
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
27
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
28
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
29
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/primary.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
30
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/primary.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
31
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/primary.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
32
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/primary.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
33
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/primary.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
34
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/primary.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
35
cp: cannot create regular file `/mnt/s3.cuetools.net/RPMS/repodata/repomd.xml': 
File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/primary.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
36
cp: cannot create regular file `/mnt/s3.cuetools.net/RPMS/repodata/repomd.xml': 
File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/primary.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
37
cp: cannot create regular file `/mnt/s3.cuetools.net/RPMS/repodata/repomd.xml': 
File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/primary.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
38
cp: cannot create regular file `/mnt/s3.cuetools.net/RPMS/repodata/repomd.xml': 
File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/primary.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
39
cp: cannot create regular file `/mnt/s3.cuetools.net/RPMS/repodata/repomd.xml': 
File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/primary.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists
40
cp: cannot create regular file `/mnt/s3.cuetools.net/RPMS/repodata/repomd.xml': 
File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/other.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/primary.xml.gz': File exists
cp: cannot create regular file 
`/mnt/s3.cuetools.net/RPMS/repodata/filelists.xml.gz': File exists

The files gradually fall into half-dead state, where they don't exist for 'ls' 
or 'rm', but do exist for 'cp'.

This only goes away after umount/mount or after a certain amount of time 
(presumably after the cache expires).

s3fuse writes the following to it's log when i try to create such file:

open: path: /RPMS/repodata/filelists.xml.gz
open_file::open_file: opening [RPMS/repodata/filelists.xml.gz] in 
[/tmp/s3fuse.local-vQCPA9].
open_file::init: file [RPMS/repodata/filelists.xml.gz] ready.
object_cache::open_handle: failed to open file [RPMS/repodata/filelists.xml.gz] 
with error -2.
open_file::~open_file: closing temporary file for 
[RPMS/repodata/filelists.xml.gz].

Original issue reported on code.google.com by gchu...@gmail.com on 13 Mar 2012 at 2:47

GoogleCodeExporter commented 8 years ago
I'm going to close this because despite many, many tests (with enhanced 
logging) I can barely reproduce it and when I do, the trace suggests simply 
that fetching metadata for a recently-deleted file occasionally succeeds. If 
you can find a way to consistently reproduce this error, I'm more than happy to 
look at it again.

Original comment by tar...@bedeir.com on 15 Sep 2012 at 8:34