Skip to content

Running tests sometimes hangs at the FUSE level #97

@stapelberg

Description

@stapelberg

Steps to reproduce:

  1. cd ~/go/src/github.com/jacobsa/fuse
  2. go test -count=1 -v ./...

Sometimes, the above go test invocation hangs. ps shows:

[…]
michael        82587  20   0  0.3  0.0              \_ /home/michael/sdk/go1.16/bin/go test -count=1 -v ./...
michael        83396  20   0  3.9  0.1                  \_ /tmp/go-build2156820598/b126/memfs.test -test.paniconexit0 -test.timeout=10m0s -test.count=1 -test.v=true

(Sometimes it’s the statfs test process that hangs, so it’s not just memfs.)

Open file descriptors of the test process:

% ls -l /proc/83396/fd
total 0
lr-x------. 1 michael michael 64 2021-06-06 21:15 0 -> /dev/null
l-wx------. 1 michael michael 64 2021-06-06 21:15 1 -> 'pipe:[427286]'
lrwx------. 1 michael michael 64 2021-06-06 21:15 10 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 11 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 12 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 13 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 14 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 15 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 16 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 17 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 18 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 19 -> /dev/fuse
l-wx------. 1 michael michael 64 2021-06-06 21:15 2 -> 'pipe:[427286]'
lrwx------. 1 michael michael 64 2021-06-06 21:15 20 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 21 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 22 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 23 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 24 -> /dev/fuse
l-wx------. 1 michael michael 64 2021-06-06 21:15 26 -> /tmp/sample_test986118255/foo
lrwx------. 1 michael michael 64 2021-06-06 21:15 28 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 3 -> 'anon_inode:[eventpoll]'
l-wx------. 1 michael michael 64 2021-06-06 21:15 30 -> /tmp/sample_test986118255/foo
lr-x------. 1 michael michael 64 2021-06-06 21:15 4 -> 'pipe:[418737]'
l-wx------. 1 michael michael 64 2021-06-06 21:15 5 -> 'pipe:[418737]'
lr-x------. 1 michael michael 64 2021-06-06 21:15 6 -> /var/lib/sss/mc/passwd
lrwx------. 1 michael michael 64 2021-06-06 21:15 7 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 8 -> /dev/fuse
lrwx------. 1 michael michael 64 2021-06-06 21:15 9 -> /dev/fuse

Adding extra debug logging doesn’t seem to help, as go test doesn’t show the output until the test process finishes.

To unstuck your computer, use:

% echo 1 | sudo tee /sys/fs/fuse/connections/43/abort

Possibly followed by fusermount -u <mountpoint> for all remaining FUSE mountpoints in /tmp.

This issue does not seem to be caused by a recent change, at least not within github.com/jacobsa/fuse (perhaps on the kernel side?). I can reproduce it with commit e7bcad2 from 2019, and also with the current version.

Any ideas/tips welcome.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions