Skip to content

Tests get stuck. #261

@navytux

Description

@navytux

I was trying to run go-fuse testsuite in repeated mode and after some 10-20-30 iterations the tests get stuck:

src/github.com/hanwen/go-fuse$ while true; do echo -e '\n# repeat'; go test -count 1 ./...; done
...

# repeat
ok      github.com/hanwen/go-fuse/benchmark     0.058s
?       github.com/hanwen/go-fuse/benchmark/bulkstat    [no test files]
?       github.com/hanwen/go-fuse/example/autounionfs   [no test files]
?       github.com/hanwen/go-fuse/example/benchmark-read-throughput     [no test files]
?       github.com/hanwen/go-fuse/example/hello [no test files]
?       github.com/hanwen/go-fuse/example/loopback      [no test files]
?       github.com/hanwen/go-fuse/example/memfs [no test files]
?       github.com/hanwen/go-fuse/example/multizip      [no test files]
?       github.com/hanwen/go-fuse/example/statfs        [no test files]
?       github.com/hanwen/go-fuse/example/unionfs       [no test files]
?       github.com/hanwen/go-fuse/example/zipfs [no test files]
ok      github.com/hanwen/go-fuse/fuse  0.002s
ok      github.com/hanwen/go-fuse/fuse/nodefs   0.235s
ok      github.com/hanwen/go-fuse/fuse/pathfs   0.207s
ok      github.com/hanwen/go-fuse/fuse/test     3.037s
?       github.com/hanwen/go-fuse/internal/testutil     [no test files]
?       github.com/hanwen/go-fuse/internal/utimens      [no test files]
ok      github.com/hanwen/go-fuse/splice        0.011s
ok      github.com/hanwen/go-fuse/unionfs       2.892s
ok      github.com/hanwen/go-fuse/zipfs 0.114s

# repeat
ok      github.com/hanwen/go-fuse/benchmark     0.047s
?       github.com/hanwen/go-fuse/benchmark/bulkstat    [no test files]
?       github.com/hanwen/go-fuse/example/autounionfs   [no test files]
?       github.com/hanwen/go-fuse/example/benchmark-read-throughput     [no test files]
?       github.com/hanwen/go-fuse/example/hello [no test files]
?       github.com/hanwen/go-fuse/example/loopback      [no test files]
?       github.com/hanwen/go-fuse/example/memfs [no test files]
?       github.com/hanwen/go-fuse/example/multizip      [no test files]
?       github.com/hanwen/go-fuse/example/statfs        [no test files]
?       github.com/hanwen/go-fuse/example/unionfs       [no test files]
?       github.com/hanwen/go-fuse/example/zipfs [no test files]
ok      github.com/hanwen/go-fuse/fuse  0.003s
ok      github.com/hanwen/go-fuse/fuse/nodefs   0.242s
ok      github.com/hanwen/go-fuse/fuse/pathfs   0.292s
(no further output here)

inspecting the stuck process a bit:

kirr@deco:~$ cat /proc/12927/mounts |grep -i fuse
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
nodefs.memNode /tmp/TestDeleteNotify043745505/mnt fuse.nodefs.memNode rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
nodefs.memNode /tmp/TestDeleteNotify041170318/mnt fuse.nodefs.memNode rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
nodefs.memNode /tmp/TestDeleteNotify074247721/mnt fuse.nodefs.memNode rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
pathfs.pathInode /tmp/TestNonseekable501982173 fuse.pathfs.pathInode rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
nodefs.memNode /tmp/TestDeleteNotify426583496/mnt fuse.nodefs.memNode rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
Locked(pathfs.pathIn /tmp/TestRecursiveMount699955034/mnt fuse.Locked(pathfs.pathIn rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
Locked(pathfs.pathIn /tmp/TestLookupKnownChildrenAttrCopied546363126/mnt fuse.Locked(pathfs.pathIn rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
nodefs.memNode /tmp/TestDeleteNotify591838373/mnt fuse.nodefs.memNode rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
pathfs.pathInode /tmp/TestUnionFsDropDeletionCache497637161/mnt fuse.pathfs.pathInode rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
Locked(pathfs.pathIn /tmp/TestRecursiveMount577527402/mnt fuse.Locked(pathfs.pathIn rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
pathfs.pathInode /tmp/TestUnionFsRenameDirAllSourcesGone103878418/mnt fuse.pathfs.pathInode rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
nodefs.nodeReadNode /tmp/nodefs272940596 fuse.nodefs.nodeReadNode rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
nodefs.memNode /tmp/TestDeleteNotify228516545/mnt fuse.nodefs.memNode rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0

kirr@deco:~$ ll /proc/12927/task/
итого 0
dr-xr-xr-x 7 kirr kirr 0 янв 31 11:42 12927

i.e. single thread.

kirr@deco:~$ strace -t -t -p 12927
strace: Process 12927 attached
(no further output)

i.e. it is blocked in a syscall. Syscall details:

root@deco:/home/kirr# cat /proc/12927/stack
[<0>] request_wait_answer+0x12b/0x210 [fuse]
[<0>] __fuse_request_send+0x64/0x90 [fuse]
[<0>] fuse_simple_request+0xcd/0x190 [fuse]
[<0>] fuse_dentry_revalidate+0x1a8/0x300 [fuse]
[<0>] lookup_fast+0x275/0x2e0
[<0>] walk_component+0x48/0x4a0
[<0>] path_lookupat.isra.48+0x6d/0x220
[<0>] filename_lookup.part.62+0xa0/0x170
[<0>] ksys_chdir+0x3e/0xc0
[<0>] __x64_sys_chdir+0xe/0x20
[<0>] do_syscall_64+0x53/0x100
[<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[<0>] 0xffffffffffffffff

I had only a brief quick look and had not inspected further.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions